diff options
| -rw-r--r-- | slock.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -201,8 +201,13 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, | |||
| 201 | rre = (XRRScreenChangeNotifyEvent*)&ev; | 201 | rre = (XRRScreenChangeNotifyEvent*)&ev; |
| 202 | for (screen = 0; screen < nscreens; screen++) { | 202 | for (screen = 0; screen < nscreens; screen++) { |
| 203 | if (locks[screen]->win == rre->window) { | 203 | if (locks[screen]->win == rre->window) { |
| 204 | XResizeWindow(dpy, locks[screen]->win, | 204 | if (rre->rotation == RR_Rotate_90 || |
| 205 | rre->width, rre->height); | 205 | rre->rotation == RR_Rotate_270) |
| 206 | XResizeWindow(dpy, locks[screen]->win, | ||
| 207 | rre->height, rre->width); | ||
| 208 | else | ||
| 209 | XResizeWindow(dpy, locks[screen]->win, | ||
| 210 | rre->width, rre->height); | ||
| 206 | XClearWindow(dpy, locks[screen]->win); | 211 | XClearWindow(dpy, locks[screen]->win); |
| 207 | } | 212 | } |
| 208 | } | 213 | } |
