diff --git a/ChangeLog b/ChangeLog index 9acae0eec..f8be5bdb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,19 @@ +2002-10-04 Havoc Pennington + + * 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 - * 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 diff --git a/acconfig.h b/acconfig.h index faccda079..3d823e363 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 fb8751323..9c6168be2 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 907b3c91d..dc9cbaf2b 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: