mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
xwayland: Implement move event
Closes: #81 Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
a67e74670b
commit
2a18899689
1 changed files with 19 additions and 0 deletions
|
|
@ -27,6 +27,22 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
damage_view_whole(view);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_request_move(struct wl_listener *listener, void *data)
|
||||
{
|
||||
/*
|
||||
* This event is raised when a client would like to begin an interactive
|
||||
* move, typically because the user clicked on their client-side
|
||||
* decorations. Note that a more sophisticated compositor should check
|
||||
* the provied serial against a list of button press serials sent to
|
||||
* this
|
||||
* client, to prevent the client from requesting this whenever they
|
||||
* want.
|
||||
*/
|
||||
struct view *view = wl_container_of(listener, view, request_move);
|
||||
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_map(struct wl_listener *listener, void *data)
|
||||
{
|
||||
|
|
@ -310,6 +326,9 @@ xwayland_surface_new(struct wl_listener *listener, void *data)
|
|||
view->request_fullscreen.notify = handle_request_fullscreen;
|
||||
wl_signal_add(&xsurface->events.request_fullscreen,
|
||||
&view->request_fullscreen);
|
||||
view->request_move.notify = handle_request_move;
|
||||
wl_signal_add(&xsurface->events.request_move,
|
||||
&view->request_move);
|
||||
|
||||
view->set_title.notify = handle_set_title;
|
||||
wl_signal_add(&xsurface->events.set_title, &view->set_title);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue