More problems deiscovered from the problem child. :) I think these fixes should improve reliability across the board for reading focused windows though. Needs testing.
This commit is contained in:
1 parent
1c12bc6636
commit
6ed0e36960
4 files changed
+28
-3
No files matched your search
@@ -188,8 +188,11 @@ static void cthulhu_read_frame_bounds(Display *display, Window window, Foregroun
|
||||
|
||||
XWindowAttributes attributes;
|
||||
if (!XGetWindowAttributes(display, parent, &attributes) ||
|
||||
attributes.class != InputOutput || attributes.override_redirect ||
|
||||
attributes.class != InputOutput ||
|
||||
attributes.map_state != IsViewable) return;
|
||||
// i3's decoration windows are override-redirect: that flag bypasses WM
|
||||
// management, not foreground ownership. Validate the enclosing frame by
|
||||
// its tree, managed children and bounds below instead.
|
||||
Atom stateAtom = XInternAtom(display, "WM_STATE", False);
|
||||
Atom type = None; int format = 0; unsigned long items = 0;
|
||||
unsigned char *data = cthulhu_window_property(display, parent, stateAtom, &type, &format, &items);
|
||||
|
||||
@@ -62,6 +62,8 @@ func TestNativeReparentedFrameForeground(t *testing.T) {
|
||||
{"resize", "client", [4]int{0, 0, 1000, 700}},
|
||||
{"move", "client", [4]int{-30, 40, 1916, 994}},
|
||||
{"border", "client", [4]int{0, 0, 1920, 998}},
|
||||
{"i3-frame", "client", [4]int{0, 0, 1916, 994}},
|
||||
{"i3-run-dialog", "client", [4]int{0, 24, 1916, 989}},
|
||||
{"other", "other", [4]int{2000, 0, 500, 400}},
|
||||
{"plain", "plain", [4]int{}},
|
||||
{"shared", "shared", [4]int{}},
|
||||
|
||||
Reference in new issue
Block a user