ignore disconnected monitors
This commit is contained in:
parent
e4b9d98daa
commit
9f9a0a50f7
48
disconnected-monitors.patch
Normal file
48
disconnected-monitors.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff -up gtk+-2.15.4/gdk/x11/gdkscreen-x11.c.disconnected gtk+-2.15.4/gdk/x11/gdkscreen-x11.c
|
||||
--- gtk+-2.15.4/gdk/x11/gdkscreen-x11.c.disconnected 2009-02-18 18:38:27.756124432 -0500
|
||||
+++ gtk+-2.15.4/gdk/x11/gdkscreen-x11.c 2009-02-18 18:38:51.904412525 -0500
|
||||
@@ -695,6 +695,9 @@ init_randr13 (GdkScreen *screen)
|
||||
/* Non RandR1.2 X driver have output name "default" */
|
||||
randr12_compat |= !g_strcmp0(output->name, "default");
|
||||
|
||||
+ if (output->connection == RR_Disconnected)
|
||||
+ continue;
|
||||
+
|
||||
if (output->crtc)
|
||||
{
|
||||
GdkX11Monitor monitor;
|
||||
@@ -705,11 +708,11 @@ init_randr13 (GdkScreen *screen)
|
||||
monitor.geometry.width = crtc->width;
|
||||
monitor.geometry.height = crtc->height;
|
||||
|
||||
- /* FIXME: fill this out properly - need EDID parser */
|
||||
monitor.output = resources->outputs[i];
|
||||
- monitor.width_mm = -1;
|
||||
- monitor.height_mm = -1;
|
||||
- monitor.output_name = NULL;
|
||||
+ monitor.width_mm = output->mm_width;
|
||||
+ monitor.height_mm = output->mm_height;
|
||||
+ monitor.output_name = g_strdup (output->name);
|
||||
+ /* FIXME: need EDID parser */
|
||||
monitor.manufacturer = NULL;
|
||||
|
||||
g_array_append_val (monitors, monitor);
|
||||
@@ -995,7 +998,8 @@ _gdk_x11_screen_size_changed (GdkScreen
|
||||
return;
|
||||
|
||||
_gdk_x11_screen_process_monitors_change (screen);
|
||||
- g_signal_emit_by_name (screen, "size_changed");
|
||||
+
|
||||
+ g_signal_emit_by_name (screen, "size-changed");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1003,7 +1007,7 @@ _gdk_x11_screen_process_monitors_change
|
||||
{
|
||||
init_multihead (screen);
|
||||
|
||||
- g_signal_emit_by_name (screen, "monitors_changed");
|
||||
+ g_signal_emit_by_name (screen, "monitors-changed");
|
||||
}
|
||||
|
||||
void
|
@ -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.15/gtk+-%{version}.tar.bz2
|
||||
@ -30,6 +30,8 @@ Patch0: gtk+-2.13.5-lib64.patch
|
||||
Patch2: workaround.patch
|
||||
# http://bugzilla.redhat.com/show_bug.cgi?id=478400
|
||||
Patch3: default_printer.patch
|
||||
# from upstream
|
||||
Patch4: disconnected-monitors.patch
|
||||
|
||||
BuildRequires: atk-devel >= %{atk_version}
|
||||
BuildRequires: pango-devel >= %{pango_version}
|
||||
@ -135,6 +137,7 @@ This package contains developer documentation for the GTK+ widget toolkit.
|
||||
%patch0 -p1 -b .lib64
|
||||
%patch2 -p1 -b .workaround
|
||||
%patch3 -p0 -b .default-printer
|
||||
%patch4 -p1 -b .disconnected-monitors
|
||||
|
||||
%build
|
||||
libtoolize --force --copy
|
||||
@ -334,6 +337,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 18 2009 Matthias Clasen <mclasen@redhat.com> - 2.15.4-2
|
||||
- Ignore disconnected monitors
|
||||
|
||||
* Tue Feb 17 2009 Matthias Clasen <mclasen@redhat.com> - 2.15.4-1
|
||||
- Update to 2.15.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user