forked from swaywm/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See swaywm/wlroots#2718.
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <wlr/types/wlr_xdg_activation_v1.h> | ||
#include "sway/tree/view.h" | ||
|
||
void xdg_activation_v1_handle_request_activate(struct wl_listener *listener, | ||
void *data) { | ||
const struct wlr_xdg_activation_v1_request_activate_event *event = data; | ||
|
||
if (!wlr_surface_is_xdg_surface(event->surface)) { | ||
return; | ||
} | ||
|
||
struct wlr_xdg_surface *xdg_surface = | ||
wlr_xdg_surface_from_wlr_surface(event->surface); | ||
struct sway_view *view = xdg_surface->data; | ||
if (!xdg_surface->mapped || view == NULL) { | ||
return; | ||
} | ||
|
||
view_request_activate(view); | ||
} |