9vx: ...and if you love plan9 more than your x86 host - Plan9

This is a discussion on 9vx: ...and if you love plan9 more than your x86 host - Plan9 ; It's more fun to use 9vx in the fullscreen mode to get a complete Plan9 experience. Press to toggle fullscreen mode. Patch attached. Thanks for 9vx. It makes things a lot easier -- Abhishek diff -r 9007574b0ca2 src/9vx/x11/x11-kernel.c --- a/src/9vx/x11/x11-kernel.c ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: 9vx: ...and if you love plan9 more than your x86 host

  1. 9vx: ...and if you love plan9 more than your x86 host

    It's more fun to use 9vx in the fullscreen mode to get a complete
    Plan9 experience.

    Press to toggle fullscreen mode.
    Patch attached.

    Thanks for 9vx. It makes things a lot easier

    -- Abhishek

    diff -r 9007574b0ca2 src/9vx/x11/x11-kernel.c
    --- a/src/9vx/x11/x11-kernel.c Sun Jun 29 22:24:21 2008 -0400
    +++ b/src/9vx/x11/x11-kernel.c Mon Jun 30 10:04:59 2008 -0600
    @@ -26,6 +26,14 @@ Rectangle windowrect;
    Rectangle windowrect;
    Rectangle screenrect;
    int fullscreen;
    +
    +enum
    +{
    + _NET_WM_STATE_REMOVE =0,
    + _NET_WM_STATE_ADD = 1,
    + _NET_WM_STATE_TOGGLE =2
    +
    +};

    /*
    * Handle an incoming X event.
    @@ -86,7 +94,24 @@ runxevent(XEvent *xev)
    XLookupString((XKeyEvent*)xev, NULL, 0, &k, NULL);
    if(k == XK_F11){
    fullscreen = !fullscreen;
    - //TODO _xmovewindow(fullscreen ? screenrect :
    windowrect);
    + //TODO _xmovewindow(fullscreen ? screenrect :
    windowrect);
    +
    + Atom windowState = XInternAtom(_x.display,
    "_NET_WM_STATE", False);
    + Atom fullScreen =
    XInternAtom(_x.display,"_NET_WM_STATE_FULLSCREEN", False);
    +
    + XEvent fscrev;
    + fscrev.xclient.type=ClientMessage;
    + fscrev.xclient.serial = 0;
    + fscrev.xclient.send_event=True;
    + fscrev.xclient.window=_x.drawable;
    + fscrev.xclient.message_type=windowState;
    + fscrev.xclient.format=32;
    + fscrev.xclient.data.l[0] = (fullscreen ?
    _NET_WM_STATE_ADD :_NET_WM_STATE_REMOVE);
    + fscrev.xclient.data.l[1] = fullScreen;
    + fscrev.xclient.data.l[2] = 0;
    +
    + XSendEvent(_x.display,
    DefaultRootWindow(_x.display), False,
    + SubstructureRedirectMask |
    SubstructureNotifyMask,&fscrev);
    return;
    }
    _xtoplan9kbd(xev);

  2. Re: [9fans] 9vx: ...and if you love plan9 more than your x86 host

    > It's more fun to use 9vx in the fullscreen mode to get a complete
    > Plan9 experience.
    >
    > Press to toggle fullscreen mode.
    > Patch attached.


    Checked F11 code into hg. Instead of sending the window
    manager a "make me fullscreen" request like your code did,
    the code I added (taken from p9p) just resizes the window
    to take up the whole screen. I would be happy to use the
    window manager version (which I added, but if'ed out)
    except that it doesn't work with p9p rio. Please speak up if
    the "move the window" approach doesn't work with your
    window manager. If it doesn't, then we can make your
    version the default once someone volunteers to add support
    to rio.

    Russ



+ Reply to Thread