X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6fab1572a37445f19e350547d36f181eb0ce5d18..8030369ccb5c871d3ce11b96c220f318bc741ed8:/src/xterm.h diff --git a/src/xterm.h b/src/xterm.h index a91c51ce0b..2258577833 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -618,6 +618,11 @@ struct x_output these may differ because this does not take into account possible menubar. y_pixels_diff is with menubar height included */ int y_pixels_outer_diff; + + /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this + frame, or IMPLICIT if we received an EnterNotify. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + int focus_state; }; enum @@ -631,6 +636,19 @@ enum FULLSCREEN_MOVE_WAIT = 8, }; +enum +{ + /* Values for focus_state, used as bit mask. + EXPLICIT means if we received a FocusIn for the frame and know it has + the focus. IMPLICIT means we recevied an EnterNotify and the frame + may have the focus if no window manager is running. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + FOCUS_NONE = 0, + FOCUS_IMPLICIT = 1, + FOCUS_EXPLICIT = 2 +}; + + /* Return the X window used for displaying data in frame F. */ #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc) @@ -677,6 +695,7 @@ enum #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height) #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.x->desired_cursor) +#define FRAME_CURSOR_WIDTH(f) ((f)->output_data.x->cursor_width) #define FRAME_XIC(f) ((f)->output_data.x->xic) #define FRAME_X_XIM(f) (FRAME_X_DISPLAY_INFO (f)->xim) @@ -905,11 +924,11 @@ struct scroll_bar - (f)->output_data.x->internal_border_width))) -/* If a struct input_event has a kind which is selection_request_event - or selection_clear_event, then its contents are really described +/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT + or SELECTION_CLEAR_EVENT, then its contents are really described by this structure. */ -/* For an event of kind selection_request_event, +/* For an event of kind SELECTION_REQUEST_EVENT, this structure really describes the contents. **Don't make this struct longer!** If it overlaps the frame_or_window field of struct input_event,