After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135902 - File selector draw badly when browse is expanded
File selector draw badly when browse is expanded
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.3.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
: 145352 (view as bug list)
Depends on: 135903
Blocks:
 
 
Reported: 2004-03-02 00:51 UTC by Jonathan Blandford
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Image showing problem (41.95 KB, image/png)
2004-03-02 00:52 UTC, Jonathan Blandford
Details

Description Jonathan Blandford 2004-03-02 00:51:19 UTC
When the browse button is expanded, not everything is drawn correctly.
Comment 1 Jonathan Blandford 2004-03-02 00:52:15 UTC
Created attachment 25006 [details]
Image showing problem
Comment 2 Soren Sandmann Pedersen 2004-03-07 20:28:13 UTC
This is what happens:

     - When the expander is expanded, the "extra" area
       gets gtk_widget_show() called on it.

     - This causes the extra area to be queued for a draw

     - In the idle loop the area is not drawn because it overlaps
       the dialog's button area, and so gets clipped out by
       gtk_container_propagate_expose()
 
     - The configure event arrives, and the dialog is size allocated.
       Because of bugs in the GtkWindow size allocation 
       logic where GtkWidget->allocation is sometimes out of sync with
       the actual window size when gtk_widget_queue_draw() is called,
       this doesn't cause the window to be invalidated.
           (Normally not a problem, because windows are just gray
       like their background color anyway).

     - The FileChooserDefault gets size allocated, but this doesn't
       cause a redraw because FileChooserDefault inherits GtkVbox
       which calls gtk_widget_set_redraw_on_allocate (widget, FALSE);
       on itself.

     - So, only the areas that get redrawn for other reasons (ie. 
       the buttons) actually get drawn.

A simple fix is to simply call

     gtk_widget_set_redraw_on_allocate (impl, TRUE) 

in gtk_file_chooser_default_init().
Comment 3 Jonathan Blandford 2004-03-07 21:23:54 UTC
Committed this as a work around.
Comment 4 Cody Russell 2007-12-29 22:55:08 UTC
*** Bug 145352 has been marked as a duplicate of this bug. ***