X Window System

1. X Window System is a low-level protocol

    •Create/destroy windows

    •Move/resize windows

    •Map/unmap windows (show/hide windows)

    •Receive user inputs (key presses/releases, mouse events)

    •Draw lines/curves/bitmaps

2. Window Manager

    •Controls the general appearance of windows and other graphical elements of the GUI.

   •Chooses the size and position of windows, placing the decorative border around them, handling icons, handling mouse click outside windows (on the “background”) or on window-frame, handling certain keystrokes (e.g., Alt-F4).

3. Window

    Window information

    Some basic attributes describing the window, Includes id, title, coordinates, map state, override redirect state, etc.

    xwininfo

    •Window properties

    Extensible window attributes which heavily used by Window Manager

    Can also used to inter-client communication

    E.g., Icon, maximization state, coordinates hint, pid, etc.

    xprop

4. Xevent

    An XEvent is data generated asynchronously by the X server as a result of

    Some device activity

    Side effects of a request sent by the X client

    Event Categories

    Keyboard events: KeyPress, KeyRelease

    Mouse events: ButtonPress, ButtonRelease, MotionNotify

    Window crossing events: EnterNotify, LeaveNotify

    Input focus events: FocusIn, FocusOut

    Keymap state notification event: KeymapNotify

    Exposure events: Expose, GraphicsExpose, NoExpose

    Structure control events: CirculateRequest, ConfigureRequest, MapRequest, ResizeRequest

    Window state notification events: CirculateNotify, ConfigureNotify, CreateNotify

    Colormap state notification event: ColormapNotify

    Client communication events: ClientMessage, PropertyNotify, SelectionClear

猜你喜欢

转载自blog.csdn.net/guangmingsky/article/details/81281259
今日推荐