Hello community, here is the log from the commit of package metacity checked in at Thu May 22 03:39:15 CEST 2008. -------- --- GNOME/metacity/metacity.changes 2008-05-13 10:02:32.000000000 +0200 +++ metacity/metacity.changes 2008-05-22 03:01:46.149627000 +0200 @@ -1,0 +2,9 @@ +Wed May 21 19:26:20 CEST 2008 - federico@novell.com + +- Added metacity-bnc385553-buggy-intel-xinerama.diff to fix + https://bugzilla.novell.com/show_bug.cgi?id=385553 - If there are + just two overlapping monitors, make Metacity think that there is a + single big monitor. This should fix maximized windows on laptops + with buggy X drivers for Intel graphics chipsets. (bnc#385553) + +------------------------------------------------------------------- New: ---- metacity-bnc385553-buggy-intel-xinerama.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ metacity.spec ++++++ --- /var/tmp/diff_new_pack.g12507/_old 2008-05-22 03:01:58.000000000 +0200 +++ /var/tmp/diff_new_pack.g12507/_new 2008-05-22 03:01:58.000000000 +0200 @@ -16,12 +16,14 @@ License: GPL v2 or later Group: System/GUI/GNOME Version: 2.22.0 -Release: 25 +Release: 28 Summary: A Fast Window Manager for the GNOME 2.x Desktop Source: %{name}-%{version}.tar.bz2 Patch: metacity-ping-timeout.patch # PATCH-FIX-UPSTREAM metacity-bnc384159-bgo519188-window-overlaps-itself.diff bnc384159 bgo519188 federico@novell.com - Fix focus stealing logic Patch10: metacity-bnc384159-bgo519188-window-overlaps-itself.diff +# PATCH-FIX-OPENSUSE metacity-bnc385553-buggy-intel-xinerama.diff bnc385553 federico@novell.com - Sanitize overlapping (cloned) monitors from Xinerama +Patch11: metacity-bnc385553-buggy-intel-xinerama.diff Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build # Only for /usr/share/gnome directory ownership: @@ -57,6 +59,7 @@ %setup -q %patch -p1 %patch10 -p1 +%patch11 -p1 %build # needed for metacity-2.16.3: @@ -112,6 +115,12 @@ %{_libdir}/pkgconfig/*.pc %changelog +* Wed May 21 2008 federico@novell.com +- Added metacity-bnc385553-buggy-intel-xinerama.diff to fix + https://bugzilla.novell.com/show_bug.cgi?id=385553 - If there are + just two overlapping monitors, make Metacity think that there is a + single big monitor. This should fix maximized windows on laptops + with buggy X drivers for Intel graphics chipsets. (bnc#385553) * Tue May 13 2008 vuntz@suse.de - Drop metacity-windows-key-binding.patch: change the way we activate the main menu with the flag keys. Instead of relying on ++++++ metacity-bnc385553-buggy-intel-xinerama.diff ++++++ https://bugzilla.novell.com/show_bug.cgi?id=385553 On machines with Intel 915 graphics chipsets and buggy X drivers which report an always-on VGA output, Metacity doesn't maximize windows to the full size of the display. This makes Metacity consider two overlapping monitors anchored at (0, 0) to be a *single* monitor ("clone mode"); it uses the largest geometry of the monitors for the screen's purposes. diff --git a/src/core/screen.c b/src/core/screen.c index 419b537..5546d02 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -190,6 +190,86 @@ set_wm_icon_size_hint (MetaScreen *screen) } static void +xinerama_screen_info_to_rect (XineramaScreenInfo *info, MetaRectangle *r) +{ + r->x = info->x_org; + r->y = info->y_org; + r->width = info->width; + r->height = info->height; +} + +static XineramaScreenInfo +pick_biggest_geometry (XineramaScreenInfo *infos, int n_infos) +{ + long max_pixels; + int largest_index; + int i; + + max_pixels = 0; + largest_index = 0; + + for (i = 0; i < n_infos; i++) + { + long pixels; + + pixels = (long) infos[i].width * infos[i].height; + + if (pixels > max_pixels) + { + max_pixels = pixels; + largest_index = i; + } + } + + return infos[largest_index]; +} + +static void +sanitize_xinerama_infos (XineramaScreenInfo *infos, int n_infos, int *n_infos_ret) +{ + if (n_infos == 2) + { + /* https://bugzilla.novell.com/show_bug.cgi?id=310208 + * https://bugzilla.novell.com/show_bug.cgi?id=385553 + * + * The X driver for Intel 915GM chipsets has/had a bug where it would + * report that laptops started with a VGA output connected, and most + * of the time it defaults to a resolution of 1024x768. This doesn't + * match the resolution of the laptop, which these days is big and fancy. + * + * Both monitors (the VGA output's and the laptop's) *overlap* in the Xinerama + * configuration, since that is how "clone the display" is implemented. + * So, we see if there are only two monitors *and* if they intersect --- in + * that case, we can be reasonably confident that we can just pick the bigger + * monitor, which will be the laptop's display. + * + * This shouldn't break real setups with "make a big screen out of two monitors", + * since those monitors don't overlap in the Xinerama configuration. + * + * To summarize: in the case of just two overlapping monitors ("laptop + * plus cloned external display"), we simulate that we have only *one* monitor. + */ + + MetaRectangle a, b, dummy; + + xinerama_screen_info_to_rect (infos, &a); + xinerama_screen_info_to_rect (infos + 1, &b); + + if (meta_rectangle_intersect (&a, &b, &dummy) + && a.x == 0 && a.y == 0 + && b.x == 0 && b.y == 0) + { + XineramaScreenInfo biggest; + + biggest = pick_biggest_geometry (infos, n_infos); + + infos[0] = biggest; + *n_infos_ret = 1; + } + } +} + +static void reload_xinerama_infos (MetaScreen *screen) { MetaDisplay *display; @@ -228,6 +308,7 @@ reload_xinerama_infos (MetaScreen *screen) n_infos = 0; infos = XineramaQueryScreens (display->xdisplay, &n_infos); + sanitize_xinerama_infos (infos, n_infos, &n_infos); meta_topic (META_DEBUG_XINERAMA, "Found %d Xinerama screens on display %s\n", ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de