XSetInputFocus and keyboard event - Xwindows

This is a discussion on XSetInputFocus and keyboard event - Xwindows ; Hi, I am trying to understand how keyboard event is delivered. If pointer is in the keyboard focus window or one of its inferior and if any of them have their KeyPressMask/KeyReleaseMask enabled. The keyboard event is send to that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XSetInputFocus and keyboard event

  1. XSetInputFocus and keyboard event

    Hi,

    I am trying to understand how keyboard event is delivered.
    If pointer is in the keyboard focus window or one of its inferior
    and if any of them have their KeyPressMask/KeyReleaseMask enabled.
    The keyboard event is send to that window. If not the event is sent
    to the focus window. I assume that fous window should have selected
    the KeyPress/KeyRelease Mask. It that correct ?

    Thanks for your answers
    Regards
    Kanchan

  2. Re: XSetInputFocus and keyboard event

    vasant wrote:
    >Hi,
    >
    >I am trying to understand how keyboard event is delivered.
    >If pointer is in the keyboard focus window or one of its inferior
    >and if any of them have their KeyPressMask/KeyReleaseMask enabled.
    >The keyboard event is send to that window. If not the event is sent
    >to the focus window. I assume that fous window should have selected
    >the KeyPress/KeyRelease Mask. It that correct ?
    >
    >Thanks for your answers
    >Regards
    >Kanchan


    Essentially correct.

    Remember the focus can be None, in which case the event is discarded.

    It can also be PointerRoot, in which case the events are offered to
    the window hierarchy starting with the pointer window up to the root.
    This is a useful mode if you are running without a window manager since
    it is the focus-follows-pointer model.

    If there is a focus window, the event is offered to the hierarchy
    starting with the pointer window up to the focus window. The degenerate
    case occurs when the pointer is not in the focus hierarchy, and the
    event is offered only to the focus window.


+ Reply to Thread