diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-03-08 21:11:39 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-03-08 21:11:39 +0000 |
commit | 3db24eb81c07f1bf4f8b31ae8b7ffe86c2e9af7d (patch) | |
tree | aa71e70ac63a05ab33c53ac7b5050d9465d2ab92 /gdk | |
parent | d03b2741adc80d3266712a902b8dec048add14dd (diff) | |
download | gtk+-3db24eb81c07f1bf4f8b31ae8b7ffe86c2e9af7d.tar.gz |
Bug #107664 continued:
2003-03-08 Matthias Clasen <maclas@gmx.de>
Bug #107664 continued:
* gdk/x11/gdkinputprivate.h:
* gdk/x11/gdkinput-none.c (_gdk_input_window_none_event): Remove.
(_gdk_input_other_event): Return gboolean.
* gdk/x11/gdkinput-xfree.c (_gdk_input_window_none_event): Remove.
(_gdk_input_other_event): Return gboolean.
* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event): Return gboolean.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Make return_val
gboolean, remove pointless call to _gdk_input_window_none_event.
* gdk/win32/gdkinput-win32.[hc] (_gdk_input_other_event): Return gboolean.
(_gdk_input_window_none_event): Remove.
* gtk/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte):
(_gtk_text_iter_get_segment_char):
(_gtk_text_iter_get_text_line):
(_gtk_text_iter_get_btree): Fix 0/NULL confusion.
* gdk/x11/gdkdnd-x11.c (motif_target_table_check): Return gint.
* gdk/win32/gdkfont-win32.c (gdk_font_equal):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_get_deskrelative_origin):
(gdk_window_get_origin):
* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Fix 0/FALSE confusion.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/win32/gdkinput-win32.c | 11 | ||||
-rw-r--r-- | gdk/win32/gdkinput-win32.h | 4 | ||||
-rw-r--r-- | gdk/x11/gdkevents-x11.c | 18 | ||||
-rw-r--r-- | gdk/x11/gdkinput-none.c | 11 | ||||
-rw-r--r-- | gdk/x11/gdkinput-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkinput-xfree.c | 14 | ||||
-rw-r--r-- | gdk/x11/gdkinputprivate.h | 4 |
7 files changed, 13 insertions, 53 deletions
diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c index 4989dcde6a..b0a9da27b7 100644 --- a/gdk/win32/gdkinput-win32.c +++ b/gdk/win32/gdkinput-win32.c @@ -687,7 +687,7 @@ _gdk_input_enter_event (GdkEventCrossing *event, input_window->root_y = root_y; } -gint +gboolean _gdk_input_other_event (GdkEvent *event, MSG *msg, GdkWindow *window) @@ -956,7 +956,7 @@ _gdk_input_other_event (GdkEvent *event, return TRUE; } #endif - return -1; + return FALSE; } gboolean @@ -1114,13 +1114,6 @@ _gdk_input_ungrab_pointer (guint32 time) #endif } -gint -_gdk_input_window_none_event (GdkEvent *event, - MSG *msg) -{ - return -1; -} - gboolean _gdk_device_get_history (GdkDevice *device, GdkWindow *window, diff --git a/gdk/win32/gdkinput-win32.h b/gdk/win32/gdkinput-win32.h index c58253b29e..e2401cf05e 100644 --- a/gdk/win32/gdkinput-win32.h +++ b/gdk/win32/gdkinput-win32.h @@ -137,13 +137,11 @@ GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, /* The following functions are provided by each implementation * (just wintab for now) */ -gint _gdk_input_window_none_event(GdkEvent *event, - MSG *msg); void _gdk_input_configure_event (GdkEventConfigure *event, GdkWindow *window); void _gdk_input_enter_event (GdkEventCrossing *event, GdkWindow *window); -gint _gdk_input_other_event (GdkEvent *event, +gboolean _gdk_input_other_event (GdkEvent *event, MSG *msg, GdkWindow *window); diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index de957fdd2e..25681a8bb8 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -691,7 +691,7 @@ gdk_event_translate (GdkDisplay *display, GdkWindowObject *window_private; GdkWindow *filter_window; GdkWindowImplX11 *window_impl = NULL; - gint return_val; + gboolean return_val; gint xoffset, yoffset; GdkScreen *screen = NULL; GdkScreenX11 *screen_x11 = NULL; @@ -719,22 +719,6 @@ gdk_event_translate (GdkDisplay *display, } } - /* We handle events with window=None - * specially - they are generated by XFree86's XInput under - * some circumstances. This handling for obvious reasons - * goes before we bother to lookup the event window. - */ - - if (xevent->xany.window == None) - { - return_val = _gdk_input_window_none_event (event, xevent); - - if (return_val >= 0) /* was handled */ - return return_val; - else - return_val = FALSE; - } - /* Find the GdkWindow that this event relates to. * Basically this means substructure events * are reported same as structure events diff --git a/gdk/x11/gdkinput-none.c b/gdk/x11/gdkinput-none.c index d5f0b34ec7..1c468e918a 100644 --- a/gdk/x11/gdkinput-none.c +++ b/gdk/x11/gdkinput-none.c @@ -82,19 +82,12 @@ _gdk_input_disable_window(GdkWindow *window, GdkDevicePrivate *gdkdev) return TRUE; } -gint -_gdk_input_window_none_event (GdkEvent *event, - XEvent *xevent) -{ - return -1; -} - -gint +gboolean _gdk_input_other_event (GdkEvent *event, XEvent *xevent, GdkWindow *window) { - return -1; + return FALSE; } void diff --git a/gdk/x11/gdkinput-x11.c b/gdk/x11/gdkinput-x11.c index b53e5cc7a8..24886f13e4 100644 --- a/gdk/x11/gdkinput-x11.c +++ b/gdk/x11/gdkinput-x11.c @@ -520,7 +520,7 @@ gdk_input_translate_state(guint state, guint device_state) } -gint +gboolean _gdk_input_common_other_event (GdkEvent *event, XEvent *xevent, GdkInputWindow *input_window, @@ -667,7 +667,7 @@ _gdk_input_common_other_event (GdkEvent *event, return TRUE; } - return -1; /* wasn't one of our event types */ + return FALSE; /* wasn't one of our event types */ } gboolean diff --git a/gdk/x11/gdkinput-xfree.c b/gdk/x11/gdkinput-xfree.c index 418e872fc9..f8befc6ea7 100644 --- a/gdk/x11/gdkinput-xfree.c +++ b/gdk/x11/gdkinput-xfree.c @@ -178,7 +178,7 @@ _gdk_input_enter_event (XCrossingEvent *xevent, input_window->root_y = root_y; } -gint +gboolean _gdk_input_other_event (GdkEvent *event, XEvent *xevent, GdkWindow *window) @@ -190,7 +190,7 @@ _gdk_input_other_event (GdkEvent *event, GdkDisplayX11 *display_impl = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window)); input_window = _gdk_input_window_find(window); - g_return_val_if_fail (window != NULL, -1); + g_return_val_if_fail (window != NULL, FALSE); /* This is a sort of a hack, as there isn't any XDeviceAnyEvent - but it's potentially faster than scanning through the types of @@ -199,7 +199,7 @@ _gdk_input_other_event (GdkEvent *event, gdkdev = _gdk_input_find_device (GDK_WINDOW_DISPLAY (window), ((XDeviceButtonEvent *)xevent)->deviceid); if (!gdkdev) - return -1; /* we don't handle it - not an XInput event */ + return FALSE; /* we don't handle it - not an XInput event */ /* FIXME: It would be nice if we could just get rid of the events entirely, instead of having to ignore them */ @@ -214,7 +214,7 @@ _gdk_input_other_event (GdkEvent *event, return_val = _gdk_input_common_other_event (event, xevent, input_window, gdkdev); - if (return_val > 0 && event->type == GDK_PROXIMITY_OUT && + if (return_val && event->type == GDK_PROXIMITY_OUT && display_impl->input_ignore_core) gdk_input_check_proximity(GDK_WINDOW_DISPLAY (window)); @@ -357,9 +357,3 @@ _gdk_input_ungrab_pointer (GdkDisplay *display, } } -gint -_gdk_input_window_none_event (GdkEvent *event, - XEvent *xevent) -{ - return -1; -} diff --git a/gdk/x11/gdkinputprivate.h b/gdk/x11/gdkinputprivate.h index 764f45451f..5cbd809deb 100644 --- a/gdk/x11/gdkinputprivate.h +++ b/gdk/x11/gdkinputprivate.h @@ -143,13 +143,11 @@ gint _gdk_input_enable_window (GdkWindow *window, GdkDevicePrivate *gdkdev); gint _gdk_input_disable_window (GdkWindow *window, GdkDevicePrivate *gdkdev); -gint _gdk_input_window_none_event (GdkEvent *event, - XEvent *xevent); void _gdk_input_configure_event (XConfigureEvent *xevent, GdkWindow *window); void _gdk_input_enter_event (XCrossingEvent *xevent, GdkWindow *window); -gint _gdk_input_other_event (GdkEvent *event, +gboolean _gdk_input_other_event (GdkEvent *event, XEvent *xevent, GdkWindow *window); gint _gdk_input_grab_pointer (GdkWindow *window, |