From c91f2c0cfa99d2c354b0e1cd3aaff7a7d680cf8c Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 15 Mar 1998 22:49:50 +0000 Subject: [PATCH] removed GRAB_EXCLUSIVE again, just disable modal event delivery for Sun Mar 15 23:44:10 1998 Tim Janik * gtk/gtkwidget.h: * gtk/gtkmenushell.c: * gtk/gtkmenu.c: * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal event delivery for insensitive children. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkmain.c | 2 +- gtk/gtkmenu.c | 2 -- gtk/gtkmenushell.c | 2 -- gtk/gtkwidget.h | 3 +-- 11 files changed, 58 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9882755303..68f7e9a97a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9882755303..68f7e9a97a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sun Mar 15 23:44:10 1998 Tim Janik + + * gtk/gtkwidget.h: + * gtk/gtkmenushell.c: + * gtk/gtkmenu.c: + * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal + event delivery for insensitive children. + Sun Mar 15 22:44:33 1998 Tim Janik * gtk/gtkmenushell.c (gtk_menu_shell_button_release): for now reverted diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index b0d021ba9e..87f2916c75 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -510,7 +510,7 @@ gtk_main_iteration_do (gboolean blocking) * then we send the event to the original event widget. * This is the key to implementing modality. */ - if (!GTK_WIDGET_EXCLUSIVE_GRAB (grab_widget) && + if (GTK_WIDGET_IS_SENSITIVE (event_widget) && gtk_widget_is_ancestor (event_widget, grab_widget)) grab_widget = event_widget; } diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 0ed1b49dca..2e2e098223 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -293,7 +293,6 @@ gtk_menu_popup (GtkMenu *menu, gtk_widget_show (GTK_WIDGET (menu)); gtk_grab_add (GTK_WIDGET (menu)); - GTK_WIDGET_SET_FLAGS (menu, GTK_EXCLUSIVE_GRAB); } void @@ -318,7 +317,6 @@ gtk_menu_popdown (GtkMenu *menu) gtk_widget_hide (GTK_WIDGET (menu)); gtk_grab_remove (GTK_WIDGET (menu)); - GTK_WIDGET_SET_FLAGS (menu, GTK_EXCLUSIVE_GRAB); } GtkWidget* diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 0763952f57..eb9d731d90 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -298,7 +298,6 @@ gtk_menu_shell_button_press (GtkWidget *widget, if (!menu_shell->active) { gtk_grab_add (GTK_WIDGET (widget)); - GTK_WIDGET_SET_FLAGS (widget, GTK_EXCLUSIVE_GRAB); menu_shell->have_grab = TRUE; menu_shell->active = TRUE; } @@ -579,7 +578,6 @@ gtk_real_menu_shell_deactivate (GtkMenuShell *menu_shell) { menu_shell->have_grab = FALSE; gtk_grab_remove (GTK_WIDGET (menu_shell)); - GTK_WIDGET_UNSET_FLAGS (menu_shell, GTK_EXCLUSIVE_GRAB); } if (menu_shell->have_xgrab) { diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 87338b076b..a313a2af0d 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -48,7 +48,7 @@ enum GTK_HAS_DEFAULT = 1 << 14, GTK_HAS_GRAB = 1 << 15, GTK_BASIC = 1 << 16, - GTK_EXCLUSIVE_GRAB = 1 << 17, + GTK_RESERVED_3 = 1 << 17, GTK_RC_STYLE = 1 << 18 }; @@ -86,7 +86,6 @@ enum #define GTK_WIDGET_HAS_DEFAULT(wid) (GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT) #define GTK_WIDGET_HAS_GRAB(wid) (GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) #define GTK_WIDGET_BASIC(wid) (GTK_WIDGET_FLAGS (wid) & GTK_BASIC) -#define GTK_WIDGET_EXCLUSIVE_GRAB(wid) (GTK_WIDGET_FLAGS (wid) & GTK_EXCLUSIVE_GRAB) #define GTK_WIDGET_RC_STYLE(wid) (GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) /* Macros for setting and clearing widget flags.