aboutsummaryrefslogtreecommitdiffstats
path: root/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff')
-rw-r--r--packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff78
1 files changed, 78 insertions, 0 deletions
diff --git a/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff b/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff
index e69de29bb2..a67feac810 100644
--- a/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff
+++ b/packages/gtk+/gtk+-2.6.4-1.osso7/gtkwindow.c.diff
@@ -0,0 +1,78 @@
+--- gtk+-2.6.4/gtk/gtkwindow.c 2005-02-21 06:21:49.000000000 +0200
++++ gtk+-2.6.4/gtk/gtkwindow.c 2005-04-06 16:19:38.407699504 +0300
+@@ -166,6 +166,7 @@
+ guint skips_taskbar : 1;
+ guint skips_pager : 1;
+ guint accept_focus : 1;
++ GtkWidget *prev_focus_widget;
+ guint focus_on_map : 1;
+ };
+
+@@ -293,6 +294,9 @@
+ GValue *value,
+ GParamSpec *pspec);
+
++static void gtk_window_focus_weak_notify (GtkWindow *window,
++ GtkWidget *widget);
++static void gtk_window_weak_notify(GtkWidget *widget, GtkWindow *window);
+
+ GType
+ gtk_window_get_type (void)
+@@ -771,6 +775,7 @@
+ window->decorated = TRUE;
+ window->mnemonic_modifier = GDK_MOD1_MASK;
+ window->screen = gdk_screen_get_default ();
++ priv->prev_focus_widget = NULL;
+
+ priv->accept_focus = TRUE;
+ priv->focus_on_map = TRUE;
+@@ -7505,3 +7510,49 @@
+ }
+
+ #endif
++
++/*Hildon focus handling*/
++GtkWidget *gtk_window_get_prev_focus_widget( GtkWindow *window )
++{
++ g_return_val_if_fail( GTK_IS_WINDOW(window), NULL );
++ return GTK_WINDOW_GET_PRIVATE(window)->prev_focus_widget;
++}
++
++static void gtk_window_weak_notify(GtkWidget *widget, GtkWindow *window)
++{
++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window);
++ if (priv->prev_focus_widget == widget)
++ g_object_weak_unref(G_OBJECT(widget),
++ (GWeakNotify)gtk_window_focus_weak_notify,
++ (gpointer)window);
++}
++
++void gtk_window_set_prev_focus_widget( GtkWindow *window, GtkWidget *widget )
++{
++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window);
++ g_return_if_fail(GTK_IS_WINDOW(window));
++ g_return_if_fail(GTK_IS_WIDGET(widget));
++
++ if (priv->prev_focus_widget)
++ {
++ g_object_weak_unref(G_OBJECT(window), (GWeakNotify)gtk_window_weak_notify,
++ (gpointer)priv->prev_focus_widget);
++ g_object_weak_unref(G_OBJECT(priv->prev_focus_widget),
++ (GWeakNotify)gtk_window_focus_weak_notify,
++ (gpointer)window);
++ }
++
++ priv->prev_focus_widget = widget;
++
++ g_object_weak_ref(G_OBJECT(window), (GWeakNotify)gtk_window_weak_notify,
++ (gpointer)widget);
++ g_object_weak_ref(G_OBJECT(widget), (GWeakNotify)gtk_window_focus_weak_notify,
++ (gpointer)window);
++}
++
++static void gtk_window_focus_weak_notify(GtkWindow *window, GtkWidget *widget)
++{
++ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE(window);
++ priv->prev_focus_widget = window->focus_widget;
++}
++