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.
This commit is contained in:
Matthias Clasen 2003-03-08 21:11:39 +00:00 committed by Matthias Clasen
parent d03b2741ad
commit 3db24eb81c
12 changed files with 88 additions and 53 deletions

View File

@ -1,5 +1,20 @@
2003-03-08 Matthias Clasen <maclas@gmx.de> 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/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment): (_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte): (_gtk_text_iter_get_segment_byte):

View File

@ -1,5 +1,20 @@
2003-03-08 Matthias Clasen <maclas@gmx.de> 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/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment): (_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte): (_gtk_text_iter_get_segment_byte):

View File

@ -1,5 +1,20 @@
2003-03-08 Matthias Clasen <maclas@gmx.de> 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/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment): (_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte): (_gtk_text_iter_get_segment_byte):

View File

@ -1,5 +1,20 @@
2003-03-08 Matthias Clasen <maclas@gmx.de> 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/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment): (_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte): (_gtk_text_iter_get_segment_byte):

View File

@ -1,5 +1,20 @@
2003-03-08 Matthias Clasen <maclas@gmx.de> 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/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
(_gtk_text_iter_get_any_segment): (_gtk_text_iter_get_any_segment):
(_gtk_text_iter_get_segment_byte): (_gtk_text_iter_get_segment_byte):

View File

@ -687,7 +687,7 @@ _gdk_input_enter_event (GdkEventCrossing *event,
input_window->root_y = root_y; input_window->root_y = root_y;
} }
gint gboolean
_gdk_input_other_event (GdkEvent *event, _gdk_input_other_event (GdkEvent *event,
MSG *msg, MSG *msg,
GdkWindow *window) GdkWindow *window)
@ -956,7 +956,7 @@ _gdk_input_other_event (GdkEvent *event,
return TRUE; return TRUE;
} }
#endif #endif
return -1; return FALSE;
} }
gboolean gboolean
@ -1114,13 +1114,6 @@ _gdk_input_ungrab_pointer (guint32 time)
#endif #endif
} }
gint
_gdk_input_window_none_event (GdkEvent *event,
MSG *msg)
{
return -1;
}
gboolean gboolean
_gdk_device_get_history (GdkDevice *device, _gdk_device_get_history (GdkDevice *device,
GdkWindow *window, GdkWindow *window,

View File

@ -137,13 +137,11 @@ GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
/* The following functions are provided by each implementation /* The following functions are provided by each implementation
* (just wintab for now) * (just wintab for now)
*/ */
gint _gdk_input_window_none_event(GdkEvent *event,
MSG *msg);
void _gdk_input_configure_event (GdkEventConfigure *event, void _gdk_input_configure_event (GdkEventConfigure *event,
GdkWindow *window); GdkWindow *window);
void _gdk_input_enter_event (GdkEventCrossing *event, void _gdk_input_enter_event (GdkEventCrossing *event,
GdkWindow *window); GdkWindow *window);
gint _gdk_input_other_event (GdkEvent *event, gboolean _gdk_input_other_event (GdkEvent *event,
MSG *msg, MSG *msg,
GdkWindow *window); GdkWindow *window);

View File

@ -691,7 +691,7 @@ gdk_event_translate (GdkDisplay *display,
GdkWindowObject *window_private; GdkWindowObject *window_private;
GdkWindow *filter_window; GdkWindow *filter_window;
GdkWindowImplX11 *window_impl = NULL; GdkWindowImplX11 *window_impl = NULL;
gint return_val; gboolean return_val;
gint xoffset, yoffset; gint xoffset, yoffset;
GdkScreen *screen = NULL; GdkScreen *screen = NULL;
GdkScreenX11 *screen_x11 = 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. /* Find the GdkWindow that this event relates to.
* Basically this means substructure events * Basically this means substructure events
* are reported same as structure events * are reported same as structure events

View File

@ -82,19 +82,12 @@ _gdk_input_disable_window(GdkWindow *window, GdkDevicePrivate *gdkdev)
return TRUE; return TRUE;
} }
gint gboolean
_gdk_input_window_none_event (GdkEvent *event,
XEvent *xevent)
{
return -1;
}
gint
_gdk_input_other_event (GdkEvent *event, _gdk_input_other_event (GdkEvent *event,
XEvent *xevent, XEvent *xevent,
GdkWindow *window) GdkWindow *window)
{ {
return -1; return FALSE;
} }
void void

View File

@ -520,7 +520,7 @@ gdk_input_translate_state(guint state, guint device_state)
} }
gint gboolean
_gdk_input_common_other_event (GdkEvent *event, _gdk_input_common_other_event (GdkEvent *event,
XEvent *xevent, XEvent *xevent,
GdkInputWindow *input_window, GdkInputWindow *input_window,
@ -667,7 +667,7 @@ _gdk_input_common_other_event (GdkEvent *event,
return TRUE; return TRUE;
} }
return -1; /* wasn't one of our event types */ return FALSE; /* wasn't one of our event types */
} }
gboolean gboolean

View File

@ -178,7 +178,7 @@ _gdk_input_enter_event (XCrossingEvent *xevent,
input_window->root_y = root_y; input_window->root_y = root_y;
} }
gint gboolean
_gdk_input_other_event (GdkEvent *event, _gdk_input_other_event (GdkEvent *event,
XEvent *xevent, XEvent *xevent,
GdkWindow *window) GdkWindow *window)
@ -190,7 +190,7 @@ _gdk_input_other_event (GdkEvent *event,
GdkDisplayX11 *display_impl = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window)); GdkDisplayX11 *display_impl = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window));
input_window = _gdk_input_window_find(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 - /* This is a sort of a hack, as there isn't any XDeviceAnyEvent -
but it's potentially faster than scanning through the types of 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), gdkdev = _gdk_input_find_device (GDK_WINDOW_DISPLAY (window),
((XDeviceButtonEvent *)xevent)->deviceid); ((XDeviceButtonEvent *)xevent)->deviceid);
if (!gdkdev) 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 /* FIXME: It would be nice if we could just get rid of the events
entirely, instead of having to ignore them */ 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, return_val = _gdk_input_common_other_event (event, xevent,
input_window, gdkdev); 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) display_impl->input_ignore_core)
gdk_input_check_proximity(GDK_WINDOW_DISPLAY (window)); 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;
}

View File

@ -143,13 +143,11 @@ gint _gdk_input_enable_window (GdkWindow *window,
GdkDevicePrivate *gdkdev); GdkDevicePrivate *gdkdev);
gint _gdk_input_disable_window (GdkWindow *window, gint _gdk_input_disable_window (GdkWindow *window,
GdkDevicePrivate *gdkdev); GdkDevicePrivate *gdkdev);
gint _gdk_input_window_none_event (GdkEvent *event,
XEvent *xevent);
void _gdk_input_configure_event (XConfigureEvent *xevent, void _gdk_input_configure_event (XConfigureEvent *xevent,
GdkWindow *window); GdkWindow *window);
void _gdk_input_enter_event (XCrossingEvent *xevent, void _gdk_input_enter_event (XCrossingEvent *xevent,
GdkWindow *window); GdkWindow *window);
gint _gdk_input_other_event (GdkEvent *event, gboolean _gdk_input_other_event (GdkEvent *event,
XEvent *xevent, XEvent *xevent,
GdkWindow *window); GdkWindow *window);
gint _gdk_input_grab_pointer (GdkWindow *window, gint _gdk_input_grab_pointer (GdkWindow *window,