Re: empty workspace and kpress bindings

Tuomo Valkonen <[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
On 2008-09-21 10:20 -0600, John Harrigan wrote:
> At this point Super_L and Menu won't do anything when pressed.

For me (irrespective of running other programs), the switch key
switches to the next workspace, but if it is an empty group, i.e.
a "floating workspace" with no windows, it stops there. This seems
to be related to another focus annoyance that's been bothering me
(sometimes opening a new window in an empty group does not give
it the focus), but not enough to actually having yet got around
to looking into.

The attached patch may fix the issue. (It is also available from
the darcs repos).

-- 
Tuomo
focushack.diff (text/plain, 755 B)
Sun Sep 21 21:40:19 EEST 2008  Tuomo Valkonen <[email protected]>
  * WMPlex focus hack for the case of only an empty group to display.
diff -rN -u old-ion-3/ioncore/mplex.c new-ion-3/ioncore/mplex.c
--- old-ion-3/ioncore/mplex.c	2008-09-21 21:42:17.669319031 +0300
+++ new-ion-3/ioncore/mplex.c	2008-09-21 21:42:17.889409632 +0300
@@ -667,6 +667,12 @@
     
     st=mplex_find_to_focus(mplex, node, NULL, hidelist);
     
+    /* If 'node' points to a group, it isn't actually on the stacking list. 
+     * Give it the focus, if there's nothing "proper" that could be focussed.
+     */
+    if(st==NULL && grp!=NULL && REGION_IS_MAPPED(grp))
+        st=node;
+    
     if(st==node && within!=NULL)
         *within=TRUE;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.