drop unused patches
This commit is contained in:
parent
86d51863f1
commit
24cdbadfb5
@ -1,49 +0,0 @@
|
|||||||
From b7926c7bada91a333e2c49da83808589191b8a8f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Colin Walters <walters@verbum.org>
|
|
||||||
Date: Fri, 7 May 2010 11:10:42 -0400
|
|
||||||
Subject: [PATCH] Explicitly add -lXext -lXau to linker line
|
|
||||||
|
|
||||||
Newer versions of GCC require all libraries to be explicitly
|
|
||||||
specified.
|
|
||||||
|
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=583618
|
|
||||||
---
|
|
||||||
configure.in | 1 +
|
|
||||||
gnome-session/Makefile.am | 2 ++
|
|
||||||
2 files changed, 3 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.in b/configure.in
|
|
||||||
index dcc2344..ef7c6dd 100644
|
|
||||||
--- a/configure.in
|
|
||||||
+++ b/configure.in
|
|
||||||
@@ -73,6 +73,7 @@ PKG_CHECK_MODULES(COMPAT,
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(SM, sm)
|
|
||||||
PKG_CHECK_MODULES(ICE, ice)
|
|
||||||
+PKG_CHECK_MODULES(XEXT, xext xau)
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
|
|
||||||
PKG_CHECK_MODULES(GCONF, gconf-2.0)
|
|
||||||
diff --git a/gnome-session/Makefile.am b/gnome-session/Makefile.am
|
|
||||||
index 5508f2e..120505c 100644
|
|
||||||
--- a/gnome-session/Makefile.am
|
|
||||||
+++ b/gnome-session/Makefile.am
|
|
||||||
@@ -14,6 +14,7 @@ INCLUDES = \
|
|
||||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
|
||||||
$(SM_CFLAGS) \
|
|
||||||
$(ICE_CFLAGS) \
|
|
||||||
+ $(XEXT_CFLAGS) \
|
|
||||||
$(GNOME_SESSION_CFLAGS) \
|
|
||||||
$(GCONF_CFLAGS) \
|
|
||||||
-I$(top_srcdir)/egg \
|
|
||||||
@@ -51,6 +52,7 @@ gnome_session_LDADD = \
|
|
||||||
$(GCONF_LIBS) \
|
|
||||||
$(XRENDER_LIBS) \
|
|
||||||
$(XTEST_LIBS) \
|
|
||||||
+ $(XEXT_LIBS) \
|
|
||||||
$(EXECINFO_LIBS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.0.1
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
diff -up gnome-session-2.31.6/capplet/gsm-app-dialog.c.drop-set-has-separator gnome-session-2.31.6/capplet/gsm-app-dialog.c
|
|
||||||
--- gnome-session-2.31.6/capplet/gsm-app-dialog.c.drop-set-has-separator 2010-09-21 12:50:26.848074283 -0400
|
|
||||||
+++ gnome-session-2.31.6/capplet/gsm-app-dialog.c 2010-09-21 12:50:40.278014938 -0400
|
|
||||||
@@ -177,7 +177,6 @@ setup_dialog (GsmAppDialog *dialog)
|
|
||||||
gtk_container_add (GTK_CONTAINER (content_area), widget);
|
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
|
|
||||||
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
|
|
||||||
gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties");
|
|
||||||
|
|
||||||
g_object_set (dialog,
|
|
||||||
diff -up gnome-session-2.31.6/capplet/gsm-properties-dialog.c.drop-set-has-separator gnome-session-2.31.6/capplet/gsm-properties-dialog.c
|
|
||||||
--- gnome-session-2.31.6/capplet/gsm-properties-dialog.c.drop-set-has-separator 2010-09-21 12:50:16.859117448 -0400
|
|
||||||
+++ gnome-session-2.31.6/capplet/gsm-properties-dialog.c 2010-09-21 12:50:34.823038507 -0400
|
|
||||||
@@ -787,7 +787,6 @@ gsm_properties_dialog_init (GsmPropertie
|
|
||||||
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
|
|
||||||
gtk_box_set_spacing (GTK_BOX (content_area), 2);
|
|
||||||
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
|
|
||||||
gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties");
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dialog), _("Startup Applications Preferences"));
|
|
||||||
}
|
|
||||||
diff -up gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c.drop-set-has-separator gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c
|
|
||||||
--- gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c.drop-set-has-separator 2010-09-21 12:49:30.277323771 -0400
|
|
||||||
+++ gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c 2010-09-21 12:49:30.280323758 -0400
|
|
||||||
@@ -1120,7 +1120,6 @@ gsm_inhibit_dialog_init (GsmInhibitDialo
|
|
||||||
gtk_container_add (GTK_CONTAINER (content_area), widget);
|
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
|
|
||||||
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
|
|
||||||
gtk_window_set_icon_name (GTK_WINDOW (dialog), "system-log-out");
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dialog), "");
|
|
||||||
g_object_set (dialog,
|
|
@ -1,241 +0,0 @@
|
|||||||
diff -up gnome-session-2.31.6/gnome-session/gs-idle-monitor.c.gdk-display-fix gnome-session-2.31.6/gnome-session/gs-idle-monitor.c
|
|
||||||
--- gnome-session-2.31.6/gnome-session/gs-idle-monitor.c.gdk-display-fix 2010-09-21 12:42:28.181187473 -0400
|
|
||||||
+++ gnome-session-2.31.6/gnome-session/gs-idle-monitor.c 2010-09-21 12:46:35.594095313 -0400
|
|
||||||
@@ -141,16 +141,16 @@ send_fake_event (GSIdleMonitor *monitor)
|
|
||||||
|
|
||||||
g_debug ("GSIdleMonitor: sending fake key");
|
|
||||||
|
|
||||||
- XLockDisplay (GDK_DISPLAY());
|
|
||||||
- XTestFakeKeyEvent (GDK_DISPLAY(),
|
|
||||||
+ XLockDisplay (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
||||||
+ XTestFakeKeyEvent (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
|
||||||
*monitor->priv->keycode,
|
|
||||||
True,
|
|
||||||
CurrentTime);
|
|
||||||
- XTestFakeKeyEvent (GDK_DISPLAY(),
|
|
||||||
+ XTestFakeKeyEvent (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
|
||||||
*monitor->priv->keycode,
|
|
||||||
False,
|
|
||||||
CurrentTime);
|
|
||||||
- XUnlockDisplay (GDK_DISPLAY());
|
|
||||||
+ XUnlockDisplay (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
||||||
|
|
||||||
/* Swap the keycode */
|
|
||||||
if (monitor->priv->keycode == &monitor->priv->keycode1) {
|
|
||||||
@@ -249,7 +249,7 @@ init_xsync (GSIdleMonitor *monitor)
|
|
||||||
int ncounters;
|
|
||||||
XSyncSystemCounter *counters;
|
|
||||||
|
|
||||||
- res = XSyncQueryExtension (GDK_DISPLAY (),
|
|
||||||
+ res = XSyncQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
|
||||||
&monitor->priv->sync_event_base,
|
|
||||||
&sync_error_base);
|
|
||||||
if (! res) {
|
|
||||||
@@ -257,13 +257,13 @@ init_xsync (GSIdleMonitor *monitor)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- res = XSyncInitialize (GDK_DISPLAY (), &major, &minor);
|
|
||||||
+ res = XSyncInitialize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor);
|
|
||||||
if (! res) {
|
|
||||||
g_warning ("GSIdleMonitor: Unable to initialize Sync extension");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- counters = XSyncListSystemCounters (GDK_DISPLAY (), &ncounters);
|
|
||||||
+ counters = XSyncListSystemCounters (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &ncounters);
|
|
||||||
for (i = 0; i < ncounters; i++) {
|
|
||||||
if (counters[i].name != NULL
|
|
||||||
&& strcmp (counters[i].name, "IDLETIME") == 0) {
|
|
||||||
@@ -289,23 +289,23 @@ _init_xtest (GSIdleMonitor *monitor)
|
|
||||||
#ifdef HAVE_XTEST
|
|
||||||
int a, b, c, d;
|
|
||||||
|
|
||||||
- XLockDisplay (GDK_DISPLAY());
|
|
||||||
- monitor->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY(), &a, &b, &c, &d) == True);
|
|
||||||
+ XLockDisplay (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
||||||
+ monitor->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &a, &b, &c, &d) == True);
|
|
||||||
if (monitor->priv->have_xtest) {
|
|
||||||
- monitor->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L);
|
|
||||||
+ monitor->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XK_Alt_L);
|
|
||||||
if (monitor->priv->keycode1 == 0) {
|
|
||||||
g_warning ("keycode1 not existant");
|
|
||||||
}
|
|
||||||
- monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_R);
|
|
||||||
+ monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XK_Alt_R);
|
|
||||||
if (monitor->priv->keycode2 == 0) {
|
|
||||||
- monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L);
|
|
||||||
+ monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XK_Alt_L);
|
|
||||||
if (monitor->priv->keycode2 == 0) {
|
|
||||||
g_warning ("keycode2 not existant");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
monitor->priv->keycode = &monitor->priv->keycode1;
|
|
||||||
}
|
|
||||||
- XUnlockDisplay (GDK_DISPLAY());
|
|
||||||
+ XUnlockDisplay (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
||||||
#endif /* HAVE_XTEST */
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -379,10 +379,10 @@ idle_monitor_watch_free (GSIdleMonitorWa
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (watch->xalarm_positive != None) {
|
|
||||||
- XSyncDestroyAlarm (GDK_DISPLAY (), watch->xalarm_positive);
|
|
||||||
+ XSyncDestroyAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), watch->xalarm_positive);
|
|
||||||
}
|
|
||||||
if (watch->xalarm_negative != None) {
|
|
||||||
- XSyncDestroyAlarm (GDK_DISPLAY (), watch->xalarm_negative);
|
|
||||||
+ XSyncDestroyAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), watch->xalarm_negative);
|
|
||||||
}
|
|
||||||
g_slice_free (GSIdleMonitorWatch, watch);
|
|
||||||
}
|
|
||||||
@@ -452,22 +452,22 @@ _xsync_alarm_set (GSIdleMonitor *mo
|
|
||||||
if (watch->xalarm_positive != None) {
|
|
||||||
g_debug ("GSIdleMonitor: updating alarm for positive transition wait=%lld",
|
|
||||||
_xsyncvalue_to_int64 (attr.trigger.wait_value));
|
|
||||||
- XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_positive, flags, &attr);
|
|
||||||
+ XSyncChangeAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), watch->xalarm_positive, flags, &attr);
|
|
||||||
} else {
|
|
||||||
g_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld",
|
|
||||||
_xsyncvalue_to_int64 (attr.trigger.wait_value));
|
|
||||||
- watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
|
|
||||||
+ watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), flags, &attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
attr.trigger.test_type = XSyncNegativeTransition;
|
|
||||||
if (watch->xalarm_negative != None) {
|
|
||||||
g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld",
|
|
||||||
_xsyncvalue_to_int64 (attr.trigger.wait_value));
|
|
||||||
- XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_negative, flags, &attr);
|
|
||||||
+ XSyncChangeAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), watch->xalarm_negative, flags, &attr);
|
|
||||||
} else {
|
|
||||||
g_debug ("GSIdleMonitor: creating new alarm for negative transition wait=%lld",
|
|
||||||
_xsyncvalue_to_int64 (attr.trigger.wait_value));
|
|
||||||
- watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
|
|
||||||
+ watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), flags, &attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
diff -up gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c.gdk-display-fix gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c
|
|
||||||
--- gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c.gdk-display-fix 2010-09-21 12:29:00.821752493 -0400
|
|
||||||
+++ gnome-session-2.31.6/gnome-session/gsm-inhibit-dialog.c 2010-09-21 12:41:47.118369100 -0400
|
|
||||||
@@ -351,7 +351,8 @@ get_cmap (GdkPixmap *pixmap)
|
|
||||||
}
|
|
||||||
|
|
||||||
static GdkPixbuf *
|
|
||||||
-pixbuf_get_from_pixmap (Pixmap xpixmap)
|
|
||||||
+pixbuf_get_from_pixmap (GdkScreen *screen,
|
|
||||||
+ Pixmap xpixmap)
|
|
||||||
{
|
|
||||||
GdkDrawable *drawable;
|
|
||||||
GdkPixbuf *retval;
|
|
||||||
@@ -363,7 +364,7 @@ pixbuf_get_from_pixmap (Pixmap xpixmap)
|
|
||||||
cmap = NULL;
|
|
||||||
|
|
||||||
g_debug ("GsmInhibitDialog: getting foreign pixmap for %u", (guint)xpixmap);
|
|
||||||
- drawable = gdk_pixmap_foreign_new (xpixmap);
|
|
||||||
+ drawable = gdk_pixmap_foreign_new_for_display (gdk_screen_get_display (screen), xpixmap);
|
|
||||||
if (GDK_IS_PIXMAP (drawable)) {
|
|
||||||
cmap = get_cmap (drawable);
|
|
||||||
gdk_drawable_get_size (drawable,
|
|
||||||
@@ -389,7 +390,8 @@ pixbuf_get_from_pixmap (Pixmap xpixmap)
|
|
||||||
}
|
|
||||||
|
|
||||||
static Pixmap
|
|
||||||
-get_pixmap_for_window (Window window)
|
|
||||||
+get_pixmap_for_window (GdkScreen *screen,
|
|
||||||
+ Window window)
|
|
||||||
{
|
|
||||||
XWindowAttributes attr;
|
|
||||||
XRenderPictureAttributes pa;
|
|
||||||
@@ -403,9 +405,9 @@ get_pixmap_for_window (Window window)
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
|
|
||||||
- XGetWindowAttributes (GDK_DISPLAY (), window, &attr);
|
|
||||||
+ XGetWindowAttributes (GDK_SCREEN_XDISPLAY (screen), window, &attr);
|
|
||||||
|
|
||||||
- format = XRenderFindVisualFormat (GDK_DISPLAY (), attr.visual);
|
|
||||||
+ format = XRenderFindVisualFormat (GDK_SCREEN_XDISPLAY (screen), attr.visual);
|
|
||||||
has_alpha = (format->type == PictTypeDirect && format->direct.alphaMask);
|
|
||||||
x = attr.x;
|
|
||||||
y = attr.y;
|
|
||||||
@@ -414,15 +416,15 @@ get_pixmap_for_window (Window window)
|
|
||||||
|
|
||||||
pa.subwindow_mode = IncludeInferiors; /* Don't clip child widgets */
|
|
||||||
|
|
||||||
- src_picture = XRenderCreatePicture (GDK_DISPLAY (), window, format, CPSubwindowMode, &pa);
|
|
||||||
+ src_picture = XRenderCreatePicture (GDK_SCREEN_XDISPLAY (screen), window, format, CPSubwindowMode, &pa);
|
|
||||||
|
|
||||||
- pixmap = XCreatePixmap (GDK_DISPLAY (),
|
|
||||||
+ pixmap = XCreatePixmap (GDK_SCREEN_XDISPLAY (screen),
|
|
||||||
window,
|
|
||||||
width, height,
|
|
||||||
attr.depth);
|
|
||||||
|
|
||||||
- dst_picture = XRenderCreatePicture (GDK_DISPLAY (), pixmap, format, 0, 0);
|
|
||||||
- XRenderComposite (GDK_DISPLAY (),
|
|
||||||
+ dst_picture = XRenderCreatePicture (GDK_SCREEN_XDISPLAY (screen), pixmap, format, 0, 0);
|
|
||||||
+ XRenderComposite (GDK_SCREEN_XDISPLAY (screen),
|
|
||||||
has_alpha ? PictOpOver : PictOpSrc,
|
|
||||||
src_picture,
|
|
||||||
None,
|
|
||||||
@@ -438,9 +440,10 @@ get_pixmap_for_window (Window window)
|
|
||||||
#endif /* HAVE_COMPOSITE */
|
|
||||||
|
|
||||||
static GdkPixbuf *
|
|
||||||
-get_pixbuf_for_window (guint xid,
|
|
||||||
- int width,
|
|
||||||
- int height)
|
|
||||||
+get_pixbuf_for_window (GdkScreen *screen,
|
|
||||||
+ guint xid,
|
|
||||||
+ int width,
|
|
||||||
+ int height)
|
|
||||||
{
|
|
||||||
GdkPixbuf *pixbuf = NULL;
|
|
||||||
#ifdef HAVE_XRENDER
|
|
||||||
@@ -448,7 +451,7 @@ get_pixbuf_for_window (guint xid,
|
|
||||||
Pixmap xpixmap;
|
|
||||||
|
|
||||||
xwindow = (Window) xid;
|
|
||||||
- xpixmap = get_pixmap_for_window (xwindow);
|
|
||||||
+ xpixmap = get_pixmap_for_window (screen, xwindow);
|
|
||||||
if (xpixmap == None) {
|
|
||||||
g_debug ("GsmInhibitDialog: Unable to get window snapshot for %u", xid);
|
|
||||||
return NULL;
|
|
||||||
@@ -456,12 +459,12 @@ get_pixbuf_for_window (guint xid,
|
|
||||||
g_debug ("GsmInhibitDialog: Got xpixmap %u", (guint)xpixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
- pixbuf = pixbuf_get_from_pixmap (xpixmap);
|
|
||||||
+ pixbuf = pixbuf_get_from_pixmap (screen, xpixmap);
|
|
||||||
|
|
||||||
if (xpixmap != None) {
|
|
||||||
gdk_error_trap_push ();
|
|
||||||
- XFreePixmap (GDK_DISPLAY (), xpixmap);
|
|
||||||
- gdk_display_sync (gdk_display_get_default ());
|
|
||||||
+ XFreePixmap (GDK_SCREEN_XDISPLAY (screen), xpixmap);
|
|
||||||
+ gdk_display_sync (gdk_screen_get_display (screen));
|
|
||||||
gdk_error_trap_pop ();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -513,7 +516,8 @@ add_inhibitor (GsmInhibitDialog *dialog,
|
|
||||||
xid = gsm_inhibitor_peek_toplevel_xid (inhibitor);
|
|
||||||
g_debug ("GsmInhibitDialog: inhibitor has XID %u", xid);
|
|
||||||
if (xid > 0 && dialog->priv->have_xrender) {
|
|
||||||
- pixbuf = get_pixbuf_for_window (xid, DEFAULT_SNAPSHOT_SIZE, DEFAULT_SNAPSHOT_SIZE);
|
|
||||||
+ pixbuf = get_pixbuf_for_window (gtk_widget_get_screen (GTK_WIDGET (dialog)),
|
|
||||||
+ xid, DEFAULT_SNAPSHOT_SIZE, DEFAULT_SNAPSHOT_SIZE);
|
|
||||||
if (pixbuf == NULL) {
|
|
||||||
g_debug ("GsmInhibitDialog: unable to read pixbuf from %u", xid);
|
|
||||||
}
|
|
||||||
@@ -989,7 +993,7 @@ gsm_inhibit_dialog_constructor (GType
|
|
||||||
|
|
||||||
#ifdef HAVE_XRENDER
|
|
||||||
gdk_error_trap_push ();
|
|
||||||
- if (XRenderQueryExtension (GDK_DISPLAY (), &dialog->priv->xrender_event_base, &dialog->priv->xrender_error_base)) {
|
|
||||||
+ if (XRenderQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dialog->priv->xrender_event_base, &dialog->priv->xrender_error_base)) {
|
|
||||||
g_debug ("GsmInhibitDialog: Initialized XRender extension");
|
|
||||||
dialog->priv->have_xrender = TRUE;
|
|
||||||
} else {
|
|
114
show-lock.patch
114
show-lock.patch
@ -1,114 +0,0 @@
|
|||||||
diff -up gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c.show-lock gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c
|
|
||||||
--- gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c.show-lock 2009-08-25 04:03:42.000000000 -0400
|
|
||||||
+++ gnome-session-2.28.0/gnome-session/gsm-inhibit-dialog.c 2009-10-14 10:50:42.337489281 -0400
|
|
||||||
@@ -71,13 +71,16 @@ struct GsmInhibitDialogPrivate
|
|
||||||
gboolean have_xrender;
|
|
||||||
int xrender_event_base;
|
|
||||||
int xrender_error_base;
|
|
||||||
+ gboolean show_lock;
|
|
||||||
+ GtkWidget *lock_button;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
PROP_ACTION,
|
|
||||||
PROP_INHIBITOR_STORE,
|
|
||||||
- PROP_CLIENT_STORE
|
|
||||||
+ PROP_CLIENT_STORE,
|
|
||||||
+ PROP_SHOW_LOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
@@ -134,6 +137,15 @@ gsm_inhibit_dialog_set_action (GsmInhibi
|
|
||||||
dialog->priv->action = action;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+gsm_inhibit_dialog_set_show_lock (GsmInhibitDialog *dialog,
|
|
||||||
+ gboolean show_lock)
|
|
||||||
+{
|
|
||||||
+ dialog->priv->show_lock = show_lock;
|
|
||||||
+ gtk_widget_set_no_show_all (dialog->priv->lock_button, TRUE);
|
|
||||||
+ gtk_widget_set_visible (dialog->priv->lock_button, show_lock);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static gboolean
|
|
||||||
find_inhibitor (GsmInhibitDialog *dialog,
|
|
||||||
const char *id,
|
|
||||||
@@ -809,6 +821,9 @@ gsm_inhibit_dialog_set_property (GObject
|
|
||||||
case PROP_CLIENT_STORE:
|
|
||||||
gsm_inhibit_dialog_set_client_store (dialog, g_value_get_object (value));
|
|
||||||
break;
|
|
||||||
+ case PROP_SHOW_LOCK:
|
|
||||||
+ gsm_inhibit_dialog_set_show_lock (dialog, g_value_get_boolean (value));
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
@@ -833,6 +848,9 @@ gsm_inhibit_dialog_get_property (GObject
|
|
||||||
case PROP_CLIENT_STORE:
|
|
||||||
g_value_set_object (value, dialog->priv->clients);
|
|
||||||
break;
|
|
||||||
+ case PROP_SHOW_LOCK:
|
|
||||||
+ g_value_set_boolean (value, dialog->priv->show_lock);
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
@@ -920,9 +938,10 @@ setup_dialog (GsmInhibitDialog *dialog)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- gtk_dialog_add_button (GTK_DIALOG (dialog),
|
|
||||||
- _("Lock Screen"),
|
|
||||||
- DIALOG_RESPONSE_LOCK_SCREEN);
|
|
||||||
+ dialog->priv->lock_button =
|
|
||||||
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
|
|
||||||
+ _("Lock Screen"),
|
|
||||||
+ DIALOG_RESPONSE_LOCK_SCREEN);
|
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
|
||||||
_("Cancel"),
|
|
||||||
GTK_RESPONSE_CANCEL);
|
|
||||||
@@ -1006,6 +1025,7 @@ gsm_inhibit_dialog_constructor (GType
|
|
||||||
setup_dialog (dialog);
|
|
||||||
|
|
||||||
gtk_widget_show_all (GTK_WIDGET (dialog));
|
|
||||||
+ gsm_inhibit_dialog_set_show_lock (dialog, TRUE);
|
|
||||||
|
|
||||||
return G_OBJECT (dialog);
|
|
||||||
}
|
|
||||||
@@ -1082,6 +1102,14 @@ gsm_inhibit_dialog_class_init (GsmInhibi
|
|
||||||
GSM_TYPE_STORE,
|
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
|
||||||
|
|
||||||
+ g_object_class_install_property (object_class,
|
|
||||||
+ PROP_SHOW_LOCK,
|
|
||||||
+ g_param_spec_boolean ("show-lock",
|
|
||||||
+ NULL,
|
|
||||||
+ NULL,
|
|
||||||
+ TRUE,
|
|
||||||
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
|
||||||
+
|
|
||||||
g_type_class_add_private (klass, sizeof (GsmInhibitDialogPrivate));
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1094,6 +1122,8 @@ gsm_inhibit_dialog_init (GsmInhibitDialo
|
|
||||||
|
|
||||||
dialog->priv = GSM_INHIBIT_DIALOG_GET_PRIVATE (dialog);
|
|
||||||
|
|
||||||
+ dialog->priv->show_lock = TRUE;
|
|
||||||
+
|
|
||||||
dialog->priv->xml = gtk_builder_new ();
|
|
||||||
gtk_builder_set_translation_domain (dialog->priv->xml, GETTEXT_PACKAGE);
|
|
||||||
|
|
||||||
diff -up gnome-session-2.28.0/gnome-session/gsm-manager.c.show-lock gnome-session-2.28.0/gnome-session/gsm-manager.c
|
|
||||||
--- gnome-session-2.28.0/gnome-session/gsm-manager.c.show-lock 2009-10-14 10:50:42.313467505 -0400
|
|
||||||
+++ gnome-session-2.28.0/gnome-session/gsm-manager.c 2009-10-14 10:51:32.889465604 -0400
|
|
||||||
@@ -1200,6 +1200,7 @@ query_end_session_complete (GsmManager *
|
|
||||||
G_CALLBACK (inhibit_dialog_response),
|
|
||||||
manager);
|
|
||||||
if (! gsm_manager_has_responsive_inhibitor (manager)) {
|
|
||||||
+ g_object_set (manager->priv->inhibit_dialog, "show-lock", FALSE, NULL);
|
|
||||||
manager->priv->inhibit_timeout_id =
|
|
||||||
g_timeout_add_seconds (120, on_inhibit_dialog_timeout, manager);
|
|
||||||
}
|
|
@ -1,119 +0,0 @@
|
|||||||
diff -up gnome-session-2.28.0/gnome-session/gsm-manager.c.unresponsive-timeout gnome-session-2.28.0/gnome-session/gsm-manager.c
|
|
||||||
--- gnome-session-2.28.0/gnome-session/gsm-manager.c.unresponsive-timeout 2009-09-18 12:36:04.000000000 -0400
|
|
||||||
+++ gnome-session-2.28.0/gnome-session/gsm-manager.c 2009-10-14 10:49:34.724468379 -0400
|
|
||||||
@@ -122,6 +122,7 @@ struct GsmManagerPrivate
|
|
||||||
GsmManagerLogoutType logout_type;
|
|
||||||
|
|
||||||
GtkWidget *inhibit_dialog;
|
|
||||||
+ guint inhibit_timeout_id;
|
|
||||||
|
|
||||||
/* List of clients which were disconnected due to disabled condition
|
|
||||||
* and shouldn't be automatically restarted */
|
|
||||||
@@ -797,6 +798,24 @@ inhibitor_has_flag (gpointer key,
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
+is_responsive_inhibitor (gpointer key,
|
|
||||||
+ GsmInhibitor *inhibitor,
|
|
||||||
+ gpointer data)
|
|
||||||
+{
|
|
||||||
+ guint flag;
|
|
||||||
+ guint flags;
|
|
||||||
+ const gchar *reason;
|
|
||||||
+
|
|
||||||
+ flag = GPOINTER_TO_UINT (data);
|
|
||||||
+
|
|
||||||
+ flags = gsm_inhibitor_peek_flags (inhibitor);
|
|
||||||
+ reason = gsm_inhibitor_peek_reason (inhibitor);
|
|
||||||
+
|
|
||||||
+ return (flags & flag) &&
|
|
||||||
+ g_strcmp0 (_("Not responding"), reason) != 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
gsm_manager_is_logout_inhibited (GsmManager *manager)
|
|
||||||
{
|
|
||||||
GsmInhibitor *inhibitor;
|
|
||||||
@@ -833,6 +852,24 @@ gsm_manager_is_idle_inhibited (GsmManage
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
+gsm_manager_has_responsive_inhibitor (GsmManager *manager)
|
|
||||||
+{
|
|
||||||
+ GsmInhibitor *inhibitor;
|
|
||||||
+
|
|
||||||
+ if (manager->priv->inhibitors == NULL) {
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ inhibitor = (GsmInhibitor *)gsm_store_find (manager->priv->inhibitors,
|
|
||||||
+ (GsmStoreFunc)is_responsive_inhibitor,
|
|
||||||
+ GUINT_TO_POINTER (GSM_INHIBITOR_FLAG_LOGOUT));
|
|
||||||
+ if (inhibitor == NULL) {
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+ return TRUE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
_client_cancel_end_session (const char *id,
|
|
||||||
GsmClient *client,
|
|
||||||
GsmManager *manager)
|
|
||||||
@@ -1055,6 +1092,11 @@ inhibit_dialog_response (GsmInhibitDialo
|
|
||||||
|
|
||||||
g_debug ("GsmManager: Inhibit dialog response: %d", response_id);
|
|
||||||
|
|
||||||
+ if (manager->priv->inhibit_timeout_id > 0) {
|
|
||||||
+ g_source_remove (manager->priv->inhibit_timeout_id);
|
|
||||||
+ manager->priv->inhibit_timeout_id = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* must destroy dialog before cancelling since we'll
|
|
||||||
remove JIT inhibitors and we don't want to trigger
|
|
||||||
action. */
|
|
||||||
@@ -1085,6 +1127,20 @@ inhibit_dialog_response (GsmInhibitDialo
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static gboolean
|
|
||||||
+on_inhibit_dialog_timeout (gpointer data)
|
|
||||||
+{
|
|
||||||
+ GsmManager *manager = data;
|
|
||||||
+
|
|
||||||
+ manager->priv->inhibit_timeout_id = 0;
|
|
||||||
+
|
|
||||||
+ inhibit_dialog_response (GSM_INHIBIT_DIALOG (manager->priv->inhibit_dialog),
|
|
||||||
+ GTK_RESPONSE_ACCEPT,
|
|
||||||
+ manager);
|
|
||||||
+
|
|
||||||
+ return FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
query_end_session_complete (GsmManager *manager)
|
|
||||||
{
|
|
||||||
@@ -1143,8 +1199,11 @@ query_end_session_complete (GsmManager *
|
|
||||||
"response",
|
|
||||||
G_CALLBACK (inhibit_dialog_response),
|
|
||||||
manager);
|
|
||||||
+ if (! gsm_manager_has_responsive_inhibitor (manager)) {
|
|
||||||
+ manager->priv->inhibit_timeout_id =
|
|
||||||
+ g_timeout_add_seconds (120, on_inhibit_dialog_timeout, manager);
|
|
||||||
+ }
|
|
||||||
gtk_widget_show (manager->priv->inhibit_dialog);
|
|
||||||
-
|
|
||||||
}
|
|
||||||
|
|
||||||
static guint32
|
|
||||||
@@ -2459,6 +2518,11 @@ gsm_manager_finalize (GObject *object)
|
|
||||||
|
|
||||||
g_return_if_fail (manager->priv != NULL);
|
|
||||||
|
|
||||||
+ if (manager->priv->inhibit_timeout_id > 0) {
|
|
||||||
+ g_source_remove (manager->priv->inhibit_timeout_id);
|
|
||||||
+ manager->priv->inhibit_timeout_id = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
G_OBJECT_CLASS (gsm_manager_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -up gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c
|
|
||||||
--- gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop 2009-10-23 10:47:51.555179151 -0400
|
|
||||||
+++ gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c 2009-10-23 10:47:10.255456283 -0400
|
|
||||||
@@ -713,6 +713,17 @@ xsmp_stop (GsmClient *client,
|
|
||||||
|
|
||||||
g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description);
|
|
||||||
|
|
||||||
+ /*FIXME: What do we do if the client can't be stoped ?
|
|
||||||
+ * (probably a cleaner solution exists...)
|
|
||||||
+ */
|
|
||||||
+ if (xsmp->priv->conn == NULL) {
|
|
||||||
+ g_set_error (error,
|
|
||||||
+ GSM_CLIENT_ERROR,
|
|
||||||
+ GSM_CLIENT_ERROR_NOT_REGISTERED,
|
|
||||||
+ "Client is not registered");
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
SmsDie (xsmp->priv->conn);
|
|
||||||
|
|
||||||
return TRUE;
|
|
Loading…
Reference in New Issue
Block a user