mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
display: Remove gdk_display_get_last_seen_time()
Replace the only usage - in the X11 backend - with an X11-specific call.
This commit is contained in:
parent
8d9a3de65a
commit
c0c8e93d90
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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__ */
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user