From 67bc0ac5f4529aa91e615a0bccb42424ff432926 Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 23 Sep 2014 14:25:08 +0000 Subject: Update _NET_CURRENT_DESKTOP with the screen's group_active->num. --- xutil.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index fe1d535..26188af 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.95 2014/09/17 18:41:44 okan Exp $ + * $OpenBSD: xutil.c,v 1.96 2014/09/23 14:25:08 okan Exp $ */ #include @@ -274,10 +274,12 @@ xu_ewmh_net_virtual_roots(struct screen_ctx *sc) } void -xu_ewmh_net_current_desktop(struct screen_ctx *sc, long idx) +xu_ewmh_net_current_desktop(struct screen_ctx *sc) { + long num = sc->group_active->num; + XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_CURRENT_DESKTOP], - XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&idx, 1); + XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&num, 1); } void -- cgit v1.2.3-2-gb3c3