summaryrefslogtreecommitdiff
path: root/src/gtkutil.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-16 14:41:41 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-16 14:41:41 +0400
commit61582e6aadc24dda730055d9907e7c053dd6218b (patch)
treeca2fbdfb25cfaf51e43c72111b1e660db620a8e7 /src/gtkutil.h
parentc6ad9bcaded7363a11128e7a005e45fb53c7dd87 (diff)
downloademacs-61582e6aadc24dda730055d9907e7c053dd6218b.tar.gz
Do not copy X event in handle_one_xevent except KeyPress case.
Wnen XEvent is processed, it is unlikely to be changed except KeyPress case, so we can avoid copying and use const pointer to const data to make sure that an event is not changed elsewhere. * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent * const' and do not create local copy except for the KeyPress event. Use casts to avoid a few glitches. Adjust formatting. Add comments. (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user. (x_handle_net_wm_state, x_menubar_window_to_frame) (x_detect_focus_change, construct_mouse_click, note_mouse_movement) (x_scroll_bar_to_input_event, x_scroll_bar_expose) (x_scroll_bar_handle_click, x_scroll_bar_note_movement): * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar): * xselect.c (x_handle_property_notify, x_handle_selection_notify) (x_handle_dnd_message): * xsettings.c (xft_settings_event): Use 'const XEvent * const' where appropriate. * xterm.h, gtkutil.h, xsettngs.h: Adjust related prototypes.
Diffstat (limited to 'src/gtkutil.h')
-rw-r--r--src/gtkutil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gtkutil.h b/src/gtkutil.h
index fc959862fd3..57971cf4a38 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -105,7 +105,7 @@ extern void xg_modify_menubar_widgets (GtkWidget *menubar,
extern void xg_update_frame_menubar (struct frame *f);
-extern bool xg_event_is_for_menubar (struct frame *f, XEvent *event);
+extern bool xg_event_is_for_menubar (struct frame *, const XEvent * const);
extern bool xg_have_tear_offs (void);
@@ -129,7 +129,7 @@ extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
int portion,
int position,
int whole);
-extern bool xg_event_is_for_scrollbar (struct frame *f, XEvent *event);
+extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent * const);
extern int xg_get_default_scrollbar_width (void);
extern void update_frame_tool_bar (struct frame *f);