gtk_window_set_decorated(window, FALSE) does not work when called before showing the window

Bug #527431 reported by Brett Simmers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Fix Released
Low
Cody Russell

Bug Description

Binary package hint: libgtk2.0-0

Calling gtk_window_set_decorated(window, FALSE) before showing the window does not seem to be working (the window will still have window decorations). I've attached a small reproduction case with more details in a header comment. Building and running that program on versions of Ubuntu < 10.04 give the expected result of no window decorations on both windows. In Ubuntu 10.04, the window that was shown after the call to gtk_window_set_decorated() will still have decorations.

I'm using Ubuntu 10.04 alpha, up to date as of 14:30PST February 24th. The gtk package version is 2.19.5-1ubuntu6. This is reproducible with both Metacity and Compiz, so it is most likely not a WM issue.

Tags: gtk-csd
Revision history for this message
Brett Simmers (swtaarrs) wrote :
Revision history for this message
Brett Simmers (swtaarrs) wrote :

I took a look at the documentation for the function to make sure this behavior wasn't intentional, and it actually recommends calling set_decorated before showing the window, even though that's what triggers the bug:

"Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling gtk_window_show()."

Changed in gtk+2.0 (Ubuntu):
importance: Undecided → Low
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
Cody Russell (bratsche) wrote :

Thanks Brett. New release of gtk+ will be released on Friday which will include a fix for this.

Changed in gtk+2.0 (Ubuntu):
assignee: nobody → Cody Russell (bratsche)
status: New → In Progress
Revision history for this message
Christian Hammond (chipx86) wrote :

Hey guys,

For what it's worth, this totally breaks VMware Workstation and Player in several ways. I'd really hate to see all our products suddenly not work for users upgrading to 10.04 :)

Revision history for this message
Christian Hammond (chipx86) wrote :

Perfect, thanks guys :) Guess I posted just slightly too late.

Revision history for this message
Cody Russell (bratsche) wrote :

I would hate for that to happen to, because I use VMware Workstation on occasion. :)

Revision history for this message
Cody Russell (bratsche) wrote :

Can you confirm that the latest gtk+ release (2.19.6-1ubuntu1) fixes your problem?

Revision history for this message
Brett Simmers (swtaarrs) wrote :

Yep, it's working as expected after updating gtk. Thanks!

Cody Russell (bratsche)
tags: added: gtk-csd
Changed in gtk+2.0 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.