mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Drop GDK_NOTHING
Events of type GDK_NOTHING are good for nothing.
This commit is contained in:
parent
3830e13b98
commit
cd2b58574d
@ -80,12 +80,6 @@ check_event_sanity (GdkEvent *event)
|
||||
surface = gdk_event_get_surface (event);
|
||||
device = gdk_event_get_device (event);
|
||||
|
||||
if (gdk_event_get_event_type (event) == GDK_NOTHING)
|
||||
{
|
||||
g_warning ("Ignoring GDK_NOTHING events; they're good for nothing");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (surface && display != gdk_surface_get_display (surface))
|
||||
{
|
||||
char *type = g_enum_to_string (GDK_TYPE_EVENT_TYPE, event->any.type);
|
||||
@ -552,7 +546,6 @@ gdk_event_get_time (const GdkEvent *event)
|
||||
return event->pad_group_mode.time;
|
||||
case GDK_CONFIGURE:
|
||||
case GDK_FOCUS_CHANGE:
|
||||
case GDK_NOTHING:
|
||||
case GDK_DELETE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_EVENT_LAST:
|
||||
@ -624,7 +617,6 @@ gdk_event_get_state (const GdkEvent *event,
|
||||
case GDK_DRAG_LEAVE:
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DROP_START:
|
||||
case GDK_NOTHING:
|
||||
case GDK_DELETE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
@ -1542,7 +1534,7 @@ G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
|
||||
GdkEventType
|
||||
gdk_event_get_event_type (const GdkEvent *event)
|
||||
{
|
||||
g_return_val_if_fail (event != NULL, GDK_NOTHING);
|
||||
g_return_val_if_fail (event != NULL, 0);
|
||||
|
||||
return event->any.type;
|
||||
}
|
||||
|
@ -124,7 +124,6 @@ typedef union _GdkEvent GdkEvent;
|
||||
|
||||
/**
|
||||
* GdkEventType:
|
||||
* @GDK_NOTHING: a special code to indicate a null event.
|
||||
* @GDK_DELETE: the window manager has requested that the toplevel surface be
|
||||
* hidden or destroyed, usually when the user clicks on a special icon in the
|
||||
* title bar.
|
||||
@ -181,7 +180,6 @@ typedef union _GdkEvent GdkEvent;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_NOTHING,
|
||||
GDK_DELETE,
|
||||
GDK_MOTION_NOTIFY,
|
||||
GDK_BUTTON_PRESS,
|
||||
|
@ -4097,7 +4097,6 @@ add_event_mark (GdkEvent *event,
|
||||
case GDK_FOCUS_CHANGE:
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
case GDK_NOTHING:
|
||||
case GDK_EVENT_LAST:
|
||||
default:
|
||||
break;
|
||||
|
@ -763,7 +763,6 @@ _gdk_win32_print_event (const GdkEvent *event)
|
||||
switch (event->any.type)
|
||||
{
|
||||
#define CASE(x) case x: g_print (#x); break;
|
||||
CASE (GDK_NOTHING);
|
||||
CASE (GDK_DELETE);
|
||||
CASE (GDK_DESTROY);
|
||||
CASE (GDK_MOTION_NOTIFY);
|
||||
|
@ -1837,9 +1837,6 @@ gtk_main_do_event (GdkEvent *event)
|
||||
*/
|
||||
switch ((guint)event->any.type)
|
||||
{
|
||||
case GDK_NOTHING:
|
||||
break;
|
||||
|
||||
case GDK_DELETE:
|
||||
g_object_ref (target_widget);
|
||||
if (!gtk_window_group_get_current_grab (window_group) ||
|
||||
|
Loading…
Reference in New Issue
Block a user