[gtk/wip/baedert/filechooser: 3/9] window: Don't manually queue a draw on thew new focus widget
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/filechooser: 3/9] window: Don't manually queue a draw on thew new focus widget
- Date: Tue, 15 Jan 2019 07:11:39 +0000 (UTC)
commit cf1286a6f0bd9db236edfd096c88081739a2749c
Author: Timm Bäder <mail baedert org>
Date: Tue Jan 15 06:11:03 2019 +0100
window: Don't manually queue a draw on thew new focus widget
This is either unneeded and OK to remove, or it is needed and there's a
bug somewhere else.
gtk/gtkwindow.c | 17 -----------------
1 file changed, 17 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 75e962ed42..04243a3ef5 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7775,7 +7775,6 @@ gtk_window_real_set_focus (GtkWindow *window,
(priv->focus_widget != priv->default_widget))
{
_gtk_widget_set_has_default (priv->focus_widget, FALSE);
- gtk_widget_queue_draw (priv->focus_widget);
if (priv->default_widget)
_gtk_widget_set_has_default (priv->default_widget, TRUE);
@@ -7816,29 +7815,13 @@ gtk_window_real_set_focus (GtkWindow *window,
g_object_notify (G_OBJECT (priv->focus_widget), "is-focus");
}
- /* If the default widget changed, a redraw will have been queued
- * on the old and new default widgets by gtk_window_set_default(), so
- * we only have to worry about the case where it didn't change.
- * We'll sometimes queue a draw twice on the new widget but that
- * is harmless.
- */
- if (priv->default_widget &&
- (had_default != gtk_widget_has_default (priv->default_widget)))
- gtk_widget_queue_draw (priv->default_widget);
-
if (old_focus)
{
- if (old_focus_had_default != gtk_widget_has_default (old_focus))
- gtk_widget_queue_draw (old_focus);
-
g_object_thaw_notify (G_OBJECT (old_focus));
g_object_unref (old_focus);
}
if (focus)
{
- if (focus_had_default != gtk_widget_has_default (focus))
- gtk_widget_queue_draw (focus);
-
g_object_thaw_notify (G_OBJECT (focus));
g_object_unref (focus);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]