Commit 01212ce1 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Ignore calls with <= width or height.

Mon Jul  3 14:24:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
	<= width or height.

	* gtk/gtktable.c (gtk_table_attach): Fix missed merge
	from 1.2 for parent/child states.

	* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
	of typos.

	* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
	event structures, replace with a generic axes field. Replace
	deviceid/source with GdkDevice *device.

	* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
	to extract particular axis use value from event. (Also
	can be used for normal X/Y.)

	* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
	allow for arbitrary number of axes, namespace everything
	as gdk_device_*. Replace guint32 deviceid with GdkDevice *
	everywhere.

	* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
	Get rid of the gdk_input_vtable setup if favor of simply
	defining the functions in gdkinput-none/gxi/xfree.c in
	a similar fashion to the way that the port structure is
	done.

	* gtk/gtkdnd.c: Fix fields of synthesized button press event
	for new event structures.

	* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
	new device interfaces.
parent 0c2240ba
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
Mon Jul 3 14:24:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
<= width or height.
* gtk/gtktable.c (gtk_table_attach): Fix missed merge
from 1.2 for parent/child states.
* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
of typos.
* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
event structures, replace with a generic axes field. Replace
deviceid/sourec with GdkDevice *device.
* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
to extract particular axis use value from event. (Also
can be used for normal X/Y.)
* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
allow for arbitrary number of axes, namespace everything
as gdk_device_*. Replace guint32 deviceid with GdkDevice *
everywhere.
* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
Get rid of the gdk_input_vtable setup if favor of simply
defining the functions in gdkinput-none/gxi/xfree.c in
a similar fashion to the way that the port structure is
done.
* gtk/gtkdnd.c: Fix fields of synthesized button press event
for new event structures.
* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
new device interfaces.
Sun Jul 2 18:19:50 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_create_pango_layout): Add a 'text' argument to
......
......@@ -377,6 +377,17 @@ gdk_event_free (GdkEvent *event)
case GDK_DROP_FINISHED:
gdk_drag_context_unref (event->dnd.context);
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
if (event->button.axes)
g_free (event->button.axes);
break;
case GDK_MOTION_NOTIFY:
if (event->motion.axes)
g_free (event->motion.axes);
break;
default:
break;
......@@ -440,6 +451,80 @@ gdk_event_get_time (GdkEvent *event)
return GDK_CURRENT_TIME;
}
/**
* gdk_event_get_axis:
* @event: a #GdkEvent
* @axis_use: the axis use to look for
* @value: location to store the value found
*
* Extract the axis value for a particular axis use from
* an event structure.
*
* Return value: %TRUE if the specified axis was found, otherwise %FALSE
**/
gboolean
gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value)
{
gdouble *axes;
GdkDevice *device;
g_return_val_if_fail (event != NULL, FALSE);
if (axis_use == GDK_AXIS_X || axis_use == GDK_AXIS_Y)
{
gdouble x, y;
switch (event->type)
{
case GDK_MOTION_NOTIFY:
x = event->motion.x;
y = event->motion.y;
break;
case GDK_SCROLL:
x = event->scroll.x;
y = event->scroll.y;
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
x = event->button.x;
y = event->button.y;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
x = event->crossing.x;
y = event->crossing.y;
break;
default:
return FALSE;
}
if (axis_use == GDK_AXIS_X && value)
*value = x;
if (axis_use == GDK_AXIS_Y && value)
*value = y;
return TRUE;
}
else if (event->type == GDK_BUTTON_PRESS ||
event->type == GDK_BUTTON_RELEASE)
{
device = event->button.device;
axes = event->button.axes;
}
else if (event->type == GDK_MOTION_NOTIFY)
{
device = event->motion.device;
axes = event->motion.axes;
}
else
return FALSE;
return gdk_device_get_axis (device, axes, axis_use, value);
}
/*
*--------------------------------------------------------------
* gdk_set_show_events
......
......@@ -231,13 +231,10 @@ struct _GdkEventMotion
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
gdouble *axes;
guint state;
gint16 is_hint;
GdkInputSource source;
guint32 deviceid;
GdkDevice *device;
gdouble x_root, y_root;
};
......@@ -249,13 +246,10 @@ struct _GdkEventButton
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
gdouble *axes;
guint state;
guint button;
GdkInputSource source;
guint32 deviceid;
GdkDevice *device;
gdouble x_root, y_root;
};
......@@ -267,13 +261,9 @@ struct _GdkEventScroll
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
guint state;
GdkScrollDirection direction;
GdkInputSource source;
guint32 deviceid;
GdkDevice *device;
gdouble x_root, y_root;
};
......@@ -355,8 +345,7 @@ struct _GdkEventProximity
GdkWindow *window;
gint8 send_event;
guint32 time;
GdkInputSource source;
guint32 deviceid;
GdkDevice *device;
};
struct _GdkEventClient
......@@ -416,6 +405,9 @@ void gdk_event_put (GdkEvent *event);
GdkEvent* gdk_event_copy (GdkEvent *event);
void gdk_event_free (GdkEvent *event);
guint32 gdk_event_get_time (GdkEvent *event);
gboolean gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value);
void gdk_event_handler_set (GdkEventFunc func,
gpointer data,
......
......@@ -443,7 +443,7 @@ gdk_gc_set_rgb_fg_color (GdkGC *gc, GdkColor *color)
tmp_color = *color;
gdk_rgb_find_color (cmap, &tmp_color);
gdk_gc_set_foreground (cmap, &tmp_color);
gdk_gc_set_foreground (gc, &tmp_color);
}
/**
......@@ -474,5 +474,5 @@ gdk_gc_set_rgb_bg_color (GdkGC *gc, GdkColor *color)
tmp_color = *color;
gdk_rgb_find_color (cmap, &tmp_color);
gdk_gc_set_foreground (cmap, &tmp_color);
gdk_gc_set_foreground (gc, &tmp_color);
}
......@@ -8,7 +8,8 @@ extern "C" {
#endif /* __cplusplus */
typedef struct _GdkDeviceKey GdkDeviceKey;
typedef struct _GdkDeviceInfo GdkDeviceInfo;
typedef struct _GdkDeviceAxis GdkDeviceAxis;
typedef struct _GdkDevice GdkDevice;
typedef struct _GdkTimeCoord GdkTimeCoord;
typedef enum
......@@ -41,66 +42,91 @@ typedef enum
GDK_AXIS_PRESSURE,
GDK_AXIS_XTILT,
GDK_AXIS_YTILT,
GDK_AXIS_WHEEL,
GDK_AXIS_LAST
} GdkAxisUse;
struct _GdkDeviceInfo
struct _GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
};
struct _GdkDeviceAxis
{
GdkAxisUse use;
gdouble min;
gdouble max;
};
struct _GdkDevice
{
guint32 deviceid;
/* All fields are read-only */
gchar *name;
GdkInputSource source;
GdkInputMode mode;
gint has_cursor; /* TRUE if the X pointer follows device motion */
gboolean has_cursor; /* TRUE if the X pointer follows device motion */
gint num_axes;
GdkAxisUse *axes; /* Specifies use for each axis */
GdkDeviceAxis *axes;
gint num_keys;
GdkDeviceKey *keys;
};
struct _GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
};
/* We don't allocate each coordinate this big, but we use it to
* be ANSI compliant and avoid accessing past the defined limits.
*/
#define GDK_MAX_TIMECOORD_AXES 128
struct _GdkTimeCoord
{
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
gdouble axes[GDK_MAX_TIMECOORD_AXES];
};
GList * gdk_input_list_devices (void);
void gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode);
void gdk_input_set_source (guint32 deviceid,
GdkInputSource source);
gboolean gdk_input_set_mode (guint32 deviceid,
GdkInputMode mode);
void gdk_input_set_axes (guint32 deviceid,
GdkAxisUse *axes);
void gdk_input_set_key (guint32 deviceid,
guint index,
guint keyval,
GdkModifierType modifiers);
void gdk_input_window_get_pointer (GdkWindow *window,
guint32 deviceid,
gdouble *x,
gdouble *y,
gdouble *pressure,
gdouble *xtilt,
gdouble *ytilt,
GdkModifierType *mask);
GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
guint32 deviceid,
guint32 start,
guint32 stop,
gint *nevents_return);
/* Returns a list of GdkDevice * */
GList * gdk_devices_list (void);
/* Functions to configure a device */
void gdk_device_set_source (GdkDevice *device,
GdkInputSource source);
gboolean gdk_device_set_mode (GdkDevice *device,
GdkInputMode mode);
void gdk_device_set_key (GdkDevice *device,
guint index,
guint keyval,
GdkModifierType modifiers);
void gdk_device_set_axis_use (GdkDevice *device,
guint index,
GdkAxisUse use);
void gdk_device_get_state (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask);
gboolean gdk_device_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
void gdk_device_free_history (GdkTimeCoord **events,
gint n_events);
gboolean gdk_device_get_axis (GdkDevice *device,
gdouble *axes,
GdkAxisUse use,
gdouble *value);
void gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode);
extern GdkDevice *gdk_core_pointer;
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -283,10 +283,9 @@ gdk_event_translate (GdkEvent *event,
* some circumstances.
*/
if ((xevent->xany.window == None) &&
gdk_input_vtable.window_none_event)
if (xevent->xany.window == None)
{
return_val = gdk_input_vtable.window_none_event (event,xevent);
return_val = _gdk_input_window_none_event (event, xevent);
if (return_val >= 0) /* was handled */
return return_val;
......@@ -517,12 +516,8 @@ gdk_event_translate (GdkEvent *event,
event->scroll.y = xevent->xbutton.y + yoffset;
event->scroll.x_root = (gfloat)xevent->xbutton.x_root;
event->scroll.y_root = (gfloat)xevent->xbutton.y_root;
event->scroll.pressure = 0.5;
event->scroll.xtilt = 0;
event->scroll.ytilt = 0;
event->scroll.state = (GdkModifierType) xevent->xbutton.state;
event->scroll.source = GDK_SOURCE_MOUSE;
event->scroll.deviceid = GDK_CORE_POINTER;
event->scroll.device = gdk_core_pointer;
}
else
{
......@@ -533,13 +528,10 @@ gdk_event_translate (GdkEvent *event,
event->button.y = xevent->xbutton.y + yoffset;
event->button.x_root = (gfloat)xevent->xbutton.x_root;
event->button.y_root = (gfloat)xevent->xbutton.y_root;
event->button.pressure = 0.5;
event->button.xtilt = 0;
event->button.ytilt = 0;
event->button.axes = NULL;
event->button.state = (GdkModifierType) xevent->xbutton.state;
event->button.button = xevent->xbutton.button;
event->button.source = GDK_SOURCE_MOUSE;
event->button.deviceid = GDK_CORE_POINTER;
event->button.device = gdk_core_pointer;
gdk_event_button_generate (event);
}
......@@ -575,13 +567,10 @@ gdk_event_translate (GdkEvent *event,
event->button.y = xevent->xbutton.y + yoffset;
event->button.x_root = (gfloat)xevent->xbutton.x_root;
event->button.y_root = (gfloat)xevent->xbutton.y_root;
event->button.pressure = 0.5;
event->button.xtilt = 0;
event->button.ytilt = 0;
event->button.axes = NULL;
event->button.state = (GdkModifierType) xevent->xbutton.state;
event->button.button = xevent->xbutton.button;
event->button.source = GDK_SOURCE_MOUSE;
event->button.deviceid = GDK_CORE_POINTER;
event->button.device = gdk_core_pointer;
break;
......@@ -607,13 +596,10 @@ gdk_event_translate (GdkEvent *event,
event->motion.y = xevent->xmotion.y + yoffset;
event->motion.x_root = (gfloat)xevent->xmotion.x_root;
event->motion.y_root = (gfloat)xevent->xmotion.y_root;
event->motion.pressure = 0.5;
event->motion.xtilt = 0;
event->motion.ytilt = 0;
event->motion.axes = NULL;
event->motion.state = (GdkModifierType) xevent->xmotion.state;
event->motion.is_hint = xevent->xmotion.is_hint;
event->motion.source = GDK_SOURCE_MOUSE;
event->motion.deviceid = GDK_CORE_POINTER;
event->motion.device = gdk_core_pointer;
break;
......@@ -627,9 +613,8 @@ gdk_event_translate (GdkEvent *event,
/* Tell XInput stuff about it if appropriate */
if (window_private &&
!GDK_WINDOW_DESTROYED (window) &&
(window_private->extension_events != 0) &&
gdk_input_vtable.enter_event)
gdk_input_vtable.enter_event (&xevent->xcrossing, window);
window_private->extension_events != 0)
_gdk_input_enter_event (&xevent->xcrossing, window);
event->crossing.type = GDK_ENTER_NOTIFY;
event->crossing.window = window;
......@@ -999,9 +984,8 @@ gdk_event_translate (GdkEvent *event,
: ""));
if (window &&
!GDK_WINDOW_DESTROYED (window) &&
(window_private->extension_events != 0) &&
gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window);
(window_private->extension_events != 0))
_gdk_input_configure_event (&xevent->xconfigure, window);
if (!window || GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
return_val = FALSE;
......@@ -1180,9 +1164,8 @@ gdk_event_translate (GdkEvent *event,
if (window_private &&
!GDK_WINDOW_DESTROYED (window_private) &&
(window_private->extension_events != 0) &&
gdk_input_vtable.other_event)
return_val = gdk_input_vtable.other_event(event, xevent, window);
(window_private->extension_events != 0))
return_val = _gdk_input_other_event(event, xevent, window);
else
return_val = FALSE;
......
......@@ -35,45 +35,13 @@
/* Forward declarations */
static void gdk_input_gxi_select_notify (GdkDevicePrivate *gdkdev);
static gint gdk_input_gxi_set_mode (guint32 deviceid, GdkInputMode mode);
static gint gdk_input_is_extension_device (guint32 deviceid);
static void gdk_input_gxi_configure_event (XConfigureEvent *xevent,
GdkWindow *window);
static void gdk_input_gxi_enter_event (XCrossingEvent *xevent,
GdkWindow *window);
static gint gdk_input_gxi_other_event (GdkEvent *event,
XEvent *xevent,
GdkWindow *window);
static gint gdk_input_is_extension_device (GdkDevicePrivate *device_private);
static void gdk_input_gxi_update_device (GdkDevicePrivate *gdkdev);
static gint gdk_input_gxi_window_none_event (GdkEvent *event, XEvent *xevent);
static gint gdk_input_gxi_enable_window (GdkWindow *window,
GdkDevicePrivate *gdkdev);
static gint gdk_input_gxi_disable_window (GdkWindow *window,
GdkDevicePrivate *gdkdev);
static Window gdk_input_find_root_child(Display *dpy, Window w);
static void gdk_input_compute_obscuring(GdkInputWindow *input_window);
static gint gdk_input_is_obscured(GdkInputWindow *input_window, gdouble x,
gdouble y);
static GdkTimeCoord *gdk_input_gxi_motion_events (GdkWindow *window,
guint32 deviceid,
guint32 start,
guint32 stop,
gint *nevents_return);
static void gdk_input_gxi_get_pointer (GdkWindow *window,
guint32 deviceid,
gdouble *x,
gdouble *y,
gdouble *pressure,
gdouble *xtilt,
gdouble *ytilt,
GdkModifierType *mask);
static gint gdk_input_gxi_grab_pointer (GdkWindow * window,
gint owner_events,
GdkEventMask event_mask,