summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/desktop.c4
-rw-r--r--src/desktop.h3
-rw-r--r--src/key.c4
-rw-r--r--src/vwm.c2
-rw-r--r--src/window.c2
5 files changed, 6 insertions, 9 deletions
diff --git a/src/desktop.c b/src/desktop.c
index e6130e0..6038383 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -138,7 +138,7 @@ vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop, vwm_directi
}
/* create a virtual desktop */
-vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name)
+vwm_desktop_t * vwm_desktop_create(vwm_t *vwm)
{
vwm_desktop_t *desktop;
@@ -148,8 +148,6 @@ vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name)
goto _fail;
}
- desktop->name = name == NULL ? name : strdup(name);
-
list_add_tail(&desktop->desktops, &vwm->desktops);
list_add_tail(&desktop->desktops_mru, &vwm->desktops_mru);
diff --git a/src/desktop.h b/src/desktop.h
index c231ca5..5c83a4c 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -11,13 +11,12 @@ typedef struct _vwm_window_t vwm_window_t;
typedef struct _vwm_desktop_t {
list_head_t desktops; /* global list of (virtual) desktops */
list_head_t desktops_mru; /* global list of (virtual) desktops in MRU order */
- char *name; /* name of the desktop (TODO) */
vwm_window_t *focused_window; /* the focused window on this virtual desktop */
} vwm_desktop_t;
void vwm_desktop_mru(vwm_t *vwm, vwm_desktop_t *desktop);
int vwm_desktop_focus(vwm_t *vwm, vwm_desktop_t *desktop);
-vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name);
+vwm_desktop_t * vwm_desktop_create(vwm_t *vwm);
void vwm_desktop_destroy(vwm_t *vwm, vwm_desktop_t *desktop);
vwm_desktop_t * vwm_desktop_next_mru(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction);
vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction);
diff --git a/src/key.c b/src/key.c
index 6456695..e1eee5d 100644
--- a/src/key.c
+++ b/src/key.c
@@ -204,10 +204,10 @@ void vwm_key_pressed(vwm_t *vwm, Window win, XKeyPressedEvent *keypress)
if (keypress->state & ShiftMask) {
if (vwin) {
/* migrate the focused window to a newly created virtual desktop, focusing the new desktop simultaneously */
- vwm_win_migrate(vwm, vwin, vwm_desktop_create(vwm, NULL));
+ vwm_win_migrate(vwm, vwin, vwm_desktop_create(vwm));
}
} else {
- vwm_desktop_focus(vwm, vwm_desktop_create(vwm, NULL));
+ vwm_desktop_focus(vwm, vwm_desktop_create(vwm));
vwm_desktop_mru(vwm, vwm->focused_desktop);
}
break;
diff --git a/src/vwm.c b/src/vwm.c
index a9dc184..0e47fb0 100644
--- a/src/vwm.c
+++ b/src/vwm.c
@@ -134,7 +134,7 @@ static vwm_t * vwm_startup(void)
XSetInputFocus(VWM_XDISPLAY(vwm), VWM_XROOT(vwm), RevertToPointerRoot, CurrentTime);
/* create initial virtual desktop */
- vwm_desktop_focus(vwm, vwm_desktop_create(vwm, NULL));
+ vwm_desktop_focus(vwm, vwm_desktop_create(vwm));
vwm_desktop_mru(vwm, vwm->focused_desktop);
/* manage all preexisting windows */
diff --git a/src/window.c b/src/window.c
index cfcdd36..b3e32c1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -572,7 +572,7 @@ vwm_window_t * vwm_win_manage_xwin(vwm_t *vwm, vwm_xwindow_t *xwin)
/* if the desktop has no focused window yet, automatically focus the newly managed one, provided we're on the desktop context */
if (!vwm->focused_desktop->focused_window && vwm->focused_context == VWM_CONTEXT_DESKTOP) {
- VWM_TRACE("Mapped new window \"%s\" is alone on desktop \"%s\", focusing", xwin->name, vwm->focused_desktop->name);
+ VWM_TRACE("Mapped new window \"%s\" is alone on desktop, focusing", xwin->name);
vwm_win_focus(vwm, vwin);
}
© All Rights Reserved