summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2014-01-02 22:40:37 -0800
committerKristian Høgsberg <krh@bitplanet.net>2014-01-02 22:55:04 -0800
commit9f7e331a20c56674eca1502b8adf36d5dbec3ac5 (patch)
tree61ef7b3c29f686b1215e0c234845866d8332f5e9 /xwayland
parent14613bacda591725825367177825ca917ef55f4c (diff)
xwm: Handle WM_TRANSIENT_FOR
Set up X windows that are transient for another window as transient surfaces in shell.c. This keeps the transient windows on top of their parent as windows are raised, lowered for fullscreened. https://bugs.freedesktop.org/show_bug.cgi?id=69443
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 4bce02dd..70c8cf7c 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2179,6 +2179,7 @@ xserver_map_shell_surface(struct weston_wm *wm,
struct weston_shell_interface *shell_interface =
&wm->server->compositor->shell_interface;
struct weston_output *output;
+ struct weston_wm_window *parent;
if (!shell_interface->create_shell_surface)
return;
@@ -2208,14 +2209,19 @@ xserver_map_shell_surface(struct weston_wm *wm,
shell_interface->set_fullscreen(window->shsurf,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0, output);
- } else if (!window->override_redirect && !window->transient_for) {
- shell_interface->set_toplevel(window->shsurf);
- return;
- } else {
+ } else if (window->override_redirect) {
shell_interface->set_xwayland(window->shsurf,
window->x,
window->y,
WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
+ } else if (window->transient_for) {
+ parent = window->transient_for;
+ shell_interface->set_transient(window->shsurf,
+ parent->surface,
+ parent->x - window->x,
+ parent->y - window->y, 0);
+ } else {
+ shell_interface->set_toplevel(window->shsurf);
}
}