Bug 2135 - xprop doesnt select the right window in tab-using windowmanagers
Summary: xprop doesnt select the right window in tab-using windowmanagers
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xprop (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://darkshed.net/files/c_cpp/akxprop
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2004-12-22 06:10 UTC by Mathias Gumz
Modified: 2018-06-17 19:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mathias Gumz 2004-12-22 06:10:55 UTC
xprop selects only the first window, when clicking on a tab-group of them.
solution is to go the hierarchy up to the topmost window. i put it all together
in a little package called akxprop but that was just for convinience for some
people to test it.

for those who are unaware of what tabs are: http://fluxbox.org/features/tabs.php

the whole thing comes down to:

+- patch ------------

--- dsimple.c	2004-12-22 15:08:49.847042792 +0100
+++ dsimple.c.new	2004-12-22 15:07:11.517991080 +0100
@@ -531,6 +531,17 @@ Window Select_Window(dpy)
       if (target_win == None) {
 	target_win = event.xbutton.subwindow; /* window selected */
 	if (target_win == None) target_win = root;
+      } else { /* search topmost window (for tab-supporting wm's) */
+		Window root_return;
+		Window win_return;
+		Window parent_return;
+		Window *children_return = NULL;
+		unsigned int nr_children = 0;
+		if (XQueryTree(dpy, target_win, &root_return, &parent_return,
+			&children_return, &nr_children)) {
+			target_win = children_return[nr_children - 1];
+			XFree(children_return);
+        }
       }
       buttons++;
       break;

+- end of patch -------------
Comment 1 Kim Woelders 2005-01-01 03:03:36 UTC
I believe this is related to bug 2185.
However, the patch proposed here does not fix the problem for WM's using virtual
roots.
Maybe the solution suggested for bug 2185 also fixes this one?
Comment 2 Matt Turner 2010-12-03 13:25:54 UTC
This bug is old, and totally inactive. Closing.

If you'd like, please send the patch to xorg-devel@lists.x.org for review/inclusion.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.