wayland: Do not claim tablet tool events as consumed without focus
If the tablet tool has no focus, it should let events go through. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3625>
This commit is contained in:
parent
a26fca0117
commit
4c4c0b847d
1 changed files with 5 additions and 5 deletions
|
@ -792,9 +792,7 @@ static void
|
||||||
handle_motion_event (MetaWaylandTabletTool *tool,
|
handle_motion_event (MetaWaylandTabletTool *tool,
|
||||||
const ClutterEvent *event)
|
const ClutterEvent *event)
|
||||||
{
|
{
|
||||||
if (!tool->focus_surface)
|
g_assert (tool->focus_surface);
|
||||||
return;
|
|
||||||
|
|
||||||
broadcast_motion (tool, event);
|
broadcast_motion (tool, event);
|
||||||
broadcast_axes (tool, event);
|
broadcast_axes (tool, event);
|
||||||
broadcast_frame (tool, event);
|
broadcast_frame (tool, event);
|
||||||
|
@ -807,8 +805,7 @@ handle_button_event (MetaWaylandTabletTool *tool,
|
||||||
ClutterEventType event_type;
|
ClutterEventType event_type;
|
||||||
int button;
|
int button;
|
||||||
|
|
||||||
if (!tool->focus_surface)
|
g_assert (tool->focus_surface);
|
||||||
return;
|
|
||||||
|
|
||||||
event_type = clutter_event_type (event);
|
event_type = clutter_event_type (event);
|
||||||
button = clutter_event_get_button (event);
|
button = clutter_event_get_button (event);
|
||||||
|
@ -869,6 +866,9 @@ gboolean
|
||||||
meta_wayland_tablet_tool_handle_event (MetaWaylandTabletTool *tool,
|
meta_wayland_tablet_tool_handle_event (MetaWaylandTabletTool *tool,
|
||||||
const ClutterEvent *event)
|
const ClutterEvent *event)
|
||||||
{
|
{
|
||||||
|
if (!tool->focus_surface)
|
||||||
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
|
||||||
switch (clutter_event_type (event))
|
switch (clutter_event_type (event))
|
||||||
{
|
{
|
||||||
case CLUTTER_PROXIMITY_IN:
|
case CLUTTER_PROXIMITY_IN:
|
||||||
|
|
Loading…
Reference in a new issue