[gtk/drop-skip-pager: 1/2] window: Drop some x11-specific apis



commit fed2db1493606342e0c80df6e959158f9d467523
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 20 01:13:41 2019 +0000

    window: Drop some x11-specific apis
    
    The skip-taskbar, skip-pager and urgency hints were
    only ever implemented for X11, and are not very useful
    with modern desktops. Relegate the functionality to
    x11 backend api, and drop the GtkWindow api.

 docs/reference/gdk/gdk4-sections.txt |   3 -
 docs/reference/gtk/gtk4-sections.txt |   6 --
 gdk/broadway/gdksurface-broadway.c   |  21 ----
 gdk/gdksurface.c                     |  57 +---------
 gdk/gdksurface.h                     |  10 --
 gdk/gdksurfaceimpl.h                 |   6 --
 gdk/quartz/gdksurface-quartz.c       |  36 -------
 gdk/wayland/gdksurface-wayland.c     |  21 ----
 gdk/win32/gdksurface-win32.c         |  69 +-----------
 gdk/win32/gdkwin32surface.h          |   4 +
 gdk/x11/gdksurface-x11.c             |  15 ++-
 gdk/x11/gdkx11surface.h              |  10 ++
 gtk/gtkmessagedialog.c               |   4 -
 gtk/gtkwindow.c                      | 198 -----------------------------------
 gtk/ui/gtkmessagedialog.ui           |   1 -
 15 files changed, 23 insertions(+), 438 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index fb68d5aec0..41ec4d7e50 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -262,9 +262,6 @@ gdk_surface_get_modal_hint
 gdk_surface_set_type_hint
 gdk_surface_get_type_hint
 gdk_surface_set_shadow_width
-gdk_surface_set_skip_taskbar_hint
-gdk_surface_set_skip_pager_hint
-gdk_surface_set_urgency_hint
 gdk_surface_get_position
 gdk_surface_get_root_origin
 gdk_surface_get_frame_extents
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 96d08652dd..2331283531 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4694,9 +4694,6 @@ gtk_window_set_decorated
 gtk_window_set_deletable
 gtk_window_set_mnemonic_modifier
 gtk_window_set_type_hint
-gtk_window_set_skip_taskbar_hint
-gtk_window_set_skip_pager_hint
-gtk_window_set_urgency_hint
 gtk_window_set_accept_focus
 gtk_window_set_focus_on_map
 gtk_window_set_startup_id
@@ -4713,9 +4710,6 @@ gtk_window_get_title
 gtk_window_get_transient_for
 gtk_window_get_attached_to
 gtk_window_get_type_hint
