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
This commit is contained in:
Havoc Pennington 2002-10-04 18:31:54 +00:00 committed by Havoc Pennington
parent 0388149904
commit 9de7b59e93
4 changed files with 42 additions and 9 deletions

View File

@ -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> 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. * src/window.c (meta_window_change_workspace): call
(menu_callback): call meta_workspace_activate before meta_window_change_workspace. meta_window_unstick before adding window to workspace.
This would avoid us running an extra loop for determining the window workspace list. (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 Patches from Jeyasudha and Arvind. Fixes #92575

View File

@ -14,3 +14,4 @@
#undef HAVE_SOLARIS_XINERAMA #undef HAVE_SOLARIS_XINERAMA
#undef HAVE_XFREE_XINERAMA #undef HAVE_XFREE_XINERAMA
#undef HAVE_SHAPE #undef HAVE_SHAPE
#undef HAVE_RANDR

View File

@ -160,7 +160,16 @@ if test "$found_shape" = "true"; then
AC_DEFINE(HAVE_SHAPE) AC_DEFINE(HAVE_SHAPE)
fi 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_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" METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"

View File

@ -1395,13 +1395,25 @@ event_callback (XEvent *event,
/* Handle screen resize */ /* Handle screen resize */
{ {
MetaScreen *screen; MetaScreen *screen;
screen = meta_display_screen_for_root (display, screen = meta_display_screen_for_root (display,
event->xconfigure.window); event->xconfigure.window);
if (screen != NULL) if (screen != NULL)
meta_screen_resize (screen, {
event->xconfigure.width, #ifdef HAVE_RANDR
event->xconfigure.height); /* 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; break;
case ConfigureRequest: case ConfigureRequest: