summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-05-21 13:55:19 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-05-21 13:55:19 -0400
commit168288b1778dd3c2148736ae3c63e250cd57e8c1 (patch)
tree2a12947e4e8348a4e3731b237f51e2c38e329918
parentb4ad4cbdb28a1d18e9a66d98fa23ebb6424010ab (diff)
xwm: Account for shadow and frame size when positioning transient windows
-rw-r--r--src/xserver-launcher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xserver-launcher.c b/src/xserver-launcher.c
index 64d217b..5e44598 100644
--- a/src/xserver-launcher.c
+++ b/src/xserver-launcher.c
@@ -1920,6 +1920,7 @@ xserver_map_shell_surface(struct weston_wm *wm,
struct weston_shell_interface *shell_interface =
&wm->server->compositor->shell_interface;
struct weston_wm_window *parent;
+ struct theme *t = window->wm->theme;
if (!shell_interface->create_shell_surface)
return;
@@ -1934,8 +1935,8 @@ xserver_map_shell_surface(struct weston_wm *wm,
parent = hash_table_lookup(wm->window_hash, window->transient_for->id);
shell_interface->set_transient(window->shsurf, parent->shsurf,
- window->x - parent->x,
- window->y - parent->y,
+ window->x - parent->x + t->margin + t->width,
+ window->y - parent->y + t->margin + t->titlebar_height,
WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
}