event delivery changes after XWin minimize/restore or resize

Peter Ziobrzynski <[email protected]> Wed, 10 Dec 2014 14:56:52 -0700
Newsgroups gmane.os.cygwin.xfree
Message-ID <[email protected]>
Recently (last week) my window manager key bindings stopped working 
after I minimize XWin window and restore it or resize it.  My 
combination of Alt key and mouse clicks do not work anymore.
I use kind of exotic window manager (ctwm) so to make it easy to 
replicate I used xev to repeat the same Alt + mouse click sequence and 
captured the xev list of events before and after XWin minimize and 
restore.  It looks like the list of events listed changes drastically 
explaining why ctwm stopped behaving properly.  I see the same behavior 
in Win8-64 and Win7-32.  I see that Alt key stopped working as a 
modifier. I tried twm instead of ctwm with the same result.

Here is the output of xev before XWin minimize/restore or resize while 
pressing Alt and clicking left mouse button in xev window:

LeaveNotify event, serial 32, synthetic NO, window 0xc00001,
     root 0x16d, subw 0xc00002, time 118362968, (41,42), root:(1747,393),
     mode NotifyGrab, detail NotifyVirtual, same_screen YES,
     focus NO, state 264

EnterNotify event, serial 32, synthetic NO, window 0xc00001,
     root 0x16d, subw 0xc00002, time 118363968, (41,42), root:(1747,393),
     mode NotifyUngrab, detail NotifyVirtual, same_screen YES,
     focus NO, state 8

KeymapNotify event, serial 32, synthetic NO, window 0x0,
     keys:  109 0   0   0   0   0   0   0   1   0   0   0   0 0   0   0
            0   0   0   0   0   0   0   0   0   0   0   0   0 0   0   0

Here is the output of the same actions after XWin minimize/restore:

KeyPress event, serial 38, synthetic NO, window 0xc00001,
     root 0x16d, subw 0xc00002, time 118672828, (49,36), root:(1755,387),
     state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

ButtonPress event, serial 38, synthetic NO, window 0xc00001,
     root 0x16d, subw 0xc00002, time 118673687, (49,36), root:(1755,387),
     state 0x18, button 1, same_screen YES

EnterNotify event, serial 38, synthetic NO, window 0xc00001,
     root 0x16d, subw 0x0, time 118672828, (49,36), root:(1755,387),
     mode NotifyGrab, detail NotifyInferior, same_screen YES,
     focus YES, state 280

KeymapNotify event, serial 38, synthetic NO, window 0x0,
     keys:  109 0   0   0   0   0   0   0   1   0   0   0   0   0 0   0
            0   0   0   0   0   0   0   0   0   0   0   0   0   0 0   0

ButtonRelease event, serial 38, synthetic NO, window 0xc00001,
     root 0x16d, subw 0xc00002, time 118673703, (49,36), root:(1755,387),
     state 0x118, button 1, same_screen YES

LeaveNotify event, serial 38, synthetic NO, window 0xc00001,
     root 0x16d, subw 0x0, time 118673703, (49,36), root:(1755,387),
     mode NotifyUngrab, detail NotifyInferior, same_screen YES,
     focus YES, state 24



-- 
Peter Ziobrzynski, mailto:[email protected]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/
cygcheck.out (text/plain, 179.8 KB) - not displayed
XWin.0.log.old (text/plain, 4.9 KB)
[121325.031] Welcome to the XWin X Server
[121325.031] Vendor: The Cygwin/X Project
[121325.031] Release: 1.16.2.0
[121325.031] OS: CYGWIN_NT-6.1 pzi-s3 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64
[121325.031] OS: Windows 8.1  [Windows NT 6.3 build 9600] (Win64)
[121325.031] Package: version 1.16.2-1 built 2014-11-11
[121325.031] 
[121325.031] winInitializeScreenDefaults - primary monitor w 2160 h 1440
[121325.031] winInitializeScreenDefaults - native DPI x 144 y 144
[121325.046] XWin was started with the following command line:

/usr/bin/X 

