Bug 276358 - GtkEntry background is wrong on first paint when parent is group box
Summary: GtkEntry background is wrong on first paint when parent is group box
Status: CONFIRMED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-23 20:54 UTC by Ruslan Kabatsayev
Modified: 2021-04-05 09:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2011-06-23 20:54:09 UTC
Version:           unspecified
OS:                Linux

See: http://i.imgur.com/YfiN5.png


Reproducible: Always

Steps to Reproduce:
Start nvidia-settings, select "X Server Display Configuration" (so that it resizes the window, otherwise groupboxes will trigger repaint), then go to "X Server XVideo Settings". Now prelight an entry, and its background becomes correct.
Comment 1 Hugo Pereira Da Costa 2011-06-27 08:26:38 UTC
... this is probably due to the combobox "resize", when label is resized.
I'll investigate from home where I have nvidia-settings available.
Comment 2 Ruslan Kabatsayev 2012-01-17 00:16:41 UTC
After a while since I reported this bug, the symptoms have changed a bit: http://i.imgur.com/sOt5E.png
Now unlabeled frames have uniform darker color at first, but (as you can see on the first one in the screenshot) mouse hover makes the widgets repaint to lighter background.
Maybe you've changed something, I dunno, as I dunno how it should behave :)
Comment 3 Ruslan Kabatsayev 2012-05-04 13:16:33 UTC
Since you no longer have nvidia-settings, here's a test case you definitely have:
http://simplest-image-hosting.net/png-0-screenshot-05042012-051249-pm
Best visible with dark color scheme, like Obsidian Coast.
Comment 4 Hugo Pereira Da Costa 2012-05-04 14:34:56 UTC
yes. Can definitely reproduce this one.
And it dissapears as soon as one resizes the window, right ? 
I think its because of our group box hack, that effectively reorganize the widgets, without triggering a repaint. I'll see what I can do.
Comment 5 Ruslan Kabatsayev 2012-05-04 14:48:58 UTC
Yes, it disappears on any next repaint (e.g. hover entry, move slider, etc.)
Comment 6 Ruslan Kabatsayev 2012-09-22 22:03:27 UTC
Setting NEW as it's reproducible...
Comment 7 Ruslan Kabatsayev 2012-10-20 15:07:20 UTC
It seems I know what is the reason of this bug. GtkFrame is only registered in GroupBoxEngine in Style::renderGroupBoxFrame(). But this method is called *after* the widgets inside GtkFrame have been rendered. And when the widgets are being tested if they are inside a groupbox, this code in Style::renderGroupBoxBackground() checks this:
GtkWidget* parent( Gtk::gtk_parent_groupbox( widget ) );
if( !( parent && animations().groupBoxEngine().contains( parent ) ) ) return false;

So, I'm thinking of removing this contains() check because if parent!=0, we already should think we are in a groupbox, shouldn't we? I don't completely understand the purpose of GroupBoxEngine at all in this case.
Comment 8 Ruslan Kabatsayev 2012-10-20 15:46:42 UTC
OK, I now somewhat do understand the reason we check GroupBoxEngine.contains(), thanks to git-blame :) . It's related to bug 286933, and now this looks your resolution wasn't that clean. Maybe we should trigger repaint the GtkFrame when newly registering it to GroupBoxEngine?
Comment 9 Justin Zobel 2021-03-09 23:58:20 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 10 Ruslan Kabatsayev 2021-04-05 09:58:15 UTC
I don't know how to reproduce this: nvidia-settings doesn't have this configuration of widgets anymore, and the screenshot of another test case in this thread is behind a broken link. So I guess this should be closed...