GNOME Bugzilla – Bug 316700
"un-" fullscreen window state change not detected
Last modified: 2005-09-19 16:23:43 UTC
Please describe the problem: libwnck fullscreen state is sometimes wrong. It reports e.g. totem as fullscreen when totem returned from fullscreen already. This seems to be cause by the fact that un-fullscreen events are not deteced. Steps to reproduce: 1. change test-wnck.c so that it reports fullscreen state changes as well to the terminal (see attached patch) 2. run test-wnck 3. start totem 4. switch with totem to fullscreen mode 5. switch back to normal mode Actual results: test-wnck reports: ---------------------8<------------------ Active window changed Stacking changed Stacking changed Geometry changed on window 'Totem Movie Player': 0,0 1280 x 1024 State changed on window 'Totem Movie Player' fullscreen = 1 Geometry changed on window 'Totem Movie Player': 674,537 598 x 441 Geometry changed on window 'Bottom Edge Panel': 928,999 185 x 25 Geometry changed on window 'Top Expanded Edge Panel': 0,0 1280 x 26 ---------------------8<------------------ Expected results: It should report a state change for the fullscreen state two times, once when it enters fullscreen and once when it leaves fullscreen. Does this happen every time? yes Other information: Patch to show fullscreen states in libwnck: --- test-wnck.c.orig 2005-09-19 15:18:01.000000000 +0200 +++ test-wnck.c 2005-09-19 15:18:51.000000000 +0200 @@ -274,6 +274,9 @@ if (changed & WNCK_WINDOW_STATE_STICKY) g_print (" sticky = %d\n", wnck_window_is_sticky (window)); + if (changed & WNCK_WINDOW_STATE_FULLSCREEN) + g_print (" fullscreen = %d\n", wnck_window_is_fullscreen (window)); + g_assert ( ((new & WNCK_WINDOW_STATE_MINIMIZED) != 0) == wnck_window_is_minimized (window) ); g_assert ( ((new & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) != 0) ==
Cool, thanks for making the testcase really easy. That made finding the problem fairly simple. 2005-09-19 Elijah Newren <newren@gmail.com> Fix lack of detection of removal from fullscreen state; part of the patch from Michael Vogt. Fixes #316700. * libwnck/window.c (update_state): don't forget to initialize window->priv->is_fullscreen to FALSE. * libwnck/test-wnck.c (window_state_changed_callback): Notify about fullscreen state changes too