From 3ca9c4569b8898dcc407ed0020fc50bc6e459b3a Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 25 Aug 2015 18:29:10 +0000 Subject: Split out sticky mode checks and the restoring of a client's group and _NET_WM_DESKTOP from the config-based auto-grouping; no (intentional) behavior changes. Needed for further work in cleaning up this area. --- client.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index cf23cda..b057e7e 100644 --- a/client.c +++ b/client.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: client.c,v 1.205 2015/08/24 15:42:57 okan Exp $ + * $OpenBSD: client.c,v 1.206 2015/08/25 18:29:10 okan Exp $ */ #include @@ -120,9 +120,17 @@ client_init(Window win, struct screen_ctx *sc) else client_unhide(cc); - if (mapped) - group_autogroup(cc); - + if (mapped) { + if (group_restore(cc)) + goto out; + if (group_autogroup(cc)) + goto out; + if (Conf.flags & CONF_STICKY_GROUPS) + group_assign(sc->group_active, cc); + else + group_assign(NULL, cc); + } +out: XSync(X_Dpy, False); XUngrabServer(X_Dpy); -- cgit v1.2.3-2-gb3c3