diff options
author | okan | 2015-08-25 18:29:10 +0000 |
---|---|---|
committer | okan | 2015-08-25 18:29:10 +0000 |
commit | 3ca9c4569b8898dcc407ed0020fc50bc6e459b3a (patch) | |
tree | 7f891ebfd7983a56fc0134b09bf6be4d36918d27 /client.c | |
parent | f507af43cc37948b1f83ba74c8200059d4bba742 (diff) | |
download | cwm-3ca9c4569b8898dcc407ed0020fc50bc6e459b3a.tar.gz |
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.
Diffstat (limited to '')
-rw-r--r-- | client.c | 16 |
1 files changed, 12 insertions, 4 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: 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 <sys/types.h> @@ -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); |