x11: Don't pass a GdkEvent to shape cache filters

The filter functions never look at that event, and
we want to get out of the business of passing half-
constructed events around.
This commit is contained in:
Matthias Clasen 2020-02-15 10:34:28 -05:00
parent 9c4f19e8ed
commit 94fe0944cc
3 changed files with 3 additions and 7 deletions

View File

@ -354,7 +354,6 @@ gdk_surface_cache_add (GdkSurfaceCache *cache,
GdkFilterReturn
gdk_surface_cache_shape_filter (const XEvent *xevent,
GdkEvent *event,
gpointer data)
{
GdkSurfaceCache *cache = data;
@ -388,7 +387,6 @@ gdk_surface_cache_shape_filter (const XEvent *xevent,
GdkFilterReturn
gdk_surface_cache_filter (const XEvent *xevent,
GdkEvent *event,
gpointer data)
{
GdkSurfaceCache *cache = data;

View File

@ -240,7 +240,7 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
/* apply XSettings filters */
if (xevent->xany.window == XRootWindow (dpy, 0))
result = gdk_xsettings_root_window_filter (xevent,x11_screen);
result = gdk_xsettings_root_window_filter (xevent, x11_screen);
if (result == GDK_FILTER_CONTINUE &&
xevent->xany.window == x11_screen->xsettings_manager_window)
@ -250,11 +250,11 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
if (cache)
{
if (result == GDK_FILTER_CONTINUE)
result = gdk_surface_cache_shape_filter (xevent, event, cache);
result = gdk_surface_cache_shape_filter (xevent, cache);
if (result == GDK_FILTER_CONTINUE &&
xevent->xany.window == XRootWindow (dpy, 0))
result = gdk_surface_cache_filter (xevent, event, cache);
result = gdk_surface_cache_filter (xevent, cache);
}
if (result == GDK_FILTER_CONTINUE)

View File

@ -212,11 +212,9 @@ gdk_surface_cache_get (GdkDisplay *display);
GdkFilterReturn
gdk_surface_cache_filter (const XEvent *xevent,
GdkEvent *event,
gpointer data);
GdkFilterReturn
gdk_surface_cache_shape_filter (const XEvent *xevent,
GdkEvent *event,
gpointer data);
void _gdk_x11_cursor_display_finalize (GdkDisplay *display);