Commit 6a802b24 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Implement accelerator propagation using a custom XEMBED_GTK_KEY_GRAB

Sat Feb 23 20:33:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
        accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
        XEMBED_GTK_KEY_UNGRAB pair of messages.

        * gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().

        * gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
        widgets.
parent f97ae501
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Sat Feb 23 20:33:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
XEMBED_GTK_KEY_UNGRAB pair of messages.
* gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().
* gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
widgets.
2002-02-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
This diff is collapsed.
......@@ -56,6 +56,8 @@ struct _GtkPlug
GdkWindow *socket_window;
GtkWidget *modality_window;
GtkWindowGroup *modality_group;
GHashTable *grabbed_keys;
guint same_app : 1;
};
......
This diff is collapsed.
......@@ -63,7 +63,7 @@ struct _GtkSocket
guint need_map : 1;
guint is_mapped : 1;
GHashTable *grabbed_keys;
GtkAccelGroup *accel_group;
GtkWidget *toplevel;
};
......
......@@ -5675,12 +5675,6 @@ gtk_window_parse_geometry (GtkWindow *window,
return result != 0;
}
typedef void (*GtkWindowKeysForeach) (GtkWindow *window,
guint keyval,
GdkModifierType modifiers,
gboolean is_mnemonic,
gpointer data);
static void
gtk_window_mnemonic_hash_foreach (gpointer key,
gpointer value,
......@@ -5688,7 +5682,7 @@ gtk_window_mnemonic_hash_foreach (gpointer key,
{
struct {
GtkWindow *window;
GtkWindowKeysForeach func;
GtkWindowKeysForeachFunc func;
gpointer func_data;
} *info = data;
......@@ -5698,16 +5692,16 @@ gtk_window_mnemonic_hash_foreach (gpointer key,
(*info->func) (info->window, mnemonic->keyval, info->window->mnemonic_modifier, TRUE, info->func_data);
}
static void
gtk_window_keys_foreach (GtkWindow *window,
GtkWindowKeysForeach func,
gpointer func_data)
void
_gtk_window_keys_foreach (GtkWindow *window,
GtkWindowKeysForeachFunc func,
gpointer func_data)
{
GSList *groups;
struct {
GtkWindow *window;
GtkWindowKeysForeach func;
GtkWindowKeysForeachFunc func;
gpointer func_data;
} info;
......@@ -5790,7 +5784,7 @@ gtk_window_get_key_hash (GtkWindow *window)
return key_hash;
key_hash = _gtk_key_hash_new (gdk_keymap_get_default(), (GDestroyNotify)g_free);
gtk_window_keys_foreach (window, add_to_key_hash, key_hash);
_gtk_window_keys_foreach (window, add_to_key_hash, key_hash);
g_object_set_data (G_OBJECT (window), "gtk-window-key-hash", key_hash);
return key_hash;
......
......@@ -340,6 +340,16 @@ GtkWindowGroup *_gtk_window_get_group (GtkWindow *window);
gboolean _gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event);
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
guint keyval,
GdkModifierType modifiers,
gboolean is_mnemonic,
gpointer data);
void _gtk_window_keys_foreach (GtkWindow *window,
GtkWindowKeysForeachFunc func,
gpointer func_data);
/* --- internal (GtkAcceleratable) --- */
gboolean _gtk_window_query_nonaccels (GtkWindow *window,
guint accel_key,
......
......@@ -12,6 +12,10 @@
#define XEMBED_MODALITY_ON 10
#define XEMBED_MODALITY_OFF 11
/* Non standard messages*/
#define XEMBED_GTK_GRAB_KEY 108
#define XEMBED_GTK_UNGRAB_KEY 109
/* Details for XEMBED_FOCUS_IN: */
#define XEMBED_FOCUS_CURRENT 0
#define XEMBED_FOCUS_FIRST 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment