diff options
author | okan | 2012-11-29 03:54:46 +0000 |
---|---|---|
committer | okan | 2012-11-29 03:54:46 +0000 |
commit | a5c5711a5b97f23fdadc0e00875c7757be6ae622 (patch) | |
tree | 33274e6beeced3e89b8582f6837019d5e92775f4 /calmwm.c | |
parent | 05a3049e39b33cba59367b0f5ee2dd4beb3c357f (diff) | |
download | cwm-a5c5711a5b97f23fdadc0e00875c7757be6ae622.tar.gz |
x_setupscreen -> screen_init; no functional change.
Diffstat (limited to '')
-rw-r--r-- | calmwm.c | 60 |
1 files changed, 2 insertions, 58 deletions
@@ -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: calmwm.c,v 1.67 2012/11/09 03:52:02 okan Exp $ + * $OpenBSD: calmwm.c,v 1.68 2012/11/29 03:54:46 okan Exp $ */ #include <sys/param.h> @@ -54,7 +54,6 @@ static void dpy_init(const char *); static int x_errorhandler(Display *, XErrorEvent *); static int x_wmerrorhandler(Display *, XErrorEvent *); static void x_setup(void); -static void x_setupscreen(struct screen_ctx *, u_int); static void x_teardown(void); int @@ -135,7 +134,7 @@ x_setup(void) for (i = 0; i < ScreenCount(X_Dpy); i++) { sc = xcalloc(1, sizeof(*sc)); - x_setupscreen(sc, i); + screen_init(sc, i); TAILQ_INSERT_TAIL(&Screenq, sc, entry); } @@ -158,61 +157,6 @@ x_teardown(void) XCloseDisplay(X_Dpy); } -static void -x_setupscreen(struct screen_ctx *sc, u_int which) -{ - Window *wins, w0, w1; - XWindowAttributes winattr; - XSetWindowAttributes rootattr; - u_int nwins, i; - - sc->which = which; - sc->rootwin = RootWindow(X_Dpy, sc->which); - - xu_ewmh_net_supported(sc); - xu_ewmh_net_supported_wm_check(sc); - - conf_gap(&Conf, sc); - - screen_update_geometry(sc); - - conf_color(&Conf, sc); - - group_init(sc); - conf_font(&Conf, sc); - - TAILQ_INIT(&sc->mruq); - - /* Initialize menu window. */ - menu_init(sc); - - rootattr.cursor = Cursor_normal; - rootattr.event_mask = CHILDMASK|PropertyChangeMask|EnterWindowMask| - LeaveWindowMask|ColormapChangeMask|BUTTONMASK; - - XChangeWindowAttributes(X_Dpy, sc->rootwin, - CWEventMask|CWCursor, &rootattr); - - /* Deal with existing clients. */ - XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins); - - for (i = 0; i < nwins; i++) { - XGetWindowAttributes(X_Dpy, wins[i], &winattr); - if (winattr.override_redirect || - winattr.map_state != IsViewable) - continue; - (void)client_new(wins[i], sc, winattr.map_state != IsUnmapped); - } - XFree(wins); - - screen_updatestackingorder(sc); - - if (HasRandr) - XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask); - - XSync(X_Dpy, False); -} - static int x_wmerrorhandler(Display *dpy, XErrorEvent *e) { |