Do not use pure Xism x_wm_set_icon_position in non-X ports.
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 1 Aug 2013 06:38:49 +0000 (10:38 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 1 Aug 2013 06:38:49 +0000 (10:38 +0400)
* frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
only if HAVE_X_WINDOWS is in use.
* frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
* nsterm.m (x_wm_set_icon_position): Remove no-op.
* w32term.c (x_wm_set_icon_position): Likewise.
* w32fns.c (x_icon): Adjust user.

src/ChangeLog
src/frame.c
src/frame.h
src/nsterm.m
src/w32fns.c
src/w32term.c

index 566cd2b..4fb6a65 100644 (file)
@@ -1,3 +1,13 @@
+2013-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Do not use pure Xism x_wm_set_icon_position in non-X ports.
+       * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
+       only if HAVE_X_WINDOWS is in use.
+       * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
+       * nsterm.m (x_wm_set_icon_position): Remove no-op.
+       * w32term.c (x_wm_set_icon_position): Likewise.
+       * w32fns.c (x_icon): Adjust user.
+
 2013-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * xterm.c (last_mouse_press_frame): Remove the
index 6e56a20..f5d1971 100644 (file)
@@ -2867,10 +2867,11 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist)
        /* Actually set that position, and convert to absolute.  */
        x_set_offset (f, leftpos, toppos, -1);
       }
-
+#ifdef HAVE_X_WINDOWS
     if ((!NILP (icon_left) || !NILP (icon_top))
        && ! (icon_left_no_change && icon_top_no_change))
       x_wm_set_icon_position (f, XINT (icon_left), XINT (icon_top));
+#endif /* HAVE_X_WINDOWS */
   }
 
   UNGCPRO;
index 98cf54c..c4c5ec2 100644 (file)
@@ -1207,7 +1207,6 @@ extern Lisp_Object Qrun_hook_with_args;
 
 extern void x_set_scroll_bar_default_width (struct frame *);
 extern void x_set_offset (struct frame *, int, int, int);
-extern void x_wm_set_icon_position (struct frame *, int, int);
 extern void x_wm_set_size_hint (FRAME_PTR f, long flags, bool user_position);
 
 extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
@@ -1278,9 +1277,12 @@ extern void x_set_menu_bar_lines (struct frame *,
 extern void free_frame_menubar (struct frame *);
 extern void x_free_frame_resources (struct frame *);
 
-#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
+#if defined HAVE_X_WINDOWS
+extern void x_wm_set_icon_position (struct frame *, int, int);
+#if !defined USE_X_TOOLKIT
 extern char *x_get_resource_string (const char *, const char *);
 #endif
+#endif
 
 extern void x_query_colors (struct frame *f, XColor *, int);
 extern void x_query_color (struct frame *f, XColor *);
index 14706f6..7126ef5 100644 (file)
@@ -3863,15 +3863,6 @@ ns_judge_scroll_bars (struct frame *f)
     [eview updateFrameSize: NO];
 }
 
-
-void
-x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
-{
-  /* XXX irrelevant under NS */
-}
-
-
-
 /* ==========================================================================
 
     Initialization
index e46608f..458013d 100644 (file)
@@ -4182,9 +4182,6 @@ x_icon (struct frame *f, Lisp_Object parms)
 
   block_input ();
 
-  if (! EQ (icon_x, Qunbound))
-    x_wm_set_icon_position (f, XINT (icon_x), XINT (icon_y));
-
 #if 0 /* TODO */
   /* Start up iconic or window? */
   x_wm_set_window_state
index b97632d..f91bfc2 100644 (file)
@@ -6225,22 +6225,6 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
   leave_crit ();
 }
 
-/* Window manager things */
-void
-x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
-{
-#if 0
-  Window window = FRAME_W32_WINDOW (f);
-
-  f->display.x->wm_hints.flags |= IconPositionHint;
-  f->display.x->wm_hints.icon_x = icon_x;
-  f->display.x->wm_hints.icon_y = icon_y;
-
-  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints);
-#endif
-}
-
-\f
 /***********************************************************************
                                Fonts
  ***********************************************************************/