diff options
author | Havoc Pennington <hp@redhat.com> | 2002-10-04 18:31:54 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-10-04 18:31:54 +0000 |
commit | 9de7b59e93787a8d4562f4f2042b8da685033a66 (patch) | |
tree | 28f03f6d5169cce9df86c45e8ccdd560b7b61c16 | |
parent | 038814990423d88ac4638acfbac2547990f029d0 (diff) | |
download | metacity-9de7b59e93787a8d4562f4f2042b8da685033a66.tar.gz metacity-9de7b59e93787a8d4562f4f2042b8da685033a66.tar.bz2 |
do XRRUpdateConfiguration() if we have RandR extension, else poke in
2002-10-04 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): do XRRUpdateConfiguration()
if we have RandR extension, else poke in Xlib's screen struct to
update the screen size.
* configure.in: fix a bogus overwrite of cppflags,
add a check for RandR extension
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | configure.in | 11 | ||||
-rw-r--r-- | src/display.c | 20 |
4 files changed, 42 insertions, 9 deletions
@@ -1,8 +1,19 @@ +2002-10-04 Havoc Pennington <hp@redhat.com> + + * src/display.c (event_callback): do XRRUpdateConfiguration() + if we have RandR extension, else poke in Xlib's screen struct to + update the screen size. + + * configure.in: fix a bogus overwrite of cppflags, + add a check for RandR extension + 2002-10-04 Arvind Samptur <arvind.samptur@wipro.com> - * src/window.c (meta_window_change_workspace): call meta_window_unstick - before adding window to workspace. - (menu_callback): call meta_workspace_activate before meta_window_change_workspace. - This would avoid us running an extra loop for determining the window workspace list. + + * src/window.c (meta_window_change_workspace): call + meta_window_unstick before adding window to workspace. + (menu_callback): call meta_workspace_activate before + meta_window_change_workspace. This would avoid us running an + extra loop for determining the window workspace list. Patches from Jeyasudha and Arvind. Fixes #92575 @@ -14,3 +14,4 @@ #undef HAVE_SOLARIS_XINERAMA #undef HAVE_XFREE_XINERAMA #undef HAVE_SHAPE +#undef HAVE_RANDR diff --git a/configure.in b/configure.in index fb87513..9c6168b 100644 --- a/configure.in +++ b/configure.in @@ -160,7 +160,16 @@ if test "$found_shape" = "true"; then AC_DEFINE(HAVE_SHAPE) fi -CPPFLAGS="$save_CPPFLAGS" +RANDR_LIBS= +found_randr=false +AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, + [AC_CHECK_HEADERS(X11/extensions/Xrandr.h, + RANDR_LIBS=-lXrandr found_randr=true)], + , -lXrender $ALL_X_LIBS) + +if test "$found_randr" = "true"; then + AC_DEFINE(HAVE_RANDR) +fi METACITY_LIBS="$SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS" METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS" diff --git a/src/display.c b/src/display.c index 907b3c9..dc9cbaf 100644 --- a/src/display.c +++ b/src/display.c @@ -1395,13 +1395,25 @@ event_callback (XEvent *event, /* Handle screen resize */ { MetaScreen *screen; - + screen = meta_display_screen_for_root (display, event->xconfigure.window); + if (screen != NULL) - meta_screen_resize (screen, - event->xconfigure.width, - event->xconfigure.height); + { +#ifdef HAVE_RANDR + /* do the resize the official way */ + XRRUpdateConfiguration (event); +#else + /* poke around in Xlib */ + screen->xscreen->width = event->xconfigure.width; + screen->xscreen->height = event->xconfigure.height; +#endif + + meta_screen_resize (screen, + event->xconfigure.width, + event->xconfigure.height); + } } break; case ConfigureRequest: |