Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Section" doesn't work anymore with Gtk+ >= 2.18 (client-side windows) #25

Open
Photon89 opened this issue Jun 11, 2020 · 4 comments
Open
Labels

Comments

@Photon89
Copy link
Member

http://library.gnome.org/devel/gtk/2.18/gtk-migrating-ClientSideWindows.html

We currently use XQueryTree (see: man XQueryTree) to query the window tree information of foreign windows.
"GDK has been changed to use client-side windows. This means that there is no longer a 1-1 correspondence between GdkWindows and windows in the underlying window system."

Launchpad Details: #LP444358 Mario Kemper (Romario) - 2009-10-06 08:34:48 +0000

@Photon89 Photon89 added the high label Jun 11, 2020
@Photon89
Copy link
Member Author

?!

Launchpad Details: #LPC Vadim Peretokin - 2009-10-06 12:05:15 +0000

@Photon89
Copy link
Member Author

Sorry for the short explanation - I was in a hurry.

The "Section" function queries the window tree information (a window consists of many subwindows) by calling an xlib function, XQueryTree. Before Gtk+ 2.18 most of the widgets had a corresponding xwindow. The information about the subwindows were used to detect them and draw a rectangle around them that illustrated their geometry.

The new Ubuntu release (Karmic Koala 9.10) delivers the latest Gnome and Gtk+ versions where GDK has been changed to use client-side windows. This means that the XServer no longer knows about the subwindow hierarchy of a Gtk+ window and we can't use the XQueryTree function any longer. Qt4.x does use something similar. You can test this with an Qt4.x application window like VirtualBox if you don't have a karmic installation available.

It is possible to query the children of a GDK-window, but this works only if your own application created that window. Shutter needs to get the children of foreign toplevel windows.

I don't have a clue how to fix that, but I'll send an e-Mail to the Gtk+ mailing list when I am back home. I'll post any answers here.

Launchpad Details: #LPC Mario Kemper (Romario) - 2009-10-06 12:32:58 +0000

@Photon89
Copy link
Member Author

One solution might be to use the accessibility framework:
http://projects.gnome.org/accessibility/

Accerciser is using it (the python bindings) to query the structure of toplevel windows:
http://live.gnome.org/GAP/PythonATSPI

There is also some work done to port AT-SPI to D-Bus (this would be the best solution for us):
http://www.linuxfoundation.org/en/Accessibility/ATK/AT-SPI/AT-SPI_on_D-Bus

Launchpad Details: #LPC Mario Kemper (Romario) - 2009-10-06 13:12:54 +0000

@Photon89
Copy link
Member Author

Relevant thread (gtk-app-devel mailing list):
http://markmail.org/thread/4at2gn6nsmdtmii5

Launchpad Details: #LPC Mario Kemper (Romario) - 2009-10-07 09:39:33 +0000

DarthGandalf added a commit that referenced this issue May 8, 2021
It doesn't work anymore with modern windows anyway.

See #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant