From 229a84202f3fda6f175e9861208b9fc0b7fb3c34 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 1 Jan 2021 00:49:25 -0800 Subject: *: return MRU object from _mru() funcs minor ergonomic improvement; enables plain wrapping of creates or other relevant object pointers with _mru() calls without requiring an intermediate storage variable. --- src/desktop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/desktop.c') diff --git a/src/desktop.c b/src/desktop.c index 6038383..8abc4d6 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -29,10 +29,12 @@ #include "xwindow.h" /* make the specified desktop the most recently used one */ -void vwm_desktop_mru(vwm_t *vwm, vwm_desktop_t *desktop) +vwm_desktop_t * vwm_desktop_mru(vwm_t *vwm, vwm_desktop_t *desktop) { VWM_TRACE("MRU desktop: %p", desktop); list_move(&desktop->desktops_mru, &vwm->desktops_mru); + + return desktop; } -- cgit v1.2.3