-gtk_window_get_skip_taskbar_hint
-gtk_window_get_skip_pager_hint
-gtk_window_get_urgency_hint
 gtk_window_get_accept_focus
 gtk_window_get_focus_on_map
 gtk_window_get_group
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index 732d2a7fd6..a76b641a40 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -473,24 +473,6 @@ gdk_broadway_surface_set_modal_hint (GdkSurface *surface,
 {
 }
 
-static void
-gdk_broadway_surface_set_skip_taskbar_hint (GdkSurface *surface,
-                                            gboolean   skips_taskbar)
-{
-}
-
-static void
-gdk_broadway_surface_set_skip_pager_hint (GdkSurface *surface,
-                                          gboolean   skips_pager)
-{
-}
-
-static void
-gdk_broadway_surface_set_urgency_hint (GdkSurface *surface,
-                                       gboolean   urgent)
-{
-}
-
 static void
 gdk_broadway_surface_set_geometry_hints (GdkSurface         *surface,
                                          const GdkGeometry *geometry,
@@ -1356,9 +1338,6 @@ gdk_surface_impl_broadway_class_init (GdkSurfaceImplBroadwayClass *klass)
   impl_class->set_type_hint = gdk_broadway_surface_set_type_hint;
   impl_class->get_type_hint = gdk_broadway_surface_get_type_hint;
   impl_class->set_modal_hint = gdk_broadway_surface_set_modal_hint;
-  impl_class->set_skip_taskbar_hint = gdk_broadway_surface_set_skip_taskbar_hint;
-  impl_class->set_skip_pager_hint = gdk_broadway_surface_set_skip_pager_hint;
-  impl_class->set_urgency_hint = gdk_broadway_surface_set_urgency_hint;
   impl_class->set_geometry_hints = gdk_broadway_surface_set_geometry_hints;
   impl_class->set_title = gdk_broadway_surface_set_title;
   impl_class->set_startup_id = gdk_broadway_surface_set_startup_id;
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 7bfbc5d637..f42b7c2715 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4118,61 +4118,6 @@ gdk_surface_set_modal_hint (GdkSurface *surface,
   GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_modal_hint (surface, modal);
 }
 
-/**
- * gdk_surface_set_skip_taskbar_hint:
- * @surface: a toplevel #GdkSurface
- * @skips_taskbar: %TRUE to skip the taskbar
- *
- * Toggles whether a surface should appear in a task list or surface
- * list. If a surface’s semantic type as specified with
- * gdk_surface_set_type_hint() already fully describes the surface, this
- * function should not be called in addition,
- * instead you should allow the surface to be treated according to
- * standard policy for its semantic type.
- **/
-void
-gdk_surface_set_skip_taskbar_hint (GdkSurface *surface,
-                                   gboolean   skips_taskbar)
-{
-  GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_skip_taskbar_hint (surface, skips_taskbar);
-}
-
-/**
- * gdk_surface_set_skip_pager_hint:
- * @surface: a toplevel #GdkSurface
- * @skips_pager: %TRUE to skip the pager
- *
- * Toggles whether a surface should appear in a pager (workspace
- * switcher, or other desktop utility program that displays a small
- * thumbnail representation of the surfaces on the desktop). If a
- * surface’s semantic type as specified with gdk_surface_set_type_hint()
- * already fully describes the surface, this function should
- * not be called in addition, instead you should
- * allow the surface to be treated according to standard policy for
- * its semantic type.
- **/
-void
-gdk_surface_set_skip_pager_hint (GdkSurface *surface,
-                                 gboolean   skips_pager)
-{
-  GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_skip_pager_hint (surface, skips_pager);
-}
-
-/**
- * gdk_surface_set_urgency_hint:
- * @surface: a toplevel #GdkSurface
- * @urgent: %TRUE if the surface is urgent
- *
- * Toggles whether a surface needs the user's
- * urgent attention.
- **/
-void
-gdk_surface_set_urgency_hint (GdkSurface *surface,
-                              gboolean   urgent)
-{
-  GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_urgency_hint (surface, urgent);
-}
-
 /**
  * gdk_surface_set_geometry_hints:
  * @surface: a toplevel #GdkSurface
@@ -4259,7 +4204,7 @@ gdk_surface_set_startup_id (GdkSurface   *surface,
  **/
 void
 gdk_surface_set_transient_for (GdkSurface *surface,
-                              GdkSurface *parent)
+                               GdkSurface *parent)
 {
   surface->transient_for = parent;
 
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 8f1364f3da..3b79cdc901 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -555,16 +555,6 @@ GDK_AVAILABLE_IN_ALL
 void          gdk_surface_set_modal_hint   (GdkSurface       *surface,
                                             gboolean         modal);
 
-GDK_AVAILABLE_IN_ALL
-void gdk_surface_set_skip_taskbar_hint (GdkSurface *surface,
-                                        gboolean   skips_taskbar);
-GDK_AVAILABLE_IN_ALL
-void gdk_surface_set_skip_pager_hint   (GdkSurface *surface,
-                                        gboolean   skips_pager);
-GDK_AVAILABLE_IN_ALL
-void gdk_surface_set_urgency_hint      (GdkSurface *surface,
-                                        gboolean   urgent);
-
 GDK_AVAILABLE_IN_ALL
 void          gdk_surface_set_geometry_hints (GdkSurface          *surface,
                                               const GdkGeometry  *geometry,
diff --git a/gdk/gdksurfaceimpl.h b/gdk/gdksurfaceimpl.h
index 4dfc42e081..077ae45860 100644
--- a/gdk/gdksurfaceimpl.h
+++ b/gdk/gdksurfaceimpl.h
@@ -125,12 +125,6 @@ struct _GdkSurfaceImplClass
   GdkSurfaceTypeHint (* get_type_hint)   (GdkSurface       *surface);
   void         (* set_modal_hint)       (GdkSurface *surface,
                                          gboolean   modal);
-  void         (* set_skip_taskbar_hint) (GdkSurface *surface,
-                                          gboolean   skips_taskbar);
-  void         (* set_skip_pager_hint)  (GdkSurface *surface,
-                                         gboolean   skips_pager);
-  void         (* set_urgency_hint)     (GdkSurface *surface,
-                                         gboolean   urgent);
   void         (* set_geometry_hints)   (GdkSurface         *surface,
                                          const GdkGeometry *geometry,
                                          GdkSurfaceHints     geom_mask);
diff --git a/gdk/quartz/gdksurface-quartz.c b/gdk/quartz/gdksurface-quartz.c
index 86ed03487e..14c07b0168 100644
--- a/gdk/quartz/gdksurface-quartz.c
+++ b/gdk/quartz/gdksurface-quartz.c
@@ -1618,17 +1618,6 @@ gdk_surface_quartz_get_device_state (GdkSurface       *window,
                                                     x, y, mask) != NULL;
 }
 
-static void
-gdk_quartz_surface_set_urgency_hint (GdkSurface *window,
-                                    gboolean   urgent)
-{
-  if (GDK_SURFACE_DESTROYED (window) ||
-      !SURFACE_IS_TOPLEVEL (window))
-    return;
-
-  /* FIXME: Implement */
-}
-
 static void
 gdk_quartz_surface_set_geometry_hints (GdkSurface         *window,
                                       const GdkGeometry *geometry,
@@ -1997,28 +1986,6 @@ gdk_quartz_surface_set_modal_hint (GdkSurface *window,
   /* FIXME: Implement */
 }
 
-static void
-gdk_quartz_surface_set_skip_taskbar_hint (GdkSurface *window,
-                                         gboolean   skips_taskbar)
-{
-  if (GDK_SURFACE_DESTROYED (window) ||
-      !SURFACE_IS_TOPLEVEL (window))
-    return;
-
-  /* FIXME: Implement */
-}
-
-static void
-gdk_quartz_surface_set_skip_pager_hint (GdkSurface *window,
-                                       gboolean   skips_pager)
-{
-  if (GDK_SURFACE_DESTROYED (window) ||
-      !SURFACE_IS_TOPLEVEL (window))
-    return;
-
-  /* FIXME: Implement */
-}
-
 static void
 gdk_quartz_surface_begin_resize_drag (GdkSurface     *window,
                                      GdkSurfaceEdge  edge,
@@ -2738,9 +2705,6 @@ gdk_surface_impl_quartz_class_init (GdkSurfaceImplQuartzClass *klass)
   impl_class->set_type_hint = gdk_quartz_surface_set_type_hint;
   impl_class->get_type_hint = gdk_quartz_surface_get_type_hint;
   impl_class->set_modal_hint = gdk_quartz_surface_set_modal_hint;
-  impl_class->set_skip_taskbar_hint = gdk_quartz_surface_set_skip_taskbar_hint;
-  impl_class->set_skip_pager_hint = gdk_quartz_surface_set_skip_pager_hint;
-  impl_class->set_urgency_hint = gdk_quartz_surface_set_urgency_hint;
   impl_class->set_geometry_hints = gdk_quartz_surface_set_geometry_hints;
   impl_class->set_title = gdk_quartz_surface_set_title;
   impl_class->set_startup_id = gdk_quartz_surface_set_startup_id;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 9e774c31b4..9b8bc8108e 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -3063,24 +3063,6 @@ gdk_wayland_surface_set_modal_hint (GdkSurface *surface,
   maybe_set_gtk_surface_modal (surface);
 }
 
-static void
-gdk_wayland_surface_set_skip_taskbar_hint (GdkSurface *surface,
-                                           gboolean    skips_taskbar)
-{
-}
-
-static void
-gdk_wayland_surface_set_skip_pager_hint (GdkSurface *surface,
-                                         gboolean    skips_pager)
-{
-}
-
-static void
-gdk_wayland_surface_set_urgency_hint (GdkSurface *surface,
-                                      gboolean    urgent)
-{
-}
-
 static void
 gdk_wayland_surface_set_geometry_hints (GdkSurface         *surface,
                                         const GdkGeometry  *geometry,
@@ -3846,9 +3828,6 @@ _gdk_surface_impl_wayland_class_init (GdkSurfaceImplWaylandClass *klass)
   impl_class->set_type_hint = gdk_wayland_surface_set_type_hint;
   impl_class->get_type_hint = gdk_wayland_surface_get_type_hint;
   impl_class->set_modal_hint = gdk_wayland_surface_set_modal_hint;
-  impl_class->set_skip_taskbar_hint = gdk_wayland_surface_set_skip_taskbar_hint;
-  impl_class->set_skip_pager_hint = gdk_wayland_surface_set_skip_pager_hint;
-  impl_class->set_urgency_hint = gdk_wayland_surface_set_urgency_hint;
   impl_class->set_geometry_hints = gdk_wayland_surface_set_geometry_hints;
   impl_class->set_title = gdk_wayland_surface_set_title;
   impl_class->set_startup_id = gdk_wayland_surface_set_startup_id;
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index e5a945c9bf..bc8b82470d 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -731,9 +731,6 @@ _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
       return;
     }
 
-//  if (!from_set_skip_taskbar_hint && window->surface_type == GDK_SURFACE_TEMP)
-//    gdk_surface_set_skip_taskbar_hint (window, TRUE);
-
   _gdk_win32_surface_enable_transparency (window);
 
   frame_clock = gdk_surface_get_frame_clock (window);
@@ -1407,9 +1404,9 @@ gdk_win32_surface_lower (GdkSurface *window)
     }
 }
 
-static void
+void
 gdk_win32_surface_set_urgency_hint (GdkSurface *window,
-                            gboolean   urgent)
+                                    gboolean    urgent)
 {
   FLASHWINFO flashwinfo;
   typedef BOOL (WINAPI *PFN_FlashWindowEx) (FLASHWINFO*);
@@ -1503,8 +1500,6 @@ get_effective_window_decorations (GdkSurface       *window,
 
        case GDK_SURFACE_TYPE_HINT_TOOLBAR:
        case GDK_SURFACE_TYPE_HINT_UTILITY:
-         gdk_surface_set_skip_taskbar_hint (window, TRUE);
-         gdk_surface_set_skip_pager_hint (window, TRUE);
          *decoration = (GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
          return TRUE;
 
@@ -4890,63 +4885,6 @@ gdk_win32_surface_set_modal_hint (GdkSurface *window,
 #endif
 }
 
-static void
-gdk_win32_surface_set_skip_taskbar_hint (GdkSurface *window,
-                                 gboolean   skips_taskbar)
-{
-  static GdkSurface *owner = NULL;
-  //GdkSurfaceAttr wa;
-
-  g_return_if_fail (GDK_IS_SURFACE (window));
-
-  GDK_NOTE (MISC, g_print ("gdk_surface_set_skip_taskbar_hint: %p: %s, doing nothing\n",
-                          GDK_SURFACE_HWND (window),
-                          skips_taskbar ? "YES" : "NO"));
-
-  // ### TODO: Need to figure out what to do here.
-  return;
-
-  if (skips_taskbar)
-    {
-#if 0
-      if (owner == NULL)
-               {
-                 wa.surface_type = GDK_SURFACE_TEMP;
-                 wa.wclass = GDK_INPUT_OUTPUT;
-                 wa.width = wa.height = 1;
-                 owner = gdk_surface_new_internal (NULL, &wa, 0, TRUE);
-               }
-#endif
-
-      SetWindowLongPtr (GDK_SURFACE_HWND (window), GWLP_HWNDPARENT, (LONG_PTR) GDK_SURFACE_HWND (owner));
-
-#if 0 /* Should we also turn off the minimize and maximize buttons? */
-      SetWindowLong (GDK_SURFACE_HWND (window), GWL_STYLE,
-                    GetWindowLong (GDK_SURFACE_HWND (window), GWL_STYLE) & 
~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
-
-      SetWindowPos (GDK_SURFACE_HWND (window), SWP_NOZORDER_SPECIFIED,
-                   0, 0, 0, 0,
-                   SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
-                   SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
-#endif
-    }
-  else
-    {
-      SetWindowLongPtr (GDK_SURFACE_HWND (window), GWLP_HWNDPARENT, 0);
-    }
-}
-
-static void
-gdk_win32_surface_set_skip_pager_hint (GdkSurface *window,
-                               gboolean   skips_pager)
-{
-  g_return_if_fail (GDK_IS_SURFACE (window));
-
-  GDK_NOTE (MISC, g_print ("gdk_surface_set_skip_pager_hint: %p: %s, doing nothing\n",
-                          GDK_SURFACE_HWND (window),
-                          skips_pager ? "YES" : "NO"));
-}
-
 static void
 gdk_win32_surface_set_type_hint (GdkSurface        *window,
                          GdkSurfaceTypeHint hint)
@@ -5311,9 +5249,6 @@ gdk_surface_impl_win32_class_init (GdkSurfaceImplWin32Class *klass)
   impl_class->set_type_hint = gdk_win32_surface_set_type_hint;
   impl_class->get_type_hint = gdk_win32_surface_get_type_hint;
   impl_class->set_modal_hint = gdk_win32_surface_set_modal_hint;
-  impl_class->set_skip_taskbar_hint = gdk_win32_surface_set_skip_taskbar_hint;
-  impl_class->set_skip_pager_hint = gdk_win32_surface_set_skip_pager_hint;
-  impl_class->set_urgency_hint = gdk_win32_surface_set_urgency_hint;
   impl_class->set_geometry_hints = gdk_win32_surface_set_geometry_hints;
   impl_class->set_title = gdk_win32_surface_set_title;
   //impl_class->set_startup_id = gdk_x11_surface_set_startup_id;
diff --git a/gdk/win32/gdkwin32surface.h b/gdk/win32/gdkwin32surface.h
index 9dda179353..f081a49aad 100644
--- a/gdk/win32/gdkwin32surface.h
+++ b/gdk/win32/gdkwin32surface.h
@@ -50,6 +50,10 @@ typedef struct _GdkWin32SurfaceClass GdkWin32SurfaceClass;
 GDK_AVAILABLE_IN_ALL
 GType    gdk_win32_surface_get_type          (void);
 
+GDK_AVAILABLE_IN_ALL
+void gdk_win32_surface_set_urgency_hint    (GdkSurface *surface,
+                                            gboolean    urgent);
+
 G_END_DECLS
 
 #endif /* __GDK_X11_SURFACE_H__ */
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 2e3714859e..aa5eb9b5a4 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -1867,9 +1867,9 @@ gdk_x11_surface_set_modal_hint (GdkSurface *surface,
                             NULL);
 }
 
-static void
+void
 gdk_x11_surface_set_skip_taskbar_hint (GdkSurface *surface,
-                                     gboolean   skips_taskbar)
+                                       gboolean    skips_taskbar)
 {
   GdkToplevelX11 *toplevel;
   
@@ -1888,9 +1888,9 @@ gdk_x11_surface_set_skip_taskbar_hint (GdkSurface *surface,
                             NULL);
 }
 
-static void
+void
 gdk_x11_surface_set_skip_pager_hint (GdkSurface *surface,
-                                   gboolean   skips_pager)
+                                     gboolean    skips_pager)
 {
   GdkToplevelX11 *toplevel;
     
@@ -1909,9 +1909,9 @@ gdk_x11_surface_set_skip_pager_hint (GdkSurface *surface,
                             NULL);
 }
 
-static void
+void
 gdk_x11_surface_set_urgency_hint (GdkSurface *surface,
-                            gboolean   urgent)
+                                  gboolean    urgent)
 {
   GdkToplevelX11 *toplevel;
     
@@ -4658,9 +4658,6 @@ gdk_surface_impl_x11_class_init (GdkSurfaceImplX11Class *klass)
   impl_class->set_type_hint = gdk_x11_surface_set_type_hint;
   impl_class->get_type_hint = gdk_x11_surface_get_type_hint;
   impl_class->set_modal_hint = gdk_x11_surface_set_modal_hint;
-  impl_class->set_skip_taskbar_hint = gdk_x11_surface_set_skip_taskbar_hint;
-  impl_class->set_skip_pager_hint = gdk_x11_surface_set_skip_pager_hint;
-  impl_class->set_urgency_hint = gdk_x11_surface_set_urgency_hint;
   impl_class->set_geometry_hints = gdk_x11_surface_set_geometry_hints;
   impl_class->set_title = gdk_x11_surface_set_title;
   impl_class->set_startup_id = gdk_x11_surface_set_startup_id;
diff --git a/gdk/x11/gdkx11surface.h b/gdk/x11/gdkx11surface.h
index bb23dbee71..fcd6a8006d 100644
--- a/gdk/x11/gdkx11surface.h
+++ b/gdk/x11/gdkx11surface.h
@@ -105,6 +105,16 @@ GDK_AVAILABLE_IN_ALL
 GdkSurface  *gdk_x11_surface_lookup_for_display      (GdkDisplay *display,
                                                       Window      window);
 
+GDK_AVAILABLE_IN_ALL
+void gdk_x11_surface_set_skip_taskbar_hint (GdkSurface *surface,
+                                            gboolean    skips_taskbar);
+GDK_AVAILABLE_IN_ALL
+void gdk_x11_surface_set_skip_pager_hint   (GdkSurface *surface,
+                                            gboolean    skips_pager);
+GDK_AVAILABLE_IN_ALL
+void gdk_x11_surface_set_urgency_hint      (GdkSurface *surface,
+                                            gboolean    urgent);
+
 G_END_DECLS
 
 #endif /* __GDK_X11_SURFACE_H__ */
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 153616831f..5d9923900c 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -49,10 +49,6 @@
  * convenience widget; you could construct the equivalent of #GtkMessageDialog
  * from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
  *
- * One difference from #GtkDialog is that #GtkMessageDialog sets the
- * #GtkWindow:skip-taskbar-hint property to %TRUE, so that the dialog is hidden
- * from the taskbar by default.
- *
  * The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
  * you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
  * makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5babfe6b12..b3cb887443 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -254,12 +254,9 @@ typedef struct
   guint    modal                     : 1;
   guint    position                  : 3;
   guint    resizable                 : 1;
-  guint    skips_pager               : 1;
-  guint    skips_taskbar             : 1;
   guint    stick_initially           : 1;
   guint    transient_parent_group    : 1;
   guint    type                      : 4; /* GtkWindowType */
-  guint    urgent                    : 1;
   guint    gravity                   : 5; /* GdkGravity */
   guint    csd_requested             : 1;
   guint    client_decorated          : 1; /* Decorations drawn client-side */
@@ -321,9 +318,6 @@ enum {
   PROP_ICON_NAME,
   PROP_DISPLAY,
   PROP_TYPE_HINT,
-  PROP_SKIP_TASKBAR_HINT,
-  PROP_SKIP_PAGER_HINT,
-  PROP_URGENCY_HINT,
   PROP_ACCEPT_FOCUS,
   PROP_FOCUS_ON_MAP,
   PROP_DECORATED,
@@ -957,27 +951,6 @@ gtk_window_class_init (GtkWindowClass *klass)
                          GDK_SURFACE_TYPE_HINT_NORMAL,
                          GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
-  window_props[PROP_SKIP_TASKBAR_HINT] =
-      g_param_spec_boolean ("skip-taskbar-hint",
-                            P_("Skip taskbar"),
-                            P_("TRUE if the window should not be in the task bar."),
-                            FALSE,
-                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
-
-  window_props[PROP_SKIP_PAGER_HINT] =
-      g_param_spec_boolean ("skip-pager-hint",
-                            P_("Skip pager"),
-                            P_("TRUE if the window should not be in the pager."),
-                            FALSE,
-                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
-
-  window_props[PROP_URGENCY_HINT] =
-      g_param_spec_boolean ("urgency-hint",
-                            P_("Urgent"),
-                            P_("TRUE if the window should be brought to the user’s attention."),
-                            FALSE,
-                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
-
   /**
    * GtkWindow:accept-focus:
    *
@@ -1989,18 +1962,6 @@ gtk_window_set_property (GObject      *object,
       gtk_window_set_type_hint (window,
                                 g_value_get_enum (value));
       break;
-    case PROP_SKIP_TASKBAR_HINT:
-      gtk_window_set_skip_taskbar_hint (window,
-                                        g_value_get_boolean (value));
-      break;
-    case PROP_SKIP_PAGER_HINT:
-      gtk_window_set_skip_pager_hint (window,
-                                      g_value_get_boolean (value));
-      break;
-    case PROP_URGENCY_HINT:
-      gtk_window_set_urgency_hint (window,
-                                  g_value_get_boolean (value));
-      break;
     case PROP_ACCEPT_FOCUS:
       gtk_window_set_accept_focus (window,
                                   g_value_get_boolean (value));
@@ -2098,18 +2059,6 @@ gtk_window_get_property (GObject      *object,
     case PROP_TYPE_HINT:
       g_value_set_enum (value, priv->type_hint);
       break;
-    case PROP_SKIP_TASKBAR_HINT:
-      g_value_set_boolean (value,
-                           gtk_window_get_skip_taskbar_hint (window));
-      break;
-    case PROP_SKIP_PAGER_HINT:
-      g_value_set_boolean (value,
-                           gtk_window_get_skip_pager_hint (window));
-      break;
-    case PROP_URGENCY_HINT:
-      g_value_set_boolean (value,
-                           gtk_window_get_urgency_hint (window));
-      break;
     case PROP_ACCEPT_FOCUS:
       g_value_set_boolean (value,
                            gtk_window_get_accept_focus (window));
@@ -3523,147 +3472,6 @@ gtk_window_get_type_hint (GtkWindow *window)
   return priv->type_hint;
 }
 
-/**
- * gtk_window_set_skip_taskbar_hint:
- * @window: a #GtkWindow 
- * @setting: %TRUE to keep this window from appearing in the task bar
- * 
- * Windows may set a hint asking the desktop environment not to display
- * the window in the task bar. This function sets this hint.
- **/
-void
-gtk_window_set_skip_taskbar_hint (GtkWindow *window,
-                                  gboolean   setting)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_if_fail (GTK_IS_WINDOW (window));
-
-  setting = setting != FALSE;
-
-  if (priv->skips_taskbar != setting)
-    {
-      priv->skips_taskbar = setting;
-      if (_gtk_widget_get_realized (GTK_WIDGET (window)))
-        gdk_surface_set_skip_taskbar_hint (_gtk_widget_get_surface (GTK_WIDGET (window)),
-                                          priv->skips_taskbar);
-      g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_TASKBAR_HINT]);
-    }
-}
-
-/**
- * gtk_window_get_skip_taskbar_hint:
- * @window: a #GtkWindow
- * 
- * Gets the value set by gtk_window_set_skip_taskbar_hint()
- * 
- * Returns: %TRUE if window shouldn’t be in taskbar
- **/
-gboolean
-gtk_window_get_skip_taskbar_hint (GtkWindow *window)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
-
-  return priv->skips_taskbar;
-}
-
-/**
- * gtk_window_set_skip_pager_hint:
- * @window: a #GtkWindow 
- * @setting: %TRUE to keep this window from appearing in the pager
- * 
- * Windows may set a hint asking the desktop environment not to display
- * the window in the pager. This function sets this hint.
- * (A "pager" is any desktop navigation tool such as a workspace
- * switcher that displays a thumbnail representation of the windows
- * on the screen.)
- **/
-void
-gtk_window_set_skip_pager_hint (GtkWindow *window,
-                                gboolean   setting)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_if_fail (GTK_IS_WINDOW (window));
-
-  setting = setting != FALSE;
-
-  if (priv->skips_pager != setting)
-    {
-      priv->skips_pager = setting;
-      if (_gtk_widget_get_realized (GTK_WIDGET (window)))
-        gdk_surface_set_skip_pager_hint (_gtk_widget_get_surface (GTK_WIDGET (window)),
-                                        priv->skips_pager);
-      g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_PAGER_HINT]);
-    }
-}
-
-/**
- * gtk_window_get_skip_pager_hint:
- * @window: a #GtkWindow
- * 
- * Gets the value set by gtk_window_set_skip_pager_hint().
- * 
- * Returns: %TRUE if window shouldn’t be in pager
- **/
-gboolean
-gtk_window_get_skip_pager_hint (GtkWindow *window)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
-
-  return priv->skips_pager;
-}
-
-/**
- * gtk_window_set_urgency_hint:
- * @window: a #GtkWindow 
- * @setting: %TRUE to mark this window as urgent
- * 
- * Windows may set a hint asking the desktop environment to draw
- * the users attention to the window. This function sets this hint.
- **/
-void
-gtk_window_set_urgency_hint (GtkWindow *window,
-                            gboolean   setting)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_if_fail (GTK_IS_WINDOW (window));
-
-  setting = setting != FALSE;
-
-  if (priv->urgent != setting)
-    {
-      priv->urgent = setting;
-      if (_gtk_widget_get_realized (GTK_WIDGET (window)))
-        gdk_surface_set_urgency_hint (_gtk_widget_get_surface (GTK_WIDGET (window)),
-                                    priv->urgent);
-      g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_URGENCY_HINT]);
-    }
-}
-
-/**
- * gtk_window_get_urgency_hint:
- * @window: a #GtkWindow
- * 
- * Gets the value set by gtk_window_set_urgency_hint()
- * 
- * Returns: %TRUE if window is urgent
- **/
-gboolean
-gtk_window_get_urgency_hint (GtkWindow *window)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
-
-  return priv->urgent;
-}
-
 /**
  * gtk_window_set_accept_focus:
  * @window: a #GtkWindow 
@@ -5878,12 +5686,6 @@ gtk_window_realize (GtkWidget *widget)
   if (!priv->deletable)
     gdk_surface_set_functions (surface, GDK_FUNC_ALL | GDK_FUNC_CLOSE);
 
-  if (gtk_window_get_skip_pager_hint (window))
-    gdk_surface_set_skip_pager_hint (surface, TRUE);
-
-  if (gtk_window_get_skip_taskbar_hint (window))
-    gdk_surface_set_skip_taskbar_hint (surface, TRUE);
-
   if (gtk_window_get_accept_focus (window))
     gdk_surface_set_accept_focus (surface, TRUE);
   else
diff --git a/gtk/ui/gtkmessagedialog.ui b/gtk/ui/gtkmessagedialog.ui
index c2ec33b197..128136bc95 100644
--- a/gtk/ui/gtkmessagedialog.ui
+++ b/gtk/ui/gtkmessagedialog.ui
@@ -4,7 +4,6 @@
     <property name="title"></property>
     <property name="resizable">0</property>
     <property name="type-hint">dialog</property>
-    <property name="skip-taskbar-hint">1</property>
     <child internal-child="headerbar">
       <object class="GtkHeaderBar" id="headerbar1"/>
     </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]