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 641630 - Some dialog boxes will not have any close buttons
Some dialog boxes will not have any close buttons
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 762188 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-02-06 00:33 UTC by Hedayat Vatankhah
Modified: 2016-03-16 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
theme: Stop hiding titlebar buttons in dialogs (1000 bytes, patch)
2015-10-07 14:09 UTC, Florian Müllner
committed Details | Review

Description Hedayat Vatankhah 2011-02-06 00:33:54 UTC
Hi,
I've recently tried using Gnome 3. Apparently, it has been decided to remove window border icons (e.g. close button) from some types of dialogue boxes. However, this will leave some windows without any close buttons. As an example, if you run Firefox 4 beta and then open its About window; it won't have any close buttons (since the window itself doesn't have any buttons).
Comment 1 Jaak Ristioja 2011-06-20 13:44:14 UTC
I can confirm this when running BibleTime, a Qt application. Passing Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint or any combination thereof has no effect on Gnome 3. Only using Qt::Window works, but this turns it into a regular window instead of a dialog window.

I suppose both _NET_WM_WINDOW_TYPE_DIALOG and MWM_FUNC_CLOSE get through to Mutter, but the latter fails to show the close button.
Comment 2 Jaak Ristioja 2011-06-20 14:12:51 UTC
You can confirm this behavior by running the Qt demo application "Window Flags": http://doc.qt.nokia.com/widgets-windowflags.html

You can run it by installing the qt-demo or (qt4-demo or qtdemo-qt4 on some platforms) application, selecting "Widgets" -> "Window Flags" -> "Launch" or by running the "Window Flags" application manually from its install location.

Just select "Dialog" (== Qt::Dialog) as the "Type" and toggle combinations of "Customize window", "Window title" and "Window close button" checkboxes to verify that it doesn't work.

On Gnome 2.30.2 the showing/hiding the close button works.
Comment 3 Hedayat Vatankhah 2011-10-20 15:49:15 UTC
Well, at least Firefox and Thunderbird have fixed this problem. So, at least it seems that it is not a problem with GTK+ applications and can be fixed by the application. Maybe a separate bug for Qt applications should be opened?!
Comment 4 Jaak Ristioja 2011-10-20 17:52:56 UTC
I do not see any rational reason to consider this to be a bug in Qt applications when it is Gnome 3 that bluntly ignores the MWM_FUNC_CLOSE hint. That Firefox and Thunderbird have "fixed" the issue should be considered as a friendly gesture towards Gnome, not as an actual bug in those applications. The bug is still in Gnome 3. At minimum, I see this as a backwards-compatibility issue.

PS: Sorry for not being as friendly as others on this issue, and not bowing before the will of Gnome to define how all applications should design and present their dialogs (and to world domination :).
PPS: Until somebody gives good reasons for me to change my position on this matter, I will likely continue directing similar bug reports filed against such applications to Gnome. Thanks.
Comment 5 Hedayat Vatankhah 2011-10-20 18:03:14 UTC
I didn't mean that the problem is necessarily in Qt applications. I meant that if the problem with Qt applications still exist, I suggest to open a separate bug in *GNOME* about missing close button for them; since I (as the reporter of this bug) has no clue about why there were no close buttons previously and how Firefox/Thunderbird managed to add it again if it cannot be added in a standard way (seems to be MWM_FUNC_CLOSE as you said). Apparently you have a better insight about the problem, so I certainly suggest you to open a separate bug with a better subject about the issue. 

Anyway, I'm not a member of Gnome team so I neither tell you to not report bugs about this issue nor I will brings reasons for you to change your position! :P
Comment 6 Hashem Nasarat 2014-04-11 13:51:03 UTC
I believe this is a valid bug. Unlike in OS X and Windows, dialogs don't have a 'x' (to close) button in GNOME. They probably should, since it's quite a pain for developers to add special [ "Close" ] buttons to their dialogs, just to appease mutter users.

GTK+ 3.12's new dialogs have headerbars with 'x' buttons, so it seems like there is recognition that dialogs should have 'x' buttons.

Please add 'x' buttons in the top of the title bar for mutter-decorated dialogs.

Here is some proof of the inconvenience caused by the current behavior:

https://stackoverflow.com/questions/8691025/qt-qdialog-and-gnome-3-how-to-display-the-close-button-title-bar-and-make-it-mo

http://www.qtcentre.org/threads/31905-Show-maximize-button-in-the-title-bar-of-a-QDialog-under-GNOME

http://musescore.org/node/21036

https://github.com/nvbn/everpad/issues/88
Comment 7 Hashem Nasarat 2014-04-11 15:05:13 UTC
One more example:

https://bugs.launchpad.net/bzr-explorer/+bug/1090331
Comment 8 Florian Müllner 2015-10-07 14:09:18 UTC
The following fix has been pushed:
86d8c39 theme: Stop hiding titlebar buttons in dialogs
Comment 9 Florian Müllner 2015-10-07 14:09:25 UTC
Created attachment 312828 [details] [review]
theme: Stop hiding titlebar buttons in dialogs

As design patterns have evolved, dialogs that use CSD do use titlebar
buttons, so it's time to re-enable them for SSD as well.
Comment 10 Florian Müllner 2016-03-16 20:33:08 UTC
*** Bug 762188 has been marked as a duplicate of this bug. ***