summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2011-11-17 08:11:08 +0100
committerMichael Cardell Widerkrantz <mc@hack.org>2011-11-17 08:11:08 +0100
commitb67b7a9b529bae40848f429cd9d201abf18e9d5f (patch)
tree83f41aa54111ab180559593dee1fdcee8ebb46c6 /mcwm.c
parent2cc7586db72e2bf7ac558d9d63d5393ec6a5cb16 (diff)
downloadmcwm-b67b7a9b529bae40848f429cd9d201abf18e9d5f.zip
topright didn't consider start of physical screen. Only worked on
screen 1.
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);