[gtk/wip/otte/monitors: 1/5] display: Remove gdk_display_get_last_seen_time()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/monitors: 1/5] display: Remove gdk_display_get_last_seen_time()
- Date: Wed, 13 May 2020 02:53:16 +0000 (UTC)
commit c0c8e93d90ceefe1cb83d9a2f9f4b1b01c79a775
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 7 05:00:39 2020 +0100
display: Remove gdk_display_get_last_seen_time()
Replace the only usage - in the X11 backend - with an X11-specific call.
gdk/broadway/gdkbroadway-server.c | 6 ------
gdk/broadway/gdkbroadway-server.h | 1 -
gdk/broadway/gdkbroadwaysurface.h | 3 ---
gdk/broadway/gdkdisplay-broadway.c | 7 -------
gdk/broadway/gdksurface-broadway.c | 9 ---------
gdk/gdk-private.h | 2 +-
gdk/gdkdisplay.c | 11 -----------
gdk/gdkdisplayprivate.h | 1 -
gdk/win32/gdkdisplay-win32.c | 7 -------
gdk/x11/gdkclipboard-x11.c | 2 +-
gdk/x11/gdkdisplay-x11.c | 7 -------
gdk/x11/gdkdrag-x11.c | 2 +-
12 files changed, 3 insertions(+), 55 deletions(-)
---
diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c
index 23207916db..6e235e1b52 100644
--- a/gdk/broadway/gdkbroadway-server.c
+++ b/gdk/broadway/gdkbroadway-server.c
@@ -160,12 +160,6 @@ _gdk_broadway_server_new (GdkDisplay *display,
return server;
}
-guint32
-_gdk_broadway_server_get_last_seen_time (GdkBroadwayServer *server)
-{
- return 0;
-}
-
static guint32
gdk_broadway_server_send_message_with_size (GdkBroadwayServer *server, BroadwayRequestBase *base,
gsize size, guint32 type, int fd)
diff --git a/gdk/broadway/gdkbroadway-server.h b/gdk/broadway/gdkbroadway-server.h
index e04d90f9b5..8bdcbb45c1 100644
--- a/gdk/broadway/gdkbroadway-server.h
+++ b/gdk/broadway/gdkbroadway-server.h
@@ -24,7 +24,6 @@ void _gdk_broadway_server_roundtrip (GdkBroadwaySer
gint32 id,
guint32 tag);
gulong _gdk_broadway_server_get_next_serial (GdkBroadwayServer *server);
-guint32 _gdk_broadway_server_get_last_seen_time (GdkBroadwayServer *server);
gboolean _gdk_broadway_server_lookahead_event (GdkBroadwayServer *server,
const char *types);
void _gdk_broadway_server_query_mouse (GdkBroadwayServer *server,
diff --git a/gdk/broadway/gdkbroadwaysurface.h b/gdk/broadway/gdkbroadwaysurface.h
index d05bf2627f..0e937d0a8d 100644
--- a/gdk/broadway/gdkbroadwaysurface.h
+++ b/gdk/broadway/gdkbroadwaysurface.h
@@ -46,9 +46,6 @@ typedef struct _GdkBroadwaySurfaceClass GdkBroadwaySurfaceClass;
GDK_AVAILABLE_IN_ALL
GType gdk_broadway_surface_get_type (void);
-GDK_AVAILABLE_IN_ALL
-guint32 gdk_broadway_get_last_seen_time (GdkSurface *surface);
-
G_END_DECLS
#endif /* __GDK_BROADWAY_SURFACE_H__ */
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index db7428719f..0a507dc3ae 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -340,12 +340,6 @@ gdk_broadway_display_get_setting (GdkDisplay *display,
return FALSE;
}
-static guint32
-gdk_broadway_display_get_last_seen_time (GdkDisplay *display)
-{
- return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server);
-}
-
typedef struct {
int id;
GdkDisplay *display;
@@ -437,5 +431,4 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
display_class->get_n_monitors = gdk_broadway_display_get_n_monitors;
display_class->get_monitor = gdk_broadway_display_get_monitor;
display_class->get_setting = gdk_broadway_display_get_setting;
- display_class->get_last_seen_time = gdk_broadway_display_get_last_seen_time;
}
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index 68927415cd..64ae49ccaf 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -1282,15 +1282,6 @@ gdk_broadway_surface_beep (GdkSurface *surface)
return FALSE;
}
-guint32
-gdk_broadway_get_last_seen_time (GdkSurface *surface)
-{
- GdkDisplay *display;
-
- display = gdk_surface_get_display (surface);
- return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server);
-}
-
static void
gdk_broadway_surface_class_init (GdkBroadwaySurfaceClass *klass)
{
diff --git a/gdk/gdk-private.h b/gdk/gdk-private.h
index 5a8d2fe657..eadf47a7ab 100644
--- a/gdk/gdk-private.h
+++ b/gdk/gdk-private.h
@@ -18,7 +18,7 @@ void gdk_pre_parse (void);
void gdk_surface_freeze_toplevel_updates (GdkSurface *surface);
void gdk_surface_thaw_toplevel_updates (GdkSurface *surface);
-guint32 gdk_display_get_last_seen_time (GdkDisplay *display);
+gboolean gdk_surface_supports_edge_constraints (GdkSurface *surface);
void gdk_display_set_double_click_time (GdkDisplay *display,
guint msec);
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 9274ca1318..88e5057e65 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1678,17 +1678,6 @@ gdk_display_setting_changed (GdkDisplay *display,
g_signal_emit (display, signals[SETTING_CHANGED], 0, name);
}
-guint32
-gdk_display_get_last_seen_time (GdkDisplay *display)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), GDK_CURRENT_TIME);
-
- if (GDK_DISPLAY_GET_CLASS (display)->get_last_seen_time)
- return GDK_DISPLAY_GET_CLASS (display)->get_last_seen_time (display);
-
- return GDK_CURRENT_TIME;
-}
-
void
gdk_display_set_double_click_time (GdkDisplay *display,
guint msec)
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 433f699f40..9ac0dd3932 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -164,7 +164,6 @@ struct _GdkDisplayClass
gboolean (*get_setting) (GdkDisplay *display,
const char *name,
GValue *value);
- guint32 (*get_last_seen_time) (GdkDisplay *display);
void (*set_cursor_theme) (GdkDisplay *display,
const char *name,
int size);
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index ffda794ec7..ec451426b0 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1083,12 +1083,6 @@ gdk_win32_display_get_setting (GdkDisplay *display,
return _gdk_win32_get_setting (name, value);
}
-static guint32
-gdk_win32_display_get_last_seen_time (GdkDisplay *display)
-{
- return GetMessageTime ();
-}
-
static void
gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
{
@@ -1129,7 +1123,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
#endif
display_class->get_setting = gdk_win32_display_get_setting;
- display_class->get_last_seen_time = gdk_win32_display_get_last_seen_time;
display_class->set_cursor_theme = gdk_win32_display_set_cursor_theme;
_gdk_win32_surfaceing_init ();
diff --git a/gdk/x11/gdkclipboard-x11.c b/gdk/x11/gdkclipboard-x11.c
index 743ad52c62..aae2d1216a 100644
--- a/gdk/x11/gdkclipboard-x11.c
+++ b/gdk/x11/gdkclipboard-x11.c
@@ -544,7 +544,7 @@ gdk_x11_clipboard_claim (GdkClipboard *clipboard,
Window xwindow = GDK_X11_DISPLAY (display)->leader_window;
guint32 time;
- time = gdk_display_get_last_seen_time (display);
+ time = gdk_x11_get_server_time (GDK_X11_DISPLAY (display)->leader_gdk_surface);
if (content)
{
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index ee129b8086..6f90f0de78 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2975,12 +2975,6 @@ gdk_x11_display_get_toplevel_windows (GdkDisplay *display)
return GDK_X11_DISPLAY (display)->toplevels;
}
-static guint32
-gdk_x11_display_get_last_seen_time (GdkDisplay *display)
-{
- return gdk_x11_get_server_time (GDK_X11_DISPLAY (display)->leader_gdk_surface);
-}
-
static gboolean
gdk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
@@ -3037,7 +3031,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->get_n_monitors = gdk_x11_display_get_n_monitors;
display_class->get_monitor = gdk_x11_display_get_monitor;
display_class->get_setting = gdk_x11_display_get_setting;
- display_class->get_last_seen_time = gdk_x11_display_get_last_seen_time;
display_class->set_cursor_theme = gdk_x11_display_set_cursor_theme;
class->xevent = gdk_event_source_xevent;
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index 3ae250c965..a23c2159a9 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -2040,7 +2040,7 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
move_drag_surface (drag, x_root, y_root);
- x11_drag->timestamp = gdk_display_get_last_seen_time (display);
+ x11_drag->timestamp = gdk_x11_get_server_time (GDK_X11_DISPLAY (display)->leader_gdk_surface);
xselection = gdk_x11_get_xatom_by_name_for_display (display, "XdndSelection");
XSetSelectionOwner (GDK_DISPLAY_XDISPLAY (display),
xselection,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]