2.23.1.1
This commit is contained in:
parent
9191d90fc5
commit
338db4d78e
@ -1,7 +1,7 @@
|
||||
diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c
|
||||
--- gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 2008-03-24 17:21:50.000000000 -0400
|
||||
+++ gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c 2008-04-05 12:42:41.000000000 -0400
|
||||
@@ -35,15 +35,33 @@
|
||||
diff -up gnome-settings-daemon-2.23.1.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 gnome-settings-daemon-2.23.1.1/plugins/xrandr/gsd-xrandr-manager.c
|
||||
--- gnome-settings-daemon-2.23.1.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 2008-04-23 06:38:37.000000000 -0400
|
||||
+++ gnome-settings-daemon-2.23.1.1/plugins/xrandr/gsd-xrandr-manager.c 2008-04-26 14:57:00.000000000 -0400
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
@ -13,11 +13,10 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
|
||||
#ifdef HAVE_RANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
@@ -48,6 +51,22 @@
|
||||
#define HOST_NAME_MAX 255
|
||||
#endif
|
||||
|
||||
-#include "gnome-settings-profile.h"
|
||||
#include "gsd-xrandr-manager.h"
|
||||
|
||||
+#define GSD_XRANDR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerPrivate))
|
||||
+
|
||||
+#define VIDEO_KEYSYM "XF86Display"
|
||||
@ -37,7 +36,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
static void gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass);
|
||||
static void gsd_xrandr_manager_init (GsdXrandrManager *xrandr_manager);
|
||||
static void gsd_xrandr_manager_finalize (GObject *object);
|
||||
@@ -52,252 +70,74 @@ G_DEFINE_TYPE (GsdXrandrManager, gsd_xra
|
||||
@@ -56,248 +75,74 @@ G_DEFINE_TYPE (GsdXrandrManager, gsd_xra
|
||||
|
||||
static gpointer manager_object = NULL;
|
||||
|
||||
@ -105,6 +104,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
- if (sscanf (val, "%dx%d", &w, &h) != 2) {
|
||||
- g_free (val);
|
||||
- return -1;
|
||||
- }
|
||||
+static GdkFilterReturn
|
||||
+on_client_message (GdkXEvent *xevent,
|
||||
+ GdkEvent *event,
|
||||
@ -115,19 +115,16 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
+
|
||||
+ if (ev->type == ClientMessage &&
|
||||
+ ev->xclient.message_type == gnome_randr_xatom()) {
|
||||
+
|
||||
+ configuration_apply_stored (screen);
|
||||
+
|
||||
+ return GDK_FILTER_REMOVE;
|
||||
}
|
||||
-
|
||||
|
||||
- g_free (val);
|
||||
-
|
||||
+ configuration_apply_stored (screen);
|
||||
|
||||
- *width = w;
|
||||
- *height = h;
|
||||
-
|
||||
+ return GDK_FILTER_REMOVE;
|
||||
+ }
|
||||
|
||||
- return i;
|
||||
+
|
||||
+ /* Pass the event on to GTK+ */
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
@ -157,12 +154,17 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
- if (error == NULL) {
|
||||
- return val;
|
||||
- }
|
||||
-
|
||||
- g_error_free (error);
|
||||
+ /* verify we have a key event */
|
||||
+ if (xev->xany.type != KeyPress && xev->xany.type != KeyRelease)
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
|
||||
- g_error_free (error);
|
||||
+ if (xev->xkey.keycode == manager->priv->keycode) {
|
||||
+ /* FIXME: here we should cycle between valid
|
||||
+ * configurations, and save them
|
||||
+ */
|
||||
+ configuration_apply_stored (manager->priv->rw_screen);
|
||||
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
@ -188,14 +190,9 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
- closest_width = sizes[i].width;
|
||||
- closest_height = sizes[i].height;
|
||||
- }
|
||||
+ if (xev->xkey.keycode == manager->priv->keycode) {
|
||||
+ /* FIXME: here we should cycle between valid
|
||||
+ * configurations, and save them
|
||||
+ */
|
||||
+ configuration_apply_stored (manager->priv->rw_screen);
|
||||
+
|
||||
- }
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
+ }
|
||||
|
||||
- return closest;
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
@ -221,11 +218,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
- int height;
|
||||
- int rate;
|
||||
- int rotation;
|
||||
-#ifdef HOST_NAME_MAX
|
||||
- char hostname[HOST_NAME_MAX + 1];
|
||||
-#else
|
||||
- char hostname[256];
|
||||
-#endif
|
||||
- char *specific_path;
|
||||
- char *keys[3];
|
||||
- int i;
|
||||
@ -316,10 +309,10 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
- XRRFreeScreenConfigInfo (config);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- g_free (specific_path);
|
||||
+ GsdXrandrManager *manager = data;
|
||||
|
||||
- g_free (specific_path);
|
||||
-
|
||||
- /* We need to make sure we process the screen resize event. */
|
||||
- gdk_display_sync (display);
|
||||
-
|
||||
@ -341,7 +334,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -306,8 +146,30 @@ gsd_xrandr_manager_start (GsdXrandrManag
|
||||
@@ -306,8 +151,30 @@ gsd_xrandr_manager_start (GsdXrandrManag
|
||||
{
|
||||
g_debug ("Starting xrandr manager");
|
||||
|
||||
@ -374,7 +367,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -315,6 +177,16 @@ void
|
||||
@@ -315,6 +182,16 @@ void
|
||||
gsd_xrandr_manager_stop (GsdXrandrManager *manager)
|
||||
{
|
||||
g_debug ("Stopping xrandr manager");
|
||||
@ -391,7 +384,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -388,11 +260,22 @@ gsd_xrandr_manager_class_init (GsdXrandr
|
||||
@@ -388,11 +265,22 @@ gsd_xrandr_manager_class_init (GsdXrandr
|
||||
object_class->constructor = gsd_xrandr_manager_constructor;
|
||||
object_class->dispose = gsd_xrandr_manager_dispose;
|
||||
object_class->finalize = gsd_xrandr_manager_finalize;
|
||||
@ -414,7 +407,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -405,6 +288,8 @@ gsd_xrandr_manager_finalize (GObject *ob
|
||||
@@ -405,6 +293,8 @@ gsd_xrandr_manager_finalize (GObject *ob
|
||||
|
||||
xrandr_manager = GSD_XRANDR_MANAGER (object);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user