[gtk/present-toplevel-2: 78/83] Drop mwm hints from api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel-2: 78/83] Drop mwm hints from api
- Date: Thu, 12 Mar 2020 00:49:33 +0000 (UTC)
commit 7a3d7d6d157253fc53ef883d8917ea14b2ae49c2
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 9 12:03:48 2020 -0700
Drop mwm hints from api
The GdkWMDecoration and GdkWMFunction enums
are no longer used in the api, so move them
to the x11 backend where they are used.
gdk/gdksurface.h | 53 ------------------------------------------------
gdk/x11/gdksurface-x11.c | 21 +++++++++++++++++++
2 files changed, 21 insertions(+), 53 deletions(-)
---
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 7a43059c78..cd11aa368f 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -76,59 +76,6 @@ typedef enum
GDK_HINT_USER_SIZE = 1 << 8
} GdkSurfaceHints;
-/* The next two enumeration values current match the
- * Motif constants. If this is changed, the implementation
- * of gdk_surface_set_decorations/gdk_surface_set_functions
- * will need to change as well.
- */
-/**
- * GdkWMDecoration:
- * @GDK_DECOR_ALL: all decorations should be applied.
- * @GDK_DECOR_BORDER: a frame should be drawn around the surface.
- * @GDK_DECOR_RESIZEH: the frame should have resize handles.
- * @GDK_DECOR_TITLE: a titlebar should be placed above the surface.
- * @GDK_DECOR_MENU: a button for opening a menu should be included.
- * @GDK_DECOR_MINIMIZE: a minimize button should be included.
- * @GDK_DECOR_MAXIMIZE: a maximize button should be included.
- *
- * These are hints originally defined by the Motif toolkit.
- * The window manager can use them when determining how to decorate
- * the surface. The hint must be set before mapping the surface.
- */
-typedef enum
-{
- GDK_DECOR_ALL = 1 << 0,
- GDK_DECOR_BORDER = 1 << 1,
- GDK_DECOR_RESIZEH = 1 << 2,
- GDK_DECOR_TITLE = 1 << 3,
- GDK_DECOR_MENU = 1 << 4,
- GDK_DECOR_MINIMIZE = 1 << 5,
- GDK_DECOR_MAXIMIZE = 1 << 6
-} GdkWMDecoration;
-
-/**
- * GdkWMFunction:
- * @GDK_FUNC_ALL: all functions should be offered.
- * @GDK_FUNC_RESIZE: the surface should be resizable.
- * @GDK_FUNC_MOVE: the surface should be movable.
- * @GDK_FUNC_MINIMIZE: the surface should be minimizable.
- * @GDK_FUNC_MAXIMIZE: the surface should be maximizable.
- * @GDK_FUNC_CLOSE: the surface should be closable.
- *
- * These are hints originally defined by the Motif toolkit. The window manager
- * can use them when determining the functions to offer for the surface. The
- * hint must be set before mapping the surface.
- */
-typedef enum
-{
- GDK_FUNC_ALL = 1 << 0,
- GDK_FUNC_RESIZE = 1 << 1,
- GDK_FUNC_MOVE = 1 << 2,
- GDK_FUNC_MINIMIZE = 1 << 3,
- GDK_FUNC_MAXIMIZE = 1 << 4,
- GDK_FUNC_CLOSE = 1 << 5
-} GdkWMFunction;
-
/**
* GdkSurfaceEdge:
* @GDK_SURFACE_EDGE_NORTH_WEST: the top left corner.
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 0666d975bc..580874cf50 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -3496,6 +3496,17 @@ gdk_surface_set_mwm_hints (GdkSurface *surface,
XFree (hints);
}
+typedef enum
+{
+ GDK_DECOR_ALL = 1 << 0,
+ GDK_DECOR_BORDER = 1 << 1,
+ GDK_DECOR_RESIZEH = 1 << 2,
+ GDK_DECOR_TITLE = 1 << 3,
+ GDK_DECOR_MENU = 1 << 4,
+ GDK_DECOR_MINIMIZE = 1 << 5,
+ GDK_DECOR_MAXIMIZE = 1 << 6
+} GdkWMDecoration;
+
static void
gdk_x11_surface_set_decorations (GdkSurface *surface,
GdkWMDecoration decorations)
@@ -3540,6 +3551,16 @@ gdk_x11_surface_get_decorations(GdkSurface *surface,
return result;
}
+typedef enum
+{
+ GDK_FUNC_ALL = 1 << 0,
+ GDK_FUNC_RESIZE = 1 << 1,
+ GDK_FUNC_MOVE = 1 << 2,
+ GDK_FUNC_MINIMIZE = 1 << 3,
+ GDK_FUNC_MAXIMIZE = 1 << 4,
+ GDK_FUNC_CLOSE = 1 << 5
+} GdkWMFunction;
+
static void
gdk_x11_surface_set_functions (GdkSurface *surface,
GdkWMFunction functions)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]