[121325.046] (II) xorg.conf is not supported
[121325.046] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[121325.046] LoadPreferences: /home/Peter/.XWinrc not found
[121325.046] LoadPreferences: Loading /etc/X11/system.XWinrc
[121325.046] LoadPreferences: Done parsing the configuration file...
[121325.093] winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
[121325.093] winDetectSupportedEngines - Returning, supported engines 00000015
[121325.093] winSetEngine - Using Shadow DirectDraw NonLocking
[121325.093] winScreenInit - Using Windows display depth of 32 bits per pixel
[121325.187] winWindowProc - WM_SIZE - new client area w: 2138 h: 1352
[121325.250] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[121325.265] MIT-SHM extension disabled due to lack of kernel support
[121325.265] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[121325.281] (EE) AIGLX: No native OpenGL in modes with a root window
[121325.312] (II) AIGLX: enabled GLX_EXT_texture_from_pixmap
[121325.312] (II) AIGLX: Loaded and initialized swrast
[121325.312] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[121325.640] winPointerWarpCursor - Discarding first warp: 1069 676
[121325.640] (--) 5 mouse buttons found
[121325.640] (--) Setting autorepeat to delay=500, rate=31
[121325.640] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[121325.640] (--) Found matching XKB configuration "English (USA)"
[121325.640] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[121325.640] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[121325.718] winProcEstablishConnection - winInitClipboard returned.
[121325.718] winClipboardThreadProc - DISPLAY=:0.0
[121325.718] OS maintains clipboard viewer chain: yes
[121325.734] winClipboardProc - XOpenDisplay () returned and successfully opened the display.
[121463.546] winWindowProc - WM_ENTERSIZEMOVE
[121463.640] winWindowProc - WM_SIZE - new client area w: 2137 h: 1352
[121463.671] winWindowProc - WM_SIZE - new client area w: 2135 h: 1352
[121463.687] winWindowProc - WM_SIZE - new client area w: 2134 h: 1352
[121463.703] winWindowProc - WM_SIZE - new client area w: 2132 h: 1352
[121463.734] winWindowProc - WM_SIZE - new client area w: 2130 h: 1352
[121463.734] winWindowProc - WM_SIZE - new client area w: 2128 h: 1351
[121463.765] winWindowProc - WM_SIZE - new client area w: 2124 h: 1349
[121463.781] winWindowProc - WM_SIZE - new client area w: 2115 h: 1344
[121463.796] winWindowProc - WM_SIZE - new client area w: 2103 h: 1338
[121463.828] winWindowProc - WM_SIZE - new client area w: 2089 h: 1331
[121463.843] winWindowProc - WM_SIZE - new client area w: 2077 h: 1323
[121463.859] winWindowProc - WM_SIZE - new client area w: 2064 h: 1313
[121463.890] winWindowProc - WM_SIZE - new client area w: 2054 h: 1306
[121463.906] winWindowProc - WM_SIZE - new client area w: 2047 h: 1300
[121463.921] winWindowProc - WM_SIZE - new client area w: 2039 h: 1294
[121463.937] winWindowProc - WM_SIZE - new client area w: 2035 h: 1291
[121463.968] winWindowProc - WM_SIZE - new client area w: 2028 h: 1287
[121463.984] winWindowProc - WM_SIZE - new client area w: 2023 h: 1285
[121464.015] winWindowProc - WM_SIZE - new client area w: 2022 h: 1284
[121464.718] winWindowProc - WM_SIZE - new client area w: 2023 h: 1284
[121464.750] winWindowProc - WM_SIZE - new client area w: 2025 h: 1285
[121464.765] winWindowProc - WM_SIZE - new client area w: 2026 h: 1286
[121464.796] winWindowProc - WM_SIZE - new client area w: 2029 h: 1289
[121464.828] winWindowProc - WM_SIZE - new client area w: 2030 h: 1292
[121464.843] winWindowProc - WM_SIZE - new client area w: 2034 h: 1297
[121464.859] winWindowProc - WM_SIZE - new client area w: 2036 h: 1300
[121464.875] winWindowProc - WM_SIZE - new client area w: 2036 h: 1301
[121464.953] winWindowProc - WM_SIZE - new client area w: 2036 h: 1302
[121464.984] winWindowProc - WM_SIZE - new client area w: 2037 h: 1302
[121465.015] winWindowProc - WM_SIZE - new client area w: 2037 h: 1304
[121465.250] winWindowProc - WM_EXITSIZEMOVE
[121490.468] winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT message, exiting main loop.
[121490.484] winClipboardProc - XDestroyWindow succeeded.
[121490.500] winDeinitMultiWindowWM - Noting shutdown in progress
[121490.500] (EE) Server terminated successfully (0). Closing log file.