diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-09-16 14:41:41 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-09-16 14:41:41 +0400 |
commit | 61582e6aadc24dda730055d9907e7c053dd6218b (patch) | |
tree | ca2fbdfb25cfaf51e43c72111b1e660db620a8e7 /src/xsettings.h | |
parent | c6ad9bcaded7363a11128e7a005e45fb53c7dd87 (diff) | |
download | emacs-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/xsettings.h')
-rw-r--r-- | src/xsettings.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xsettings.h b/src/xsettings.h index e3738c593bd..4407ca7df92 100644 --- a/src/xsettings.h +++ b/src/xsettings.h @@ -20,9 +20,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifndef XSETTINGS_H #define XSETTINGS_H -extern void xsettings_initialize (struct x_display_info *dpyinfo); -extern void xft_settings_event (struct x_display_info *dpyinfo, - XEvent *); +extern void xsettings_initialize (struct x_display_info *); +extern void xft_settings_event (struct x_display_info *, const XEvent * const); extern const char *xsettings_get_system_font (void); #ifdef USE_LUCID extern const char *xsettings_get_system_normal_font (void); |