[gnome-terminal] window: Only connect to GdkScreenX11 specific signal on X11
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] window: Only connect to GdkScreenX11 specific signal on X11
- Date: Thu, 14 Mar 2013 13:10:06 +0000 (UTC)
commit d5bb673c8a1b5479bb8073db6cd99aa565b24097
Author: Christian Persch <chpe gnome org>
Date: Thu Mar 14 14:06:16 2013 +0100
window: Only connect to GdkScreenX11 specific signal on X11
src/terminal-window.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 9b8315e..e25dea4 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1517,6 +1517,7 @@ terminal_window_state_event (GtkWidget *widget,
return FALSE;
}
+#ifdef GDK_WINDOWING_X11
static void
terminal_window_window_manager_changed_cb (GdkScreen *screen,
TerminalWindow *window)
@@ -1533,6 +1534,7 @@ terminal_window_window_manager_changed_cb (GdkScreen *screen,
action = gtk_action_group_get_action (priv->action_group, "ViewFullscreen");
gtk_action_set_sensitive (action, supports_fs);
}
+#endif /* GDK_WINDOWING_X11 */
static void
terminal_window_screen_update (TerminalWindow *window,
@@ -1542,9 +1544,13 @@ terminal_window_screen_update (TerminalWindow *window,
GtkSettings *gtk_settings;
char *value;
- terminal_window_window_manager_changed_cb (screen, window);
- g_signal_connect (screen, "window-manager-changed",
- G_CALLBACK (terminal_window_window_manager_changed_cb), window);
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_SCREEN (screen)) {
+ terminal_window_window_manager_changed_cb (screen, window);
+ g_signal_connect (screen, "window-manager-changed",
+ G_CALLBACK (terminal_window_window_manager_changed_cb), window);
+ }
+#endif
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (screen), "GT::HasSettingsConnection")))
return;
@@ -1589,12 +1595,14 @@ terminal_window_screen_changed (GtkWidget *widget,
if (previous_screen == screen)
return;
- if (previous_screen)
+#ifdef GDK_WINDOWING_X11
+ if (previous_screen && GDK_IS_X11_SCREEN (previous_screen))
{
g_signal_handlers_disconnect_by_func (previous_screen,
G_CALLBACK (terminal_window_window_manager_changed_cb),
window);
}
+#endif
if (!screen)
return;
@@ -2021,12 +2029,14 @@ terminal_window_dispose (GObject *object)
window);
screen = gtk_widget_get_screen (GTK_WIDGET (object));
- if (screen)
+#ifdef GDK_WINDOWING_X11
+ if (screen && GDK_IS_X11_SCREEN (screen))
{
g_signal_handlers_disconnect_by_func (screen,
G_CALLBACK (terminal_window_window_manager_changed_cb),
window);
}
+#endif
G_OBJECT_CLASS (terminal_window_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]