diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | matchbox/core/mb-window-manager.c | 22 |
2 files changed, 28 insertions, 0 deletions
@@ -1,6 +1,12 @@ 2008-04-18 Ross Burton <ross@openedhand.com> * matchbox/core/mb-window-manager.c: + Add support for the root window resizing itself, which means RANDR has + been used. + +2008-04-18 Ross Burton <ross@openedhand.com> + + * matchbox/core/mb-window-manager.c: Only register a configure notify handler for all windows if compositing is enabled. diff --git a/matchbox/core/mb-window-manager.c b/matchbox/core/mb-window-manager.c index c2c53e1..2b18a20 100644 --- a/matchbox/core/mb-window-manager.c +++ b/matchbox/core/mb-window-manager.c @@ -586,6 +586,22 @@ mb_wm_handle_composite_config_notify (XConfigureEvent *xev, } #endif +/* + * This is called if the root window resizes itself, which happens when RANDR is + * used to resize or rotate the display. + */ +static Bool +mb_wm_handle_root_config_notify (XConfigureEvent *xev, + void *userdata) +{ + MBWindowManager * wm = (MBWindowManager*)userdata; + + wm->xdpy_width = xev->width; + wm->xdpy_height = xev->height; + + mb_wm_display_sync_queue (wm, MBWMSyncGeometry); +} + static Bool mb_wm_handle_config_request (XConfigureRequestEvent *xev, void *userdata) @@ -1587,6 +1603,12 @@ mb_window_manager_init (MBWMObject *this, va_list vap) #endif mb_wm_main_context_x_event_handler_add (wm->main_ctx, + wm->root_win->xwindow, + ConfigureNotify, + (MBWMXEventFunc)mb_wm_handle_root_config_notify, + wm); + + mb_wm_main_context_x_event_handler_add (wm->main_ctx, None, ConfigureRequest, (MBWMXEventFunc)mb_wm_handle_config_request, |