[openbox] Using Mouse To Change Virtual Desktops

Mikael Magnusson mikachu at gmail.com
Sat Jun 30 14:32:35 EDT 2012


On 30/06/2012, Andrew Gallant <jamslam at gmail.com> wrote:
>> That won't work, openbox only gets motion events while dragging a
>> window, because otherwise we don't care. What you want is to have
>> invisible windows mapped along each edge and listen to enter/leave
>> events on those. I have this partially implemented in my git repo in
>> the edges branch.
>
> Fascinating! Are you using compositing for the invisible windows? If
> not, how do you get them to have a geometry with no visibility?

You've been able to do this for decades, definitely nothing related to
compositing. Just create a window that is InputOnly instead of
InputOutput (or OutputOnly).

        edge[i]->win = XCreateWindow(obt_display, obt_root(ob_screen),
                                     r.x, r.y, r.width, r.height, 0,
0, InputOnly,
                                     CopyFromParent, CWOverrideRedirect, &xswa);
        XSelectInput(obt_display, edge[i]->win, ButtonPressMask |
ButtonReleaseMask
                     | EnterWindowMask | LeaveWindowMask);
        XMapWindow(obt_display, edge[i]->win);

(sorry if gmail messes that up a bit)

-- 
Mikael Magnusson


More information about the openbox mailing list