small xrandr fix

This commit is contained in:
Matthias Clasen 2008-10-22 14:58:23 +00:00
parent f2cf6af372
commit bee8675f8a
2 changed files with 33 additions and 1 deletions

View File

@ -16,7 +16,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: %{base_version}
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gtk+/2.14/gtk+-%{version}.tar.bz2
@ -30,6 +30,8 @@ Patch1: gtk+-2.11.1-set-invisible-char-to-bullet.patch
# a workaround for some brokenness in the flash plugin
# see http://bugzilla.gnome.org/show_bug.cgi?id=463773
Patch2: workaround.patch
# from upstream
Patch3: randr-fix.patch
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
@ -116,6 +118,7 @@ docs for the GTK+ widget toolkit.
%patch0 -p1 -b .lib64
%patch1 -p1 -b .set-invisible-char-to-bullet
%patch2 -p1 -b .workaround
%patch3 -p1 -b .randr-fix
for i in config.guess config.sub ; do
test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .
@ -297,6 +300,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-2.0
%changelog
* Wed Oct 22 2008 Matthias Clasen <mclasen@redhat.com> - 2.14.4-2
- Don't emit size-changed signals if the screen size doesn't change
* Fri Oct 17 2008 Matthias Clasen <mclasen@redhat.com> - 2.14.4-1
- Update to 2.14.4

26
randr-fix.patch Normal file
View File

@ -0,0 +1,26 @@
diff -up gtk+-2.14.4/gdk/x11/gdkscreen-x11.c.randr-fix gtk+-2.14.4/gdk/x11/gdkscreen-x11.c
--- gtk+-2.14.4/gdk/x11/gdkscreen-x11.c.randr-fix 2008-10-22 00:57:46.000000000 -0400
+++ gtk+-2.14.4/gdk/x11/gdkscreen-x11.c 2008-10-22 00:59:18.000000000 -0400
@@ -894,6 +894,11 @@ void
_gdk_x11_screen_size_changed (GdkScreen *screen,
XEvent *event)
{
+ gint width, height;
+
+ width = gdk_screen_get_width (screen);
+ height = gdk_screen_get_height (screen);
+
#ifdef HAVE_RANDR
if (!XRRUpdateConfiguration (event))
return;
@@ -909,6 +914,10 @@ _gdk_x11_screen_size_changed (GdkScreen
else
return;
#endif
+
+ if (gdk_screen_get_width (screen) == width &&
+ gdk_screen_get_height (screen) == height)
+ return;
_gdk_x11_screen_process_monitors_change (screen);
g_signal_emit_by_name (screen, "size_changed");