From 4002e8d4ef3905e878e44633c076f8e7d42fd91b Mon Sep 17 00:00:00 2001 From: Nick Schermer Date: Sun, 6 Nov 2011 21:59:43 +0100 Subject: Remove suspend/hibernate, split consolekit and rebuild dialog. Way too many changes in 1 commit, but it's all related. --- libxfsm/xfsm-util.c | 19 +++++-------------- libxfsm/xfsm-util.h | 2 -- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'libxfsm') diff --git a/libxfsm/xfsm-util.c b/libxfsm/xfsm-util.c index e766c25c..ddd9d2a6 100644 --- a/libxfsm/xfsm-util.c +++ b/libxfsm/xfsm-util.c @@ -175,23 +175,14 @@ xfsm_window_add_border (GtkWindow *window) gtk_container_add (GTK_CONTAINER (window), box1); } - -void -xfsm_window_grab_input (GtkWindow *window) -{ - GdkWindow *xwindow = GTK_WIDGET (window)->window; - - gdk_pointer_grab (xwindow, TRUE, 0, NULL, NULL, GDK_CURRENT_TIME); - gdk_keyboard_grab (xwindow, FALSE, GDK_CURRENT_TIME); - XSetInputFocus (GDK_DISPLAY (), GDK_WINDOW_XWINDOW (xwindow), - RevertToParent, CurrentTime); -} - - XfconfChannel* xfsm_open_config (void) { - return xfconf_channel_get ("xfce4-session"); + static XfconfChannel *channel = NULL; + + if (G_UNLIKELY (channel == NULL)) + channel = xfconf_channel_get ("xfce4-session"); + return channel; } gchar* diff --git a/libxfsm/xfsm-util.h b/libxfsm/xfsm-util.h index b215b54b..8ca9fc25 100644 --- a/libxfsm/xfsm-util.h +++ b/libxfsm/xfsm-util.h @@ -47,8 +47,6 @@ gboolean xfsm_strv_equal (gchar **a, gchar **b); void xfsm_window_add_border (GtkWindow *window); -void xfsm_window_grab_input (GtkWindow *window); - XfconfChannel *xfsm_open_config (void); gchar *xfsm_gdk_display_get_fullname (GdkDisplay *display); -- cgit v1.2.1