aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2015-08-27 18:53:14 +0000
committerokan2015-08-27 18:53:14 +0000
commit07ffeaed1ad42b2ac5e308753808ce031c1b234c (patch)
treee5107b4e28e10824f429118f7774d6732c98e93c
parentf29c717f7e0d4e9065f819e0ec7c7517cefdf69d (diff)
downloadcwm-07ffeaed1ad42b2ac5e308753808ce031c1b234c.tar.gz
Mechanical change: group->gc
-rw-r--r--calmwm.h4
-rw-r--r--client.c16
-rw-r--r--group.c14
-rw-r--r--search.c4
-rw-r--r--xutil.c6
5 files changed, 22 insertions, 22 deletions
diff --git a/calmwm.h b/calmwm.h
index 4f6b260..9d0233f 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -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.h,v 1.303 2015/08/25 18:29:10 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.304 2015/08/27 18:53:14 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -147,6 +147,7 @@ struct client_ctx {
TAILQ_ENTRY(client_ctx) entry;
TAILQ_ENTRY(client_ctx) group_entry;
struct screen_ctx *sc;
+ struct group_ctx *gc;
Window win;
Colormap colormap;
unsigned int bwidth; /* border width */
@@ -198,7 +199,6 @@ struct client_ctx {
char *name;
char *label;
char *matchname;
- struct group_ctx *group;
XClassHint ch;
XWMHints *wmh;
};
diff --git a/client.c b/client.c
index 0fd7426..5d93e81 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.208 2015/08/27 18:42:56 okan Exp $
+ * $OpenBSD: client.c,v 1.209 2015/08/27 18:53:15 okan Exp $
*/
#include <sys/types.h>
@@ -163,8 +163,8 @@ client_delete(struct client_ctx *cc)
xu_ewmh_net_client_list(sc);
xu_ewmh_net_client_list_stacking(sc);
- if (cc->group != NULL)
- TAILQ_REMOVE(&cc->group->clientq, cc, group_entry);
+ if (cc->gc != NULL)
+ TAILQ_REMOVE(&cc->gc->clientq, cc, group_entry);
if (cc == client_current())
client_none(sc);
@@ -682,7 +682,7 @@ client_cycle(struct screen_ctx *sc, int flags)
/* Only cycle visible and non-ignored windows. */
if ((newcc->flags & (CLIENT_HIDDEN | CLIENT_IGNORE))
|| ((flags & CWM_INGROUP) &&
- (newcc->group != oldcc->group)))
+ (newcc->gc != oldcc->gc)))
again = 1;
/* Is oldcc the only non-hidden window? */
@@ -915,8 +915,8 @@ client_transient(struct client_ctx *cc)
Window trans;
if (XGetTransientForHint(X_Dpy, cc->win, &trans)) {
- if ((tc = client_find(trans)) != NULL && tc->group) {
- group_movetogroup(cc, tc->group->num);
+ if ((tc = client_find(trans)) != NULL && tc->gc) {
+ group_movetogroup(cc, tc->gc->num);
if (tc->flags & CLIENT_IGNORE)
cc->flags |= CLIENT_IGNORE;
}
@@ -961,7 +961,7 @@ void
client_htile(struct client_ctx *cc)
{
struct client_ctx *ci;
- struct group_ctx *gc = cc->group;
+ struct group_ctx *gc = cc->gc;
struct screen_ctx *sc = cc->sc;
struct geom area;
int i, n, mh, x, h, w;
@@ -1020,7 +1020,7 @@ void
client_vtile(struct client_ctx *cc)
{
struct client_ctx *ci;
- struct group_ctx *gc = cc->group;
+ struct group_ctx *gc = cc->gc;
struct screen_ctx *sc = cc->sc;
struct geom area;
int i, n, mw, y, h, w;
diff --git a/group.c b/group.c
index ccbdab6..11c2737 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.119 2015/08/27 17:43:44 okan Exp $
+ * $OpenBSD: group.c,v 1.120 2015/08/27 18:53:15 okan Exp $
*/
#include <sys/types.h>
@@ -45,15 +45,15 @@ const char *num_to_name[] = {
void
group_assign(struct group_ctx *gc, struct client_ctx *cc)
{
- if (cc->group != NULL)
- TAILQ_REMOVE(&cc->group->clientq, cc, group_entry);
+ if (cc->gc != NULL)
+ TAILQ_REMOVE(&cc->gc->clientq, cc, group_entry);
if ((gc != NULL) && (gc->num == 0))
gc = NULL;
- cc->group = gc;
+ cc->gc = gc;
- if (cc->group != NULL)
+ if (cc->gc != NULL)
TAILQ_INSERT_TAIL(&gc->clientq, cc, group_entry);
xu_ewmh_net_wm_desktop(cc);
@@ -162,7 +162,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
break;
}
- if (cc->group == gc)
+ if (cc->gc == gc)
return;
if (group_holds_only_hidden(gc))
client_hide(cc);
@@ -175,7 +175,7 @@ group_toggle_membership_enter(struct client_ctx *cc)
struct screen_ctx *sc = cc->sc;
struct group_ctx *gc = sc->group_active;
- if (gc == cc->group) {
+ if (gc == cc->gc) {
group_assign(NULL, cc);
cc->flags |= CLIENT_UNGROUP;
} else {
diff --git a/search.c b/search.c
index 8d5382a..e1e19c8 100644
--- a/search.c
+++ b/search.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: search.c,v 1.50 2015/08/21 16:05:55 okan Exp $
+ * $OpenBSD: search.c,v 1.51 2015/08/27 18:53:15 okan Exp $
*/
#include <sys/types.h>
@@ -156,7 +156,7 @@ search_print_client(struct menu *mi, int list)
cc->matchname = cc->name;
(void)snprintf(mi->print, sizeof(mi->print), "(%d) %c[%s] %s",
- (cc->group) ? cc->group->num : 0, flag,
+ (cc->gc) ? cc->gc->num : 0, flag,
(cc->label) ? cc->label : "", cc->matchname);
}
diff --git a/xutil.c b/xutil.c
index c833619..c8c74da 100644
--- a/xutil.c
+++ b/xutil.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: xutil.c,v 1.102 2015/08/24 15:42:57 okan Exp $
+ * $OpenBSD: xutil.c,v 1.103 2015/08/27 18:53:15 okan Exp $
*/
#include <sys/types.h>
@@ -362,8 +362,8 @@ xu_ewmh_net_wm_desktop(struct client_ctx *cc)
{
long num = 0xffffffff;
- if (cc->group)
- num = cc->group->num;
+ if (cc->gc)
+ num = cc->gc->num;
XChangeProperty(X_Dpy, cc->win, ewmh[_NET_WM_DESKTOP],
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&num, 1);