mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
use screen_find() for xrandr crtc changes
This commit is contained in:
parent
5bc2098c6f
commit
e55c0d48fa
13
xevents.c
13
xevents.c
@ -431,21 +431,18 @@ xev_handle_clientmessage(XEvent *ee)
|
|||||||
static void
|
static void
|
||||||
xev_handle_randr(XEvent *ee)
|
xev_handle_randr(XEvent *ee)
|
||||||
{
|
{
|
||||||
XRRScreenChangeNotifyEvent *rev = (XRRScreenChangeNotifyEvent *)ee;
|
XRRScreenChangeNotifyEvent *e = (XRRScreenChangeNotifyEvent *)ee;
|
||||||
struct screen_ctx *sc;
|
struct screen_ctx *sc;
|
||||||
int i;
|
|
||||||
|
|
||||||
LOG_DEBUG3("new size: %d/%d", rev->width, rev->height);
|
LOG_DEBUG3("size: %d/%d", e->width, e->height);
|
||||||
|
|
||||||
|
if ((sc = screen_find(e->root)) == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
i = XRRRootToScreen(X_Dpy, rev->root);
|
|
||||||
TAILQ_FOREACH(sc, &Screenq, entry) {
|
|
||||||
if (sc->which == i) {
|
|
||||||
XRRUpdateConfiguration(ee);
|
XRRUpdateConfiguration(ee);
|
||||||
screen_update_geometry(sc);
|
screen_update_geometry(sc);
|
||||||
screen_assert_clients_within(sc);
|
screen_assert_clients_within(sc);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called when the keymap has changed.
|
* Called when the keymap has changed.
|
||||||
|
Loading…
Reference in New Issue
Block a user