diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2016-03-09 17:00:31 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2016-03-14 16:50:36 +0100 |
commit | 2923f69d3cc3a3518b847c8d91e5003584cb50f9 (patch) | |
tree | 2f1c2aa3a708c4f0a48507f92608273a7069c976 /gdk/gdkevents.c | |
parent | 160a4fe5ac3ff8d857c4dcc90f81a51cd133ab61 (diff) | |
download | gtk+-2923f69d3cc3a3518b847c8d91e5003584cb50f9.tar.gz |
gdkdnd: Add private means to commit the drag status
The way gdk_drag_status() may be called multiple times during the
processing of drag and drop events throughout the widget hierarchy
brings some superfluous messaging going in, esp. when it's the last
request the one we want to honor, yet we emit messaging requests on
all.
This is barely appreciable in the X11 backend, but due to the design
of the wayland protocol, quick series of changes like this it have
some self-amplificating consequences which may end up flooding the
connection.
We can delegate this to a late "commit" call, performed within GDK
event management. This way gdk_drag_status() calls may be cached
and only result in windowing messaging once per ::drag-motion or
::drag-data-received event. Emitting the final status will also
avoid spurious action changes on the compositor and the other peer.
https://bugzilla.gnome.org/show_bug.cgi?id=763298
Diffstat (limited to 'gdk/gdkevents.c')
-rw-r--r-- | gdk/gdkevents.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 6a6771cf0a..2eb249e776 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -71,6 +71,9 @@ _gdk_event_emit (GdkEvent *event) if (_gdk_event_func) (*_gdk_event_func) (event, _gdk_event_data); + + if (gdk_drag_context_handle_dest_event (event)) + return; } /********************************************* |