Closed wavexx closed 5 years ago
Looked over the Window
values for the Focus changes and they all report 0
Also tried implementing XPropertyChange
to watch for _NET_ACTIVE_WINDOW
. But doesn't seem like it gets used.
+++ b/Screenkey/xlib.py
@@ -28,6 +28,16 @@ class Display(Structure):
class Visual(Structure):
pass
+class XPropertyEvent(Structure):
+ _fields_ = [('type', c_int),
+ ('serial', c_ulong),
+ ('send_event', Bool),
+ ('display', POINTER(Display)),
+ ('window', Window),
+ ('Atom', Atom),
+ ('time', Time),
+ ('state', c_uint)]
+
class XKeyEvent(Structure):
_fields_ = [('type', c_int),
('serial', c_ulong),
@@ -98,6 +108,7 @@ class XEvent(Union):
('xbutton', XButtonEvent),
('xmotion', XMotionEvent),
('xclient', XClientMessageEvent),
+ ('xproperty', XPropertyEvent),
('pad', c_long * 24)]
xlib.xKeyButtonPointer.event/child are 0 when read from the event stream. Bad decoding/packing, or missing info from XRecord?
See https://github.com/wavexx/screenkey/issues/44#issuecomment-313881370 and following comments.