aboutsummaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorokan2012-12-17 18:34:06 +0000
committerokan2012-12-17 18:34:06 +0000
commit6ff3931470534f22415baa05817ae1bc8aa22d6c (patch)
treeca07d01bc2fa19bdd96c4326973d9efbf491556a /screen.c
parent7bb305fa2e37defb54ef76fc2e83cc6c997ad01b (diff)
downloadcwm-6ff3931470534f22415baa05817ae1bc8aa22d6c.tar.gz
stash the default screen visual and colormap in screen_ctx
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index bc37105..2f04911 100644
--- a/screen.c
+++ b/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.38 2012/11/29 03:54:46 okan Exp $
+ * $OpenBSD: screen.c,v 1.39 2012/12/17 18:34:06 okan Exp $
*/
#include <sys/param.h>
@@ -41,6 +41,8 @@ screen_init(struct screen_ctx *sc, u_int which)
u_int nwins, i;
sc->which = which;
+ sc->visual = DefaultVisual(X_Dpy, sc->which);
+ sc->colormap = DefaultColormap(X_Dpy, sc->which);
sc->rootwin = RootWindow(X_Dpy, sc->which);
xu_ewmh_net_supported(sc);