mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
window: Undo the deprection of gtk_window_present
After considerable discussion, we came to the conclusion that the convenience of this API wins over the correctness of gtk_window_present_with_time(), in particular since we don't have a good mechanism to carry timestamps from the events to the places where we present windows.
This commit is contained in:
parent
1469d01e2e
commit
b4ae491b45
@ -8739,8 +8739,6 @@ gtk_window_snapshot (GtkWidget *widget,
|
|||||||
* Presents a window to the user. This function should not be used
|
* Presents a window to the user. This function should not be used
|
||||||
* as when it is called, it is too late to gather a valid timestamp
|
* as when it is called, it is too late to gather a valid timestamp
|
||||||
* to allow focus stealing prevention to work correctly.
|
* to allow focus stealing prevention to work correctly.
|
||||||
*
|
|
||||||
* Deprecated: 4.0: Use gtk_window_present_with_time() instead.
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_window_present (GtkWindow *window)
|
gtk_window_present (GtkWindow *window)
|
||||||
@ -8780,7 +8778,6 @@ gtk_window_present_with_time (GtkWindow *window,
|
|||||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GdkSurface *surface;
|
GdkSurface *surface;
|
||||||
static gsize warned_current_time = FALSE;
|
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||||
|
|
||||||
@ -8797,17 +8794,8 @@ gtk_window_present_with_time (GtkWindow *window,
|
|||||||
/* Translate a timestamp of GDK_CURRENT_TIME appropriately */
|
/* Translate a timestamp of GDK_CURRENT_TIME appropriately */
|
||||||
if (timestamp == GDK_CURRENT_TIME)
|
if (timestamp == GDK_CURRENT_TIME)
|
||||||
{
|
{
|
||||||
if (g_once_init_enter (&warned_current_time))
|
|
||||||
{
|
|
||||||
gboolean warned = TRUE;
|
|
||||||
g_warning ("gtk_window_present_with_time() should not be called with 0, or "
|
|
||||||
"GDK_CURRENT_TIME as a timestamp, the timestamp should instead be "
|
|
||||||
"gathered at the time the user initiated the request for the window "
|
|
||||||
"to be shown");
|
|
||||||
g_once_init_leave (&warned_current_time, warned);
|
|
||||||
}
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
if (GDK_IS_X11_SURFACE(surface))
|
if (GDK_IS_X11_SURFACE (surface))
|
||||||
{
|
{
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
gboolean gtk_window_propagate_key_event (GtkWindow *window,
|
gboolean gtk_window_propagate_key_event (GtkWindow *window,
|
||||||
GdkEventKey *event);
|
GdkEventKey *event);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_0_FOR(gtk_window_present_with_time)
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_window_present (GtkWindow *window);
|
void gtk_window_present (GtkWindow *window);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_window_present_with_time (GtkWindow *window,
|
void gtk_window_present_with_time (GtkWindow *window,
|
||||||
|
Loading…
Reference in New Issue
Block a user