summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mcwm.c b/mcwm.c
index c85ceed..6292369 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -2676,6 +2676,7 @@ void topright(void)
{
int16_t pointx;
int16_t pointy;
+ int16_t mon_x;
uint16_t mon_y;
uint16_t mon_width;
@@ -2687,11 +2688,13 @@ void topright(void)
if (NULL == focuswin->monitor)
{
mon_width = screen->width_in_pixels;
+ mon_x = 0;
mon_y = 0;
}
else
{
mon_width = focuswin->monitor->width;
+ mon_x = focuswin->monitor->x;
mon_y = focuswin->monitor->y;
}
@@ -2702,7 +2705,9 @@ void topright(void)
return;
}
- focuswin->x = mon_width - (focuswin->width + conf.borderwidth * 2);
+ focuswin->x = mon_x + mon_width -
+ (focuswin->width + conf.borderwidth * 2);
+
focuswin->y = mon_y;
movewindow(focuswin->id, focuswin->x, focuswin->y);