mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
this is a stack of grabbing widgets now, having unique entries. the
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net> * gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack of grabbing widgets now, having unique entries. the GTK_HAS_GRAB flag of a widget is set while it is on the stack (wasn't implemented before).
This commit is contained in:
parent
0c6a6baa08
commit
1a8765e6ce
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
|
||||
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
|
||||
flag of a widget is set while it is on the stack (wasn't
|
||||
implemented before).
|
||||
|
||||
Mon Jan 19 00:46:18 1998 MET Eckehard Berns <eb@berns.prima.de>
|
||||
|
||||
* gtk/gtktoolbar.[ch]: changed
|
||||
|
@ -3,6 +3,9 @@
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
#undef inline
|
||||
|
||||
@ -35,4 +38,8 @@
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
#undef HAVE_MMAP
|
||||
/* Define if you have the getpagesize function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
@ -106,8 +106,8 @@ static GdkEvent *next_event = NULL;
|
||||
static GdkEvent *current_event = NULL;
|
||||
static GList *current_events = NULL;
|
||||
|
||||
static GList *grabs = NULL; /* A list of grabs. The grabbing widget
|
||||
* is the first one on the list.
|
||||
static GSList *grabs = NULL; /* A stack of unique grabs. The grabbing
|
||||
* widget is the first one on the list.
|
||||
*/
|
||||
static GList *init_functions = NULL; /* A list of init functions.
|
||||
*/
|
||||
@ -481,19 +481,27 @@ gtk_false (void)
|
||||
void
|
||||
gtk_grab_add (GtkWidget *widget)
|
||||
{
|
||||
/* Place the grab on the front of the list of grabs.
|
||||
*/
|
||||
grabs = g_list_prepend (grabs, widget);
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
if (!GTK_WIDGET_HAS_GRAB (widget) && !GTK_OBJECT_NEED_DESTROY (widget))
|
||||
{
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_GRAB);
|
||||
|
||||
grabs = g_slist_prepend (grabs, widget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_grab_remove (GtkWidget *widget)
|
||||
{
|
||||
/* Remove the grab from the list of grabs.
|
||||
* Note: the grab being removed may be in
|
||||
* the middle of the list.
|
||||
*/
|
||||
grabs = g_list_remove (grabs, widget);
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
if (GTK_WIDGET_HAS_GRAB (widget))
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_GRAB);
|
||||
|
||||
grabs = g_slist_remove (grabs, widget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1105,6 +1105,8 @@ gtk_widget_destroy (GtkWidget *widget)
|
||||
}
|
||||
|
||||
|
||||
gtk_grab_remove (widget);
|
||||
|
||||
if (widget->parent)
|
||||
{
|
||||
if (!GTK_OBJECT_BEING_DESTROYED (widget->parent))
|
||||
@ -3019,8 +3021,6 @@ gtk_real_widget_destroy (GtkObject *object)
|
||||
if (GTK_WIDGET_RESIZE_NEEDED (widget))
|
||||
g_warning ("resize needed\n");
|
||||
|
||||
gtk_grab_remove (widget);
|
||||
|
||||
gtk_selection_remove_all (widget);
|
||||
|
||||
if (widget->name)
|
||||
|
@ -50,7 +50,7 @@ enum
|
||||
GTK_ANCHORED = 1 << 15,
|
||||
GTK_BASIC = 1 << 16,
|
||||
GTK_USER_STYLE = 1 << 17,
|
||||
GTK_GRAB_ALL = 1 << 18,
|
||||
GTK_HAS_GRAB = 1 << 18,
|
||||
GTK_REDRAW_PENDING = 1 << 19,
|
||||
GTK_RESIZE_PENDING = 1 << 20,
|
||||
GTK_RESIZE_NEEDED = 1 << 21,
|
||||
@ -91,7 +91,7 @@ enum
|
||||
#define GTK_WIDGET_ANCHORED(obj) (GTK_OBJECT_FLAGS (obj) & GTK_ANCHORED)
|
||||
#define GTK_WIDGET_BASIC(obj) (GTK_OBJECT_FLAGS (obj) & GTK_BASIC)
|
||||
#define GTK_WIDGET_USER_STYLE(obj) (GTK_OBJECT_FLAGS (obj) & GTK_USER_STYLE)
|
||||
#define GTK_WIDGET_GRAB_ALL(obj) (GTK_OBJECT_FLAGS (obj) & GTK_GRAB_ALL)
|
||||
#define GTK_WIDGET_HAS_GRAB(obj) (GTK_OBJECT_FLAGS (obj) & GTK_HAS_GRAB)
|
||||
#define GTK_WIDGET_REDRAW_PENDING(obj) (GTK_OBJECT_FLAGS (obj) & GTK_REDRAW_PENDING)
|
||||
#define GTK_WIDGET_RESIZE_PENDING(obj) (GTK_OBJECT_FLAGS (obj) & GTK_RESIZE_PENDING)
|
||||
#define GTK_WIDGET_RESIZE_NEEDED(obj) (GTK_OBJECT_FLAGS (obj) & GTK_RESIZE_NEEDED)
|
||||
|
Loading…
Reference in New Issue
Block a user