diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/desktop.h | 3 | ||||
-rw-r--r-- | include/rootston/server.h | 3 | ||||
-rw-r--r-- | include/rootston/view.h | 5 | ||||
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 5 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 15 | ||||
-rw-r--r-- | include/wlr/types/wlr_primary_selection.h | 7 | ||||
-rw-r--r-- | include/wlr/xwayland.h | 3 | ||||
-rw-r--r-- | include/wlr/xwm.h | 37 |
8 files changed, 57 insertions, 21 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 289875c5..7039cfcf 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -2,6 +2,7 @@ #define _ROOTSTON_DESKTOP_H #include <time.h> #include <wayland-server.h> +#include "config.h" #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_compositor.h> @@ -50,7 +51,7 @@ struct roots_desktop { struct wl_listener wl_shell_surface; struct wl_listener decoration_new; -#ifdef HAS_XWAYLAND +#ifdef WLR_HAS_XWAYLAND struct wlr_xwayland *xwayland; struct wl_listener xwayland_surface; struct wl_listener xwayland_ready; diff --git a/include/rootston/server.h b/include/rootston/server.h index 8fc6530e..a014c749 100644 --- a/include/rootston/server.h +++ b/include/rootston/server.h @@ -1,11 +1,12 @@ #ifndef _ROOTSTON_SERVER_H #define _ROOTSTON_SERVER_H #include <wayland-server.h> +#include "config.h" #include <wlr/backend.h> #include <wlr/backend/session.h> #include <wlr/types/wlr_data_device.h> #include <wlr/render.h> -#ifdef HAS_XWAYLAND +#ifdef WLR_HAS_XWAYLAND #include <wlr/xwayland.h> #endif #include "rootston/config.h" diff --git a/include/rootston/view.h b/include/rootston/view.h index bb7297d0..53e96764 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -2,6 +2,7 @@ #define _ROOTSTON_VIEW_H #include <stdbool.h> +#include "config.h" #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_xdg_shell_v6.h> @@ -79,14 +80,14 @@ struct roots_view { union { struct wlr_wl_shell_surface *wl_shell_surface; struct wlr_xdg_surface_v6 *xdg_surface_v6; -#ifdef HAS_XWAYLAND +#ifdef WLR_HAS_XWAYLAND struct wlr_xwayland_surface *xwayland_surface; #endif }; union { struct roots_wl_shell_surface *roots_wl_shell_surface; struct roots_xdg_surface_v6 *roots_xdg_surface_v6; -#ifdef HAS_XWAYLAND +#ifdef WLR_HAS_XWAYLAND struct roots_xwayland_surface *roots_xwayland_surface; #endif }; diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index e0205101..92d15972 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -34,6 +34,7 @@ struct wlr_data_source { struct wl_resource *resource; struct wlr_data_offer *offer; struct wlr_seat_client *seat_client; + struct wl_array mime_types; bool accepted; @@ -122,4 +123,8 @@ void wlr_seat_client_send_selection(struct wlr_seat_client *seat_client); void wlr_seat_set_selection(struct wlr_seat *seat, struct wlr_data_source *source, uint32_t serial); +void wlr_data_source_init(struct wlr_data_source *source); + +void wlr_data_source_finish(struct wlr_data_source *source); + #endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index a974a154..8e4f5446 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -118,6 +118,19 @@ bool wlr_output_cursor_move(struct wlr_output_cursor *cursor, double x, double y); void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor); -enum wl_output_transform wlr_output_transform_invert(enum wl_output_transform); + +/** + * Returns the transform that, when composed with `tr`, gives + * `WL_OUTPUT_TRANSFORM_NORMAL`. + */ +enum wl_output_transform wlr_output_transform_invert( + enum wl_output_transform tr); + +/** + * Returns a transform that, when applied, has the same effect as applying + * sequentially `tr_a` and `tr_b`. + */ +enum wl_output_transform wlr_output_transform_compose( + enum wl_output_transform tr_a, enum wl_output_transform tr_b); #endif diff --git a/include/wlr/types/wlr_primary_selection.h b/include/wlr/types/wlr_primary_selection.h index a639b913..b4eceb78 100644 --- a/include/wlr/types/wlr_primary_selection.h +++ b/include/wlr/types/wlr_primary_selection.h @@ -48,6 +48,11 @@ void wlr_primary_selection_device_manager_destroy( void wlr_seat_client_send_primary_selection(struct wlr_seat_client *seat_client); void wlr_seat_set_primary_selection(struct wlr_seat *seat, - struct wlr_primary_selection_source *source, uint32_t serial); + struct wlr_primary_selection_source *source, uint32_t serial); + +void wlr_primary_selection_source_init( + struct wlr_primary_selection_source *source); +void wlr_primary_selection_source_finish( + struct wlr_primary_selection_source *source); #endif diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index 220b831c..37b09204 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -3,11 +3,12 @@ #include <time.h> #include <stdbool.h> +#include "config.h" #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_seat.h> #include <xcb/xcb.h> -#ifdef HAS_XCB_ICCCM +#ifdef WLR_HAS_XCB_ICCCM #include <xcb/xcb_icccm.h> #endif diff --git a/include/wlr/xwm.h b/include/wlr/xwm.h index 47e674c0..cbc2f132 100644 --- a/include/wlr/xwm.h +++ b/include/wlr/xwm.h @@ -32,6 +32,7 @@ enum atom_name { _NET_WM_STATE_MAXIMIZED_HORZ, WM_STATE, CLIPBOARD, + PRIMARY, WL_SELECTION, TARGETS, CLIPBOARD_MANAGER, @@ -49,6 +50,24 @@ enum net_wm_state_action { NET_WM_STATE_TOGGLE = 2, }; +struct wlr_xwm_selection { + struct wlr_xwm *xwm; + xcb_atom_t atom; + xcb_window_t window; + xcb_selection_request_event_t request; + xcb_window_t owner; + xcb_timestamp_t timestamp; + int incr; + int source_fd; + int property_start; + xcb_get_property_reply_t *property_reply; + struct wl_event_source *property_source; + int flush_property_on_delete; + struct wl_array source_data; + xcb_atom_t target; + bool property_set; +}; + struct wlr_xwm { struct wlr_xwayland *xwayland; struct wl_event_source *event_source; @@ -63,20 +82,9 @@ struct wlr_xwm { xcb_render_pictformat_t render_format_id; xcb_cursor_t cursor; - // selection properties xcb_window_t selection_window; - xcb_selection_request_event_t selection_request; - xcb_window_t selection_owner; - xcb_timestamp_t selection_timestamp; - int incr; - int data_source_fd; - int property_start; - xcb_get_property_reply_t *property_reply; - struct wl_event_source *property_source; - int flush_property_on_delete; - struct wl_array source_data; - xcb_atom_t selection_target; - bool selection_property_set; + struct wlr_xwm_selection clipboard_selection; + struct wlr_xwm_selection primary_selection; struct wlr_xwayland_surface *focus_surface; @@ -86,7 +94,8 @@ struct wlr_xwm { const xcb_query_extension_reply_t *xfixes; struct wl_listener compositor_surface_create; - struct wl_listener seat_selection_change; + struct wl_listener seat_selection; + struct wl_listener seat_primary_selection; }; struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland); |