When cycling (i.e. alt-tab), xfwm crashes when using the mouse to select a window behind the window list

Jonathan Apostoles
2021-07-24T21:06:13Z

Version: 4.16.1 (revision 5f61a84ad)

When cycling through windows (via alt-tab), clicking a window that is not the active window causes xfwm4 to exit for some reason.

It appears this behavior exists regardless of my window manager tweak configuration.

Steps to reproduce:
1. Open a few windows
2. ALT-TAB and hold to bring up the cycle switcher
3. Click a window that is not active directly (ie: don't click an entry in the cycle list)

Note: Make sure you release ALT-TAB shortly after clicking. It doesn't seem to happen if you keep ALT-TAB pressed down, which causes the previously active app to switch back.

You can visually see the window manager reload when the process exits/restarts

``` Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005622c0d6ded6 in clientCycleEventFilter (event=0x5622c34ab3a0, data=0x7ffe224f6790) at cycle.c:267
267 display_info = screen_info->display_info;

#0 0x00005622c0d6ded6 in clientCycleEventFilter (event=0x5622c34ab3a0, data=0x7ffe224f6790) at cycle.c:267
#1 0x00005622c0d72d0c in eventXfwmFilter (gdk_xevent=0x7ffe224f64f0, gevent=0x5622c2908e60, data=0x5622c33c3410) at event_filter.c:175
#2 0x00007fa58959cbdf in () at /usr/lib/libgdk-3.so.0
#3 0x00007fa58959f818 in () at /usr/lib/libgdk-3.so.0
#4 0x00007fa5895440ab in gdk_display_get_event () at /usr/lib/libgdk-3.so.0
#5 0x00007fa58959f544 in () at /usr/lib/libgdk-3.so.0
#6 0x00007fa588efc02c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#7 0x00007fa588f4fb59 in () at /usr/lib/libglib-2.0.so.0
#8 0x00007fa588efb593 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#9 0x00007fa5897e726f in gtk_main () at /usr/lib/libgtk-3.so.0
#10 0x00005622c0d6e9c2 in clientCycle (c=0x5622c2c16000, event=0x5622c33df4a0) at cycle.c:538
#11 0x00005622c0d74064 in handleKeyPress (display_info=0x5622c29f7580, event=0x5622c33df4a0) at events.c:468
#12 0x00005622c0d79c6e in handleEvent (display_info=0x5622c29f7580, event=0x5622c33df4a0) at events.c:2201
#13 0x00005622c0d7a092 in xfwm4_event_filter (event=0x5622c33df4a0, data=0x5622c29f7580) at events.c:2322
#14 0x00005622c0d72d0c in eventXfwmFilter (gdk_xevent=0x7ffe224f6940, gevent=0x5622c2908b40, data=0x5622c33c3410) at event_filter.c:175
#15 0x00007fa58959cbdf in () at /usr/lib/libgdk-3.so.0
#16 0x00007fa58959f818 in () at /usr/lib/libgdk-3.so.0
#17 0x00007fa5895440ab in gdk_display_get_event () at /usr/lib/libgdk-3.so.0
#18 0x00007fa58959f544 in () at /usr/lib/libgdk-3.so.0
#19 0x00007fa588efc02c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#20 0x00007fa588f4fb59 in () at /usr/lib/libglib-2.0.so.0
#21 0x00007fa588efb593 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#22 0x00007fa5897e726f in gtk_main () at /usr/lib/libgtk-3.so.0
#23 0x00005622c0d8bdee in main (argc=1, argv=0x7ffe224f6de8) at main.c:771
```