(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>
+
+ * 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):
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)
{
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);
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);
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)
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))
{
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;
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);
void
x_make_frame_visible (struct frame *f)
{
- Lisp_Object type;
int original_top, original_left;
int retry_count = 2;
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))
{
#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)
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))