This commit is contained in:
parent
333355bb75
commit
c690d19bb7
@ -1219,10 +1219,10 @@ index 0000000..f9ab2c9
|
||||
+#endif
|
||||
diff --git a/libgnome-desktop/monitor-db.c b/libgnome-desktop/monitor-db.c
|
||||
new file mode 100644
|
||||
index 0000000..1a293fb
|
||||
index 0000000..a9b064d
|
||||
--- /dev/null
|
||||
+++ b/libgnome-desktop/monitor-db.c
|
||||
@@ -0,0 +1,1315 @@
|
||||
@@ -0,0 +1,1292 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <glib.h>
|
||||
@ -1262,6 +1262,12 @@ index 0000000..1a293fb
|
||||
+ return strtol (text, NULL, 0);
|
||||
+}
|
||||
+
|
||||
+static guint
|
||||
+parse_uint (const char *text)
|
||||
+{
|
||||
+ return strtoul (text, NULL, 0);
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+stack_is (Parser *parser,
|
||||
+ const char *s1,
|
||||
@ -1416,7 +1422,7 @@ index 0000000..1a293fb
|
||||
+ {
|
||||
+ parser->output->connected = TRUE;
|
||||
+
|
||||
+ parser->output->serial = parse_int (text);
|
||||
+ parser->output->serial = parse_uint (text);
|
||||
+ }
|
||||
+ else if (stack_is (parser, "width", "output", "configuration", NULL))
|
||||
+ {
|
||||
@ -1605,9 +1611,10 @@ index 0000000..1a293fb
|
||||
+ MonitorInfo *info = NULL;
|
||||
+
|
||||
+ if (edid_data)
|
||||
+ {
|
||||
+ info = decode_edid (edid_data);
|
||||
+
|
||||
+
|
||||
+ if (info)
|
||||
+ {
|
||||
+ memcpy (output->vendor, info->manufacturer_code,
|
||||
+ sizeof (output->vendor));
|
||||
+
|
||||
@ -2110,8 +2117,6 @@ index 0000000..1a293fb
|
||||
+ CrtcAssignment *assignment;
|
||||
+ Output **outputs;
|
||||
+
|
||||
+ g_print ("applying configuration. Clone: %s\n", yes_no (conf->clone));
|
||||
+
|
||||
+ outputs = make_outputs (conf);
|
||||
+
|
||||
+ assignment = crtc_assignment_new (screen, outputs);
|
||||
@ -2126,10 +2131,6 @@ index 0000000..1a293fb
|
||||
+
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_print (" ... no assignment found\n");
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
@ -2144,6 +2145,9 @@ index 0000000..1a293fb
|
||||
+ Configuration *found;
|
||||
+ gboolean result;
|
||||
+
|
||||
+ if (!screen)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ rw_screen_refresh (screen);
|
||||
+
|
||||
+ current = configuration_new_current (screen);
|
||||
@ -2291,38 +2295,12 @@ index 0000000..1a293fb
|
||||
+ RWCrtc *crtc = key;
|
||||
+ CrtcInfo *info = value;
|
||||
+
|
||||
+ g_print ("Configuring crtc %x with ", rw_crtc_get_id (crtc));
|
||||
+
|
||||
+ if (info->mode)
|
||||
+ {
|
||||
+ int n_outputs = info->outputs->len;
|
||||
+
|
||||
+ g_print ("mode %x, %d outputs (%d %d %d %d), and rotation %d ",
|
||||
+ rw_mode_get_id (info->mode),
|
||||
+ n_outputs,
|
||||
+ info->x, info->y,
|
||||
+ rw_mode_get_width (info->mode),
|
||||
+ rw_mode_get_height (info->mode),
|
||||
+ info->rotation);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_print ("no mode ");
|
||||
+ }
|
||||
+
|
||||
+ if (rw_crtc_set_config (crtc,
|
||||
+ info->x, info->y,
|
||||
+ info->mode,
|
||||
+ info->rotation,
|
||||
+ (RWOutput **)info->outputs->pdata,
|
||||
+ info->outputs->len))
|
||||
+ {
|
||||
+ g_print ("succeeded\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_print ("failed\n");
|
||||
+ }
|
||||
+ rw_crtc_set_config (crtc,
|
||||
+ info->x, info->y,
|
||||
+ info->mode,
|
||||
+ info->rotation,
|
||||
+ (RWOutput **)info->outputs->pdata,
|
||||
+ info->outputs->len);
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
@ -2331,7 +2309,6 @@ index 0000000..1a293fb
|
||||
+ if ((info->rotation & RW_ROTATION_270) ||
|
||||
+ (info->rotation & RW_ROTATION_90))
|
||||
+ {
|
||||
+ g_print ("rotated: %d\n", info->rotation);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
@ -2540,10 +2517,10 @@ index 0000000..1a293fb
|
||||
+}
|
||||
diff --git a/libgnome-desktop/randrwrap.c b/libgnome-desktop/randrwrap.c
|
||||
new file mode 100644
|
||||
index 0000000..2cc0e72
|
||||
index 0000000..6b4cecb
|
||||
--- /dev/null
|
||||
+++ b/libgnome-desktop/randrwrap.c
|
||||
@@ -0,0 +1,1177 @@
|
||||
@@ -0,0 +1,1195 @@
|
||||
+#include "libgnomeui/randrwrap.h"
|
||||
+#include <string.h>
|
||||
+#include <X11/Xlib.h>
|
||||
@ -2757,11 +2734,23 @@ index 0000000..2cc0e72
|
||||
+ g_assert (xdisplay != NULL);
|
||||
+ g_assert (info != NULL);
|
||||
+
|
||||
+ XRRGetScreenSizeRange (xdisplay, xroot,
|
||||
+ &(info->min_width),
|
||||
+ &(info->min_height),
|
||||
+ &(info->max_width),
|
||||
+ &(info->max_height));
|
||||
+ gdk_error_trap_push ();
|
||||
+
|
||||
+ if (!XRRGetScreenSizeRange (xdisplay, xroot,
|
||||
+ &(info->min_width),
|
||||
+ &(info->min_height),
|
||||
+ &(info->max_width),
|
||||
+ &(info->max_height))) {
|
||||
+ /* XRR caught an error */
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+ gdk_flush ();
|
||||
+ if (gdk_error_trap_pop ())
|
||||
+ {
|
||||
+ /* Unhandled X Error was generated */
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+#if 0
|
||||
+ g_print ("ranges: %d - %d; %d - %d\n",
|
||||
@ -2925,6 +2914,9 @@ index 0000000..2cc0e72
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
+}
|
||||
+
|
||||
+/* Returns NULL if screen could not be created. For instance, if driver
|
||||
+ * does not support Xrandr 1.2.
|
||||
+ */
|
||||
+RWScreen *
|
||||
+rw_screen_new (GdkScreen *gdk_screen,
|
||||
+ RWScreenChanged callback,
|
||||
@ -2950,6 +2942,9 @@ index 0000000..2cc0e72
|
||||
+ screen->randr_event_base = event_base;
|
||||
+
|
||||
+ screen->info = screen_info_new (screen);
|
||||
+
|
||||
+ if (!screen->info)
|
||||
+ return NULL;
|
||||
+
|
||||
+ XRRSelectInput (screen->xdisplay,
|
||||
+ screen->xroot,
|
||||
@ -3150,7 +3145,7 @@ index 0000000..2cc0e72
|
||||
+
|
||||
+ g_print ("Output %lx Timestamp: %u\n", output->id, (guint32)info->timestamp);
|
||||
+
|
||||
+ if (!info)
|
||||
+ if (!info || !output->info)
|
||||
+ {
|
||||
+ /* FIXME */
|
||||
+ return;
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 23:23:17 CEST 2008 - federico@novell.com
|
||||
|
||||
- Updated gnome-desktop-randr-1.2.diff with bugfixes from Fedora and Ubuntu.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 29 17:41:00 CEST 2008 - cthiel@suse.de
|
||||
|
||||
|
@ -17,7 +17,7 @@ License: GNU Free Documentation License, Version 1.1 (GFDL 1.1); GPL v2 o
|
||||
Group: System/GUI/GNOME
|
||||
Obsoletes: gnome-core
|
||||
Version: 2.22.1
|
||||
Release: 11
|
||||
Release: 15
|
||||
Summary: The GNOME Desktop API Library
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Url: http://www.gnome.org
|
||||
@ -182,6 +182,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/gtk-doc/html/gnome-desktop
|
||||
|
||||
%changelog
|
||||
* Thu May 08 2008 federico@novell.com
|
||||
- Updated gnome-desktop-randr-1.2.diff with bugfixes from Fedora and Ubuntu.
|
||||
* Tue Apr 29 2008 cthiel@suse.de
|
||||
- obsolete gnome-desktop-<arch> via baselibs.conf
|
||||
* Fri Apr 25 2008 federico@novell.com
|
||||
|
Loading…
Reference in New Issue
Block a user