mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-05 13:29:50 -05:00
Pass button clicks through to compositor.
This lets us handle raising windows, which is useful.
This commit is contained in:
parent
98fed0fb84
commit
eac149ad06
3 changed files with 50 additions and 0 deletions
12
wayland.c
12
wayland.c
|
|
@ -677,8 +677,13 @@ WL_EXPORT void
|
|||
wl_display_post_button_event(struct wl_display *display,
|
||||
struct wl_object *source, int button, int state)
|
||||
{
|
||||
const struct wl_compositor_interface *interface;
|
||||
uint32_t p[4];
|
||||
|
||||
interface = display->compositor->interface;
|
||||
interface->notify_pointer_button(display->compositor, source,
|
||||
button, state);
|
||||
|
||||
p[0] = source->id;
|
||||
p[1] = (sizeof p << 16) | WL_INPUT_BUTTON;
|
||||
p[2] = button;
|
||||
|
|
@ -833,3 +838,10 @@ wl_surface_iterator_destroy(struct wl_surface_iterator *iterator)
|
|||
{
|
||||
free(iterator);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_display_raise_surface(struct wl_display *display, struct wl_surface *surface)
|
||||
{
|
||||
wl_list_remove(&surface->link);
|
||||
wl_list_insert(display->surface_list.prev, &surface->link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue