summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-29 11:14:01 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-03-11 19:35:55 -0400
commit6f36d9865e5bfab0f2462b7ad42b4859e0242820 (patch)
tree61864318b9efde30cc8ff1b6685549a5a2f4bce9 /gtk
parentd70c9453bae182b3e585374c479bbbf55a09f78a (diff)
downloadgtk+-6f36d9865e5bfab0f2462b7ad42b4859e0242820.tar.gz
Drop gtk_window_begin_move/resize_drag
These are just simple wrappers around GdkSurface api, and we don't need them.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkwindow.c66
-rw-r--r--gtk/gtkwindow.h14
2 files changed, 7 insertions, 73 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2f6b536499..f598e905ee 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6685,11 +6685,12 @@ move_window_clicked (GtkModelButton *button,
gpointer user_data)
{
GtkWindow *window = GTK_WINDOW (user_data);
+ GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
- gtk_window_begin_move_drag (window,
- 0, /* 0 means "use keyboard" */
- 0, 0,
- GDK_CURRENT_TIME);
+ gdk_surface_begin_move_drag (priv->surface,
+ 0, /* 0 means "use keyboard" */
+ 0, 0,
+ GDK_CURRENT_TIME);
}
static void
@@ -6697,8 +6698,9 @@ resize_window_clicked (GtkModelButton *button,
gpointer user_data)
{
GtkWindow *window = GTK_WINDOW (user_data);
+ GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
- gtk_window_begin_resize_drag (window,
+ gdk_surface_begin_resize_drag (priv->surface,
0,
0, /* 0 means "use keyboard" */
0, 0,
@@ -8069,60 +8071,6 @@ gtk_window_get_resizable (GtkWindow *window)
}
/**
- * gtk_window_begin_resize_drag:
- * @window: a #GtkWindow
- * @button: mouse button that initiated the drag
- * @edge: position of the resize control
- * @x: X position where the user clicked to initiate the drag, in window coordinates
- * @y: Y position where the user clicked to initiate the drag
- * @timestamp: timestamp from the click event that initiated the drag
- *
- * Starts resizing a window. This function is used if an application
- * has window resizing controls.
- */
-void
-gtk_window_begin_resize_drag (GtkWindow *window,
- GdkSurfaceEdge edge,
- gint button,
- gint x,
- gint y,
- guint32 timestamp)
-{
- GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
- g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (gtk_widget_get_visible (GTK_WIDGET (window)));
-
- gdk_surface_begin_resize_drag (priv->surface, edge, button, x, y, timestamp);
-}
-
-/**
- * gtk_window_begin_move_drag:
- * @window: a #GtkWindow
- * @button: mouse button that initiated the drag
- * @x: X position where the user clicked to initiate the drag, in window coordinates
- * @y: Y position where the user clicked to initiate the drag
- * @timestamp: timestamp from the click event that initiated the drag
- *
- * Starts moving a window. This function is used if an application has
- * window movement grips.
- */
-void
-gtk_window_begin_move_drag (GtkWindow *window,
- gint button,
- gint x,
- gint y,
- guint32 timestamp)
-{
- GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
- g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (gtk_widget_get_visible (GTK_WIDGET (window)));
-
- gdk_surface_begin_move_drag (priv->surface, button, x, y, timestamp);
-}
-
-/**
* gtk_window_set_display:
* @window: a #GtkWindow.
* @display: a #GdkDisplay.
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index a9274bbaac..78ff464b82 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -266,20 +266,6 @@ void gtk_window_set_keep_above (GtkWindow *window, gboolean setting);
GDK_AVAILABLE_IN_ALL
void gtk_window_set_keep_below (GtkWindow *window, gboolean setting);
-GDK_AVAILABLE_IN_ALL
-void gtk_window_begin_resize_drag (GtkWindow *window,
- GdkSurfaceEdge edge,
- gint button,
- gint x,
- gint y,
- guint32 timestamp);
-GDK_AVAILABLE_IN_ALL
-void gtk_window_begin_move_drag (GtkWindow *window,
- gint button,
- gint x,
- gint y,
- guint32 timestamp);
-
/* Set initial default size of the window (does not constrain user
* resize operations)
*/