GNOME Bugzilla – Bug 662527
Focus and state changes cause redraws on unaffected widgets
Last modified: 2012-10-16 02:11:52 UTC
Created attachment 199761 [details] Testcases I noticed that when the focused widget or the state of a widget change, other widgets receive many redraw signals. Consider for instance the attached test application, consisting of a window with a GtkBox, a GtkToolbar and a GtkCanvas. Default focus is on a GtkToolButton. There are Gtk2 and Gtk3 variants, test_gtk2.py and test_gtk3.py. Observations, using test_gtk3.py: - A button-press on the window border (which causes the focused ToolButton to unfocus) causes the drawingarea to redraw three times. - Setting window.set_focus(None) stops the drawingarea from getting redrawn in the above described situation. - A mouse-leave on a non-focused GtkToolButton causes the drawingarea to redraw 4 times. - In general, each focus change and each state change causes 4 redraws for any widget which is a parent of the focus-changed/state-changed widget. Observations, using test_gtk2.py - The drawingarea never gets redrawn on toolbutton focus / state changes - In general, each focus change and each state change causes just 1 redraw for any widget which is a parent of the focus-changed/state-changed widget. Using gtk3-3.2.1-1.fc16.x86_64
I can't make that happen anymore with GTK 3.4 or GTK 3.6. The behavior of GTK 3 seems to be equivalent to GTK 2 in the cases you gave. Does it still happen for you with an updated GTK? Or can we close this bug?
Lets assume it is fixed.