summaryrefslogtreecommitdiff
path: root/app/cwm/screen.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-07-06 14:18:01 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-07-06 14:18:01 +0000
commit9a769cec8180883794c96a1c0c9a9a7021428296 (patch)
treea9517ec9e5b7bc57593b989fef82f6c23fc1ef9e /app/cwm/screen.c
parent4bab8a2d804d192dd94c6ffe752b092f05797af9 (diff)
querying for Xinerama should be done per display, not per screen, so
move chuck to display init; allows some shuffling to occur limiting screen_init_xinerama()'s scope while keeping order intact.
Diffstat (limited to 'app/cwm/screen.c')
-rw-r--r--app/cwm/screen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/cwm/screen.c b/app/cwm/screen.c
index 71c337270..def241d4c 100644
--- a/app/cwm/screen.c
+++ b/app/cwm/screen.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: screen.c,v 1.30 2012/07/05 17:35:13 okan Exp $
+ * $OpenBSD: screen.c,v 1.31 2012/07/06 14:18:00 okan Exp $
*/
#include <sys/param.h>
@@ -30,6 +30,8 @@
#include "calmwm.h"
+static void screen_init_xinerama(struct screen_ctx *);
+
struct screen_ctx *
screen_fromroot(Window rootwin)
{
@@ -65,6 +67,10 @@ screen_updatestackingorder(struct screen_ctx *sc)
XFree(wins);
}
+/*
+ * If we're using RandR then we'll redo this whenever the screen
+ * changes since a CTRC may have been added or removed
+ */
void
screen_init_xinerama(struct screen_ctx *sc)
{
@@ -114,6 +120,8 @@ screen_update_geometry(struct screen_ctx *sc)
sc->xmax = DisplayWidth(X_Dpy, sc->which);
sc->ymax = DisplayHeight(X_Dpy, sc->which);
+ screen_init_xinerama(sc);
+
xu_ewmh_net_desktop_geometry(sc);
xu_ewmh_net_workarea(sc);
}