diff options
| author | Dmitry Antipov | 2013-09-17 16:59:45 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-09-17 16:59:45 +0400 |
| commit | 2cd98812779dd3254b4956ea39d6e6338f3feb8d (patch) | |
| tree | 04a5afcccb87031d4d2e38d99385ebc26a288b5b /src | |
| parent | a6c2ee1b72658db95c64e2295580508bda410f8a (diff) | |
| download | emacs-2cd98812779dd3254b4956ea39d6e6338f3feb8d.tar.gz emacs-2cd98812779dd3254b4956ea39d6e6338f3feb8d.zip | |
* frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
(x_icon_type): Remove prototype.
(x_bitmap_icon) [!HAVE_NS]: Declare as such.
* frame.c (x_icon_type): Remove.
* w32term.c (x_make_frame_visible, x_iconify_frame):
* xterm.c (x_make_frame_visible, x_iconify_frame):
Use x_set_bitmap_icon to factor out common code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/frame.c | 16 | ||||
| -rw-r--r-- | src/frame.h | 21 | ||||
| -rw-r--r-- | src/w32term.c | 12 | ||||
| -rw-r--r-- | src/xterm.c | 10 |
5 files changed, 31 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8583bbb19fb..e900cfb1bb1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function. | ||
| 4 | (x_icon_type): Remove prototype. | ||
| 5 | (x_bitmap_icon) [!HAVE_NS]: Declare as such. | ||
| 6 | * frame.c (x_icon_type): Remove. | ||
| 7 | * w32term.c (x_make_frame_visible, x_iconify_frame): | ||
| 8 | * xterm.c (x_make_frame_visible, x_iconify_frame): | ||
| 9 | Use x_set_bitmap_icon to factor out common code. | ||
| 10 | |||
| 11 | 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 12 | |||
| 3 | * dispextern.h (check_x_display_info, x_get_string_resource): | 13 | * dispextern.h (check_x_display_info, x_get_string_resource): |
| 4 | Declare here just once and unify the latter. | 14 | Declare here just once and unify the latter. |
| 5 | * frame.c (check_x_display_info, x_get_string_resource): | 15 | * frame.c (check_x_display_info, x_get_string_resource): |
diff --git a/src/frame.c b/src/frame.c index 1f2b2b9c223..365629d0f48 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3381,22 +3381,6 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 3381 | XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0; | 3381 | XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0; |
| 3382 | } | 3382 | } |
| 3383 | 3383 | ||
| 3384 | |||
| 3385 | |||
| 3386 | /* Return non-nil if frame F wants a bitmap icon. */ | ||
| 3387 | |||
| 3388 | Lisp_Object | ||
| 3389 | x_icon_type (struct frame *f) | ||
| 3390 | { | ||
| 3391 | Lisp_Object tem; | ||
| 3392 | |||
| 3393 | tem = assq_no_quit (Qicon_type, f->param_alist); | ||
| 3394 | if (CONSP (tem)) | ||
| 3395 | return XCDR (tem); | ||
| 3396 | else | ||
| 3397 | return Qnil; | ||
| 3398 | } | ||
| 3399 | |||
| 3400 | void | 3384 | void |
| 3401 | x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 3385 | x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3402 | { | 3386 | { |
diff --git a/src/frame.h b/src/frame.h index c5ad71628ab..f5fd7dbcc36 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -1230,8 +1230,6 @@ extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object, | |||
| 1230 | extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, | 1230 | extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, |
| 1231 | Lisp_Object); | 1231 | Lisp_Object); |
| 1232 | 1232 | ||
| 1233 | extern Lisp_Object x_icon_type (struct frame *); | ||
| 1234 | |||
| 1235 | extern long x_figure_window_size (struct frame *, Lisp_Object, bool); | 1233 | extern long x_figure_window_size (struct frame *, Lisp_Object, bool); |
| 1236 | 1234 | ||
| 1237 | extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); | 1235 | extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); |
| @@ -1260,7 +1258,6 @@ extern void x_set_tool_bar_lines (struct frame *f, | |||
| 1260 | Lisp_Object oldval); | 1258 | Lisp_Object oldval); |
| 1261 | extern void x_activate_menubar (struct frame *); | 1259 | extern void x_activate_menubar (struct frame *); |
| 1262 | extern void x_real_positions (struct frame *, int *, int *); | 1260 | extern void x_real_positions (struct frame *, int *, int *); |
| 1263 | extern int x_bitmap_icon (struct frame *, Lisp_Object); | ||
| 1264 | extern void x_set_menu_bar_lines (struct frame *, | 1261 | extern void x_set_menu_bar_lines (struct frame *, |
| 1265 | Lisp_Object, | 1262 | Lisp_Object, |
| 1266 | Lisp_Object); | 1263 | Lisp_Object); |
| @@ -1279,8 +1276,24 @@ extern void x_query_colors (struct frame *f, XColor *, int); | |||
| 1279 | extern void x_query_color (struct frame *f, XColor *); | 1276 | extern void x_query_color (struct frame *f, XColor *); |
| 1280 | extern void x_focus_frame (struct frame *); | 1277 | extern void x_focus_frame (struct frame *); |
| 1281 | 1278 | ||
| 1279 | #ifndef HAVE_NS | ||
| 1280 | |||
| 1281 | extern int x_bitmap_icon (struct frame *, Lisp_Object); | ||
| 1282 | |||
| 1283 | /* Set F's bitmap icon, if specified among F's parameters. */ | ||
| 1284 | |||
| 1285 | FRAME_INLINE void | ||
| 1286 | x_set_bitmap_icon (struct frame *f) | ||
| 1287 | { | ||
| 1288 | Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist); | ||
| 1289 | |||
| 1290 | if (CONSP (obj)) | ||
| 1291 | x_bitmap_icon (f, XCDR (obj)); | ||
| 1292 | } | ||
| 1293 | |||
| 1294 | #endif /* !HAVE_NS */ | ||
| 1295 | |||
| 1282 | #endif /* HAVE_WINDOW_SYSTEM */ | 1296 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1283 | |||
| 1284 | 1297 | ||
| 1285 | FRAME_INLINE void | 1298 | FRAME_INLINE void |
| 1286 | flush_frame (struct frame *f) | 1299 | flush_frame (struct frame *f) |
diff --git a/src/w32term.c b/src/w32term.c index 912fb3cc68c..59fdf130592 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5915,13 +5915,9 @@ w32_frame_raise_lower (struct frame *f, int raise_flag) | |||
| 5915 | void | 5915 | void |
| 5916 | x_make_frame_visible (struct frame *f) | 5916 | x_make_frame_visible (struct frame *f) |
| 5917 | { | 5917 | { |
| 5918 | Lisp_Object type; | ||
| 5919 | |||
| 5920 | block_input (); | 5918 | block_input (); |
| 5921 | 5919 | ||
| 5922 | type = x_icon_type (f); | 5920 | x_set_bitmap_icon (f); |
| 5923 | if (!NILP (type)) | ||
| 5924 | x_bitmap_icon (f, type); | ||
| 5925 | 5921 | ||
| 5926 | if (! FRAME_VISIBLE_P (f)) | 5922 | if (! FRAME_VISIBLE_P (f)) |
| 5927 | { | 5923 | { |
| @@ -6031,8 +6027,6 @@ x_make_frame_invisible (struct frame *f) | |||
| 6031 | void | 6027 | void |
| 6032 | x_iconify_frame (struct frame *f) | 6028 | x_iconify_frame (struct frame *f) |
| 6033 | { | 6029 | { |
| 6034 | Lisp_Object type; | ||
| 6035 | |||
| 6036 | /* Don't keep the highlight on an invisible frame. */ | 6030 | /* Don't keep the highlight on an invisible frame. */ |
| 6037 | if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) | 6031 | if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) |
| 6038 | FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; | 6032 | FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; |
| @@ -6042,9 +6036,7 @@ x_iconify_frame (struct frame *f) | |||
| 6042 | 6036 | ||
| 6043 | block_input (); | 6037 | block_input (); |
| 6044 | 6038 | ||
| 6045 | type = x_icon_type (f); | 6039 | x_set_bitmap_icon (f); |
| 6046 | if (!NILP (type)) | ||
| 6047 | x_bitmap_icon (f, type); | ||
| 6048 | 6040 | ||
| 6049 | /* Simulate the user minimizing the frame. */ | 6041 | /* Simulate the user minimizing the frame. */ |
| 6050 | SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); | 6042 | SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); |
diff --git a/src/xterm.c b/src/xterm.c index 1adc5b3d03f..fadcdbfea98 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9008,7 +9008,6 @@ xembed_send_message (struct frame *f, Time t, enum xembed_message msg, | |||
| 9008 | void | 9008 | void |
| 9009 | x_make_frame_visible (struct frame *f) | 9009 | x_make_frame_visible (struct frame *f) |
| 9010 | { | 9010 | { |
| 9011 | Lisp_Object type; | ||
| 9012 | int original_top, original_left; | 9011 | int original_top, original_left; |
| 9013 | int retry_count = 2; | 9012 | int retry_count = 2; |
| 9014 | 9013 | ||
| @@ -9016,9 +9015,7 @@ x_make_frame_visible (struct frame *f) | |||
| 9016 | 9015 | ||
| 9017 | block_input (); | 9016 | block_input (); |
| 9018 | 9017 | ||
| 9019 | type = x_icon_type (f); | 9018 | x_set_bitmap_icon (f); |
| 9020 | if (!NILP (type)) | ||
| 9021 | x_bitmap_icon (f, type); | ||
| 9022 | 9019 | ||
| 9023 | if (! FRAME_VISIBLE_P (f)) | 9020 | if (! FRAME_VISIBLE_P (f)) |
| 9024 | { | 9021 | { |
| @@ -9225,7 +9222,6 @@ x_iconify_frame (struct frame *f) | |||
| 9225 | #ifdef USE_X_TOOLKIT | 9222 | #ifdef USE_X_TOOLKIT |
| 9226 | int result; | 9223 | int result; |
| 9227 | #endif | 9224 | #endif |
| 9228 | Lisp_Object type; | ||
| 9229 | 9225 | ||
| 9230 | /* Don't keep the highlight on an invisible frame. */ | 9226 | /* Don't keep the highlight on an invisible frame. */ |
| 9231 | if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) | 9227 | if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) |
| @@ -9236,9 +9232,7 @@ x_iconify_frame (struct frame *f) | |||
| 9236 | 9232 | ||
| 9237 | block_input (); | 9233 | block_input (); |
| 9238 | 9234 | ||
| 9239 | type = x_icon_type (f); | 9235 | x_set_bitmap_icon (f); |
| 9240 | if (!NILP (type)) | ||
| 9241 | x_bitmap_icon (f, type); | ||
| 9242 | 9236 | ||
| 9243 | #if defined (USE_GTK) | 9237 | #if defined (USE_GTK) |
| 9244 | if (FRAME_GTK_OUTER_WIDGET (f)) | 9238 | if (FRAME_GTK_OUTER_WIDGET (f)) |