mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Hide wayland cursor when X11 compositor loses focus
This commit is contained in:
parent
554a131b29
commit
86e0989673
4 changed files with 22 additions and 6 deletions
|
|
@ -346,7 +346,9 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
|
|||
XCB_EVENT_MASK_BUTTON_RELEASE |
|
||||
XCB_EVENT_MASK_POINTER_MOTION |
|
||||
XCB_EVENT_MASK_EXPOSURE |
|
||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY,
|
||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY |
|
||||
XCB_EVENT_MASK_ENTER_WINDOW |
|
||||
XCB_EVENT_MASK_LEAVE_WINDOW,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -559,6 +561,17 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
|
|||
r->width = expose->width;
|
||||
r->height = expose->height;
|
||||
break;
|
||||
|
||||
case XCB_ENTER_NOTIFY:
|
||||
c->base.focus = 1;
|
||||
wlsc_compositor_schedule_repaint(&c->base);
|
||||
break;
|
||||
|
||||
case XCB_LEAVE_NOTIFY:
|
||||
c->base.focus = 0;
|
||||
wlsc_compositor_schedule_repaint(&c->base);
|
||||
break;
|
||||
|
||||
case XCB_CLIENT_MESSAGE:
|
||||
client_message = (xcb_client_message_event_t *) event;
|
||||
atom = client_message->data.data32[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue