mirror of
https://github.com/swaywm/sway.git
synced 2026-02-05 04:06:25 -05:00
server: add xdg-toplevel-drag-v1 manager
Add the xdg-toplevel-drag-v1 protocol manager to the server. This protocol allows clients to attach a toplevel window to an ongoing drag-and-drop operation, enabling features like browser tab tear-off.
This commit is contained in:
parent
f4aba22582
commit
bad8a87f4c
2 changed files with 6 additions and 0 deletions
|
|
@ -123,6 +123,8 @@ struct sway_server {
|
|||
|
||||
struct wl_listener request_set_cursor_shape;
|
||||
|
||||
struct wlr_xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager;
|
||||
|
||||
struct wlr_tearing_control_manager_v1 *tearing_control_v1;
|
||||
struct wl_listener tearing_control_new_object;
|
||||
struct wl_list tearing_controllers; // sway_tearing_controller::link
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include <wlr/types/wlr_xdg_foreign_v1.h>
|
||||
#include <wlr/types/wlr_xdg_foreign_v2.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_xdg_toplevel_drag_v1.h>
|
||||
#include <wlr/types/wlr_xdg_toplevel_tag_v1.h>
|
||||
#include <xf86drm.h>
|
||||
#include "config.h"
|
||||
|
|
@ -450,6 +451,9 @@ bool server_init(struct sway_server *server) {
|
|||
wl_signal_add(&xdg_toplevel_tag_manager_v1->events.set_tag,
|
||||
&server->xdg_toplevel_tag_manager_v1_set_tag);
|
||||
|
||||
server->xdg_toplevel_drag_manager =
|
||||
wlr_xdg_toplevel_drag_manager_v1_create(server->wl_display, 1);
|
||||
|
||||
struct wlr_cursor_shape_manager_v1 *cursor_shape_manager =
|
||||
wlr_cursor_shape_manager_v1_create(server->wl_display, 1);
|
||||
server->request_set_cursor_shape.notify = handle_request_set_cursor_shape;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue