]> git.eshelyaron.com Git - emacs.git/commitdiff
* frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 17 Sep 2013 12:59:45 +0000 (16:59 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 17 Sep 2013 12:59:45 +0000 (16:59 +0400)
(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.

src/ChangeLog
src/frame.c
src/frame.h
src/w32term.c
src/xterm.c

index 8583bbb19fbcf17d1182ee69c1435fc8335db40c..e900cfb1bb1f6d3a5cb8b6c46721a9995ce99f18 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * 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.
+
 2013-09-17  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * dispextern.h (check_x_display_info, x_get_string_resource):
index 1f2b2b9c223383674a4fb834279e65ecb6040c6d..365629d0f48edfdd02a8a8c74a48c3c97dbfbd1d 100644 (file)
@@ -3381,22 +3381,6 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
   XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0;
 }
 
-
-
-/* Return non-nil if frame F wants a bitmap icon.  */
-
-Lisp_Object
-x_icon_type (struct frame *f)
-{
-  Lisp_Object tem;
-
-  tem = assq_no_quit (Qicon_type, f->param_alist);
-  if (CONSP (tem))
-    return XCDR (tem);
-  else
-    return Qnil;
-}
-
 void
 x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
index c5ad71628abe3df47de2bf75c497e98b39b5bb3f..f5fd7dbcc3670b46d5908b7e7353b54c38f7eba2 100644 (file)
@@ -1230,8 +1230,6 @@ extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object,
 extern void x_set_scroll_bar_width (struct frame *, Lisp_Object,
                                     Lisp_Object);
 
-extern Lisp_Object x_icon_type (struct frame *);
-
 extern long x_figure_window_size (struct frame *, Lisp_Object, bool);
 
 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,
                                   Lisp_Object oldval);
 extern void x_activate_menubar (struct frame *);
 extern void x_real_positions (struct frame *, int *, int *);
-extern int x_bitmap_icon (struct frame *, Lisp_Object);
 extern void x_set_menu_bar_lines (struct frame *,
                                   Lisp_Object,
                                   Lisp_Object);
@@ -1279,8 +1276,24 @@ extern void x_query_colors (struct frame *f, XColor *, int);
 extern void x_query_color (struct frame *f, XColor *);
 extern void x_focus_frame (struct frame *);
 
+#ifndef HAVE_NS
+
+extern int x_bitmap_icon (struct frame *, Lisp_Object);
+
+/* Set F's bitmap icon, if specified among F's parameters.  */
+
+FRAME_INLINE void
+x_set_bitmap_icon (struct frame *f)
+{
+  Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
+
+  if (CONSP (obj))
+    x_bitmap_icon (f, XCDR (obj));
+}
+
+#endif /* !HAVE_NS */
+
 #endif /* HAVE_WINDOW_SYSTEM */
-\f
 
 FRAME_INLINE void
 flush_frame (struct frame *f)
index 912fb3cc68c8be1022a467fbbfe77933d6c77e36..59fdf130592b214c86912f39669a2f817da5334b 100644 (file)
@@ -5915,13 +5915,9 @@ w32_frame_raise_lower (struct frame *f, int raise_flag)
 void
 x_make_frame_visible (struct frame *f)
 {
-  Lisp_Object type;
-
   block_input ();
 
-  type = x_icon_type (f);
-  if (!NILP (type))
-    x_bitmap_icon (f, type);
+  x_set_bitmap_icon (f);
 
   if (! FRAME_VISIBLE_P (f))
     {
@@ -6031,8 +6027,6 @@ x_make_frame_invisible (struct frame *f)
 void
 x_iconify_frame (struct frame *f)
 {
-  Lisp_Object type;
-
   /* Don't keep the highlight on an invisible frame.  */
   if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
     FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
@@ -6042,9 +6036,7 @@ x_iconify_frame (struct frame *f)
 
   block_input ();
 
-  type = x_icon_type (f);
-  if (!NILP (type))
-    x_bitmap_icon (f, type);
+  x_set_bitmap_icon (f);
 
   /* Simulate the user minimizing the frame.  */
   SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0);
index 1adc5b3d03f4f9af56090b98418a4f2f005f8a30..fadcdbfea981a2fe2a06868114123cfec0f7a8e8 100644 (file)
@@ -9008,7 +9008,6 @@ xembed_send_message (struct frame *f, Time t, enum xembed_message msg,
 void
 x_make_frame_visible (struct frame *f)
 {
-  Lisp_Object type;
   int original_top, original_left;
   int retry_count = 2;
 
@@ -9016,9 +9015,7 @@ x_make_frame_visible (struct frame *f)
 
   block_input ();
 
-  type = x_icon_type (f);
-  if (!NILP (type))
-    x_bitmap_icon (f, type);
+  x_set_bitmap_icon (f);
 
   if (! FRAME_VISIBLE_P (f))
     {
@@ -9225,7 +9222,6 @@ x_iconify_frame (struct frame *f)
 #ifdef USE_X_TOOLKIT
   int result;
 #endif
-  Lisp_Object type;
 
   /* Don't keep the highlight on an invisible frame.  */
   if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
@@ -9236,9 +9232,7 @@ x_iconify_frame (struct frame *f)
 
   block_input ();
 
-  type = x_icon_type (f);
-  if (!NILP (type))
-    x_bitmap_icon (f, type);
+  x_set_bitmap_icon (f);
 
 #if defined (USE_GTK)
   if (FRAME_GTK_OUTER_WIDGET (f))