XGrabKeyboard behavior - Xwindows

This is a discussion on XGrabKeyboard behavior - Xwindows ; My application has the usual main event processing loop which directs events to their appropriate widgets. I have an OpenGL widget which I am making full screen, and to which I want all mouse and keyboard events delivered. To make ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XGrabKeyboard behavior

  1. XGrabKeyboard behavior

    My application has the usual main event processing loop which directs events
    to their appropriate widgets.

    I have an OpenGL widget which I am making full screen, and to which I want
    all mouse and keyboard events delivered.

    To make the window full screen, I have to use the CWOverrideRedirect mask
    when creating the window. However, this kills all mouse and keyboard
    events that would normally go to that window. Here's the full set of masks
    I'm using to create the full screen window:

    lWinMasks = CWBackPixel | CWColormap | CWSaveUnder | CWBackingStore |
    CWEventMask | CWOverrideRedirect;
    swa.override_redirect = True;
    swa.backing_store = NotUseful;
    swa.save_under = False;

    Will using XGrabKeyboard and XGrabPointer to limit events to the full screen
    widget get my events working again?


  2. Re: XGrabKeyboard behavior

    Tony O'Bryan wrote:

    > Will using XGrabKeyboard and XGrabPointer to limit events to the full
    > screen widget get my events working again?


    I answered my own question. Yes it will. Now I just need to constrain the
    mouse to the window area, and I'm all set.


+ Reply to Thread