aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-06 07:34:33 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-06 07:34:33 -0500
commit47f268d8fa83a08cd5c07f2ce50c2ce8b93126de (patch)
tree2864dc44c17250428831a00471a8ee3e96b956a2 /sway/desktop/xwayland.c
parentMerge pull request #1498 from emersion/config (diff)
downloadsway-47f268d8fa83a08cd5c07f2ce50c2ce8b93126de.tar.gz
sway-47f268d8fa83a08cd5c07f2ce50c2ce8b93126de.tar.zst
sway-47f268d8fa83a08cd5c07f2ce50c2ce8b93126de.zip
view activate
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 266a5869..65c7e1ec 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -70,6 +70,14 @@ static void set_position(struct sway_view *view, double ox, double oy) {
70 view->width, view->height); 70 view->width, view->height);
71} 71}
72 72
73static void set_activated(struct sway_view *view, bool activated) {
74 if (!assert_xwayland(view)) {
75 return;
76 }
77 struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
78 wlr_xwayland_surface_activate(surface, activated);
79}
80
73static void handle_commit(struct wl_listener *listener, void *data) { 81static void handle_commit(struct wl_listener *listener, void *data) {
74 struct sway_xwayland_surface *sway_surface = 82 struct sway_xwayland_surface *sway_surface =
75 wl_container_of(listener, sway_surface, commit); 83 wl_container_of(listener, sway_surface, commit);
@@ -133,6 +141,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
133 sway_view->iface.get_prop = get_prop; 141 sway_view->iface.get_prop = get_prop;
134 sway_view->iface.set_size = set_size; 142 sway_view->iface.set_size = set_size;
135 sway_view->iface.set_position = set_position; 143 sway_view->iface.set_position = set_position;
144 sway_view->iface.set_activated = set_activated;
136 sway_view->wlr_xwayland_surface = xsurface; 145 sway_view->wlr_xwayland_surface = xsurface;
137 sway_view->sway_xwayland_surface = sway_surface; 146 sway_view->sway_xwayland_surface = sway_surface;
138 // TODO remove from the tree when the surface goes away (unmapped) 147 // TODO remove from the tree when the surface goes away (unmapped)