[Gambas-user] DesktopWindow.Name; Unexpected result
Tobias Boege
taboege at ...626...
Sat Jun 17 14:50:07 CEST 2017
On Sat, 17 Jun 2017, Gianluigi wrote:
> 2017-06-17 13:51 GMT+02:00 adamnt42 at ...626... <adamnt42 at ...626...>:
>
> >
> > Ah! Now I see where your confusion lies...
> > 1) DesktopWindow.Name : "i.e. its title as specified by the application
> > that owns this window."
> > 2) DesktopWindow.VisibleName : " i.e. the window title as displayed by the
> > window manager."
> >
> > The difference is subtle and not easy to find an example for, but it does
> > happen I can assure you.
> >
>
> OK, I'll take your word for it.
>
I can get something like this here easily by opening two konqueror windows
and pointing them to the same directory (see screenshot). However, the
properties of the DesktopWindow objects look like this:
$ ./konqueror-windows.gbs3
Name: var - Konqueror VisibleName: var - Konqueror
Name: var - Konqueror VisibleName:
So, apparently this can happen, too.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwin-konqueror-visiblename.png
Type: image/png
Size: 4072 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20170617/06d94c0e/attachment.png>
-------------- next part --------------
#!/usr/bin/gbs3
Use "gb.desktop"
Public Sub Main()
Dim w As DesktopWindow
For Each w In Desktop.Windows
If w.Name Not Like "*konqueror*" Then Continue
Print "Name:";; w.Name, "VisibleName:";; w.VisibleName
Next
End
More information about the User
mailing list