[gtk/wip/readonly-events: 16/25] wip focus spew
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/readonly-events: 16/25] wip focus spew
- Date: Fri, 14 Feb 2020 22:02:19 +0000 (UTC)
commit 04b4b5f6ca590aab61ef589f7ef3cecbe47d13a6
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 13 12:27:43 2020 -0500
wip focus spew
gtk/gtkmain.c | 2 ++
gtk/gtkwindow.c | 4 ++++
2 files changed, 6 insertions(+)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 631c308e2d..1e8b7524f8 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1323,6 +1323,8 @@ synth_crossing (GtkWidget *widget,
event->focus_change.mode = crossing_mode;
event->focus_change.detail = notify_type;
+g_print ("%s: %s\n", G_OBJECT_TYPE_NAME (widget), enter ? "focus-in" : "focus-out");
+
flags = GTK_STATE_FLAG_FOCUSED;
if (!GTK_IS_WINDOW (toplevel) || gtk_window_get_focus_visible (GTK_WINDOW (toplevel)))
flags |= GTK_STATE_FLAG_FOCUS_VISIBLE;
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 37836d360f..057a7f3bfc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6394,6 +6394,10 @@ gtk_window_set_focus (GtkWindow *window,
if (event->any.surface)
g_object_ref (event->any.surface);
+g_print ("window: focus %s -> %s\n",
+ old_focus ? G_OBJECT_TYPE_NAME (old_focus) : "",
+ focus ? G_OBJECT_TYPE_NAME (focus) : "");
+
gtk_synthesize_crossing_events (GTK_ROOT (window), old_focus, focus, event, GDK_CROSSING_NORMAL);
g_object_unref (event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]