[gtk/wip/cdavis/window-present-docs] gtkwindow: Change present documentation




commit 564822f63e64204ecfa38a551c22946eb90120d8
Author: Christopher Davis <christopherdavis gnome org>
Date:   Thu Oct 21 16:28:53 2021 -0700

    gtkwindow: Change present documentation
    
    The way present is used doesn't line up with the ideal
    use case, and in most instances a developer won't
    actually have a timestamp to pass. `present()` is
    what should be used for cases when you don't have a
    timestamp, but the current docs have caused
    a lot of confusion.
    
    Instead of saying `present()` shouldn't be used,
    say when it should be used since there are still
    valid uses.

 gtk/gtkwindow.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6ae7cef9fb..16584c1448 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5192,9 +5192,8 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
  *
  * 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 to allow focus
- * stealing prevention to work correctly.
+ * This should be used when you want to present a window
+ * and do not have an event timestamp.
  */
 void
 gtk_window_present (GtkWindow *window)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]