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 630363 - No dimming with Xchat quit confirmation dialog
No dimming with Xchat quit confirmation dialog
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-09-22 20:21 UTC by Mathieu Bridon
Modified: 2010-09-30 21:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sync window_type between MutterWindow and MetaWindow (953 bytes, patch)
2010-09-23 13:06 UTC, Maxim Ermilov
rejected Details | Review
[windowDimmer] handle changing of window_type (2.32 KB, patch)
2010-09-23 13:07 UTC, Maxim Ermilov
needs-work Details | Review
mutter-window: Don't track the window type twice (8.86 KB, patch)
2010-09-23 21:50 UTC, drago01
needs-work Details | Review
Don't use mutter_window_get_window_type (2.39 KB, patch)
2010-09-23 21:53 UTC, drago01
none Details | Review
Don't use mutter_window_get_window_type (2.38 KB, patch)
2010-09-23 21:55 UTC, drago01
reviewed Details | Review
Don't use mutter_window_get_window_type (2.36 KB, patch)
2010-09-24 09:54 UTC, drago01
needs-work Details | Review
[windowDimmer] handle changing of window_type (2.42 KB, patch)
2010-09-24 16:11 UTC, Maxim Ermilov
needs-work Details | Review
mutter-window: Don't track the window type twice (11.27 KB, patch)
2010-09-29 21:01 UTC, drago01
committed Details | Review
Don't use mutter_window_get_window_type / MetaCompWindowType (2.82 KB, patch)
2010-09-29 21:02 UTC, drago01
needs-work Details | Review
[windowDimmer] handle changing of window_type (3.78 KB, patch)
2010-09-29 23:55 UTC, Maxim Ermilov
committed Details | Review
Don't use mutter_window_get_window_type / MetaCompWindowType (2.81 KB, patch)
2010-09-30 06:42 UTC, drago01
committed Details | Review

Description Mathieu Bridon 2010-09-22 20:21:48 UTC
Open Xchat and connect to at least one IRC network.

Hit ctrl+q to quit, that will open a modal dialog asking for confirmation.

The modal dialog is like « attached to the title bar », which is expected, but the main window, behind, is not dimmed at all.

Also, with other applications, modal dialogs appear with a subtle animation, like they are « getting out of the title bar ». This doesn't happen with the exit confirmation in Xchat.
Comment 1 Mathieu Bridon 2010-09-22 20:23:32 UTC
By the way, this is with a current jhbuild build of gnome-shell, and xchat-2.8.8-2.fc13.x86_64
Comment 2 Maxim Ermilov 2010-09-23 13:06:29 UTC
Created attachment 170900 [details] [review]
sync window_type between MutterWindow and MetaWindow
Comment 3 Maxim Ermilov 2010-09-23 13:07:36 UTC
Created attachment 170901 [details] [review]
[windowDimmer] handle changing of window_type

dim/undim parent window when window_type changed to/from MODAL_DIALOG
Comment 4 Owen Taylor 2010-09-23 21:42:35 UTC
Review of attachment 170900 [details] [review]:

What I'd rather see is just removing window_type from MutterWindow. There's no reason for the duplication. Adel has a patch to do that written, so rejecting this patch.
Comment 5 Owen Taylor 2010-09-23 21:43:04 UTC
Review of attachment 170901 [details] [review]:

Will need rebasing once MutterWindow.window_type is removed.
Comment 6 drago01 2010-09-23 21:50:36 UTC
Created attachment 170971 [details] [review]
mutter-window: Don't track the window type twice

Currently mutter-window has its own type field, even though the same
information is already present in meta_window.
Comment 7 drago01 2010-09-23 21:53:16 UTC
Created attachment 170972 [details] [review]
Don't use mutter_window_get_window_type

It has been removed so we have to use meta_window_get_window_type() instead.
Comment 8 drago01 2010-09-23 21:55:41 UTC
Created attachment 170980 [details] [review]
Don't use mutter_window_get_window_type

It has been removed so we have to use meta_window_get_window_type() instead.

*) Remove useless blank line
Comment 9 Maxim Ermilov 2010-09-24 09:51:18 UTC
Review of attachment 170980 [details] [review]:

In my opinion, It is better to use meta_window property.
e.g. actor.meta_window.get_window_type()
Comment 10 drago01 2010-09-24 09:54:04 UTC
(In reply to comment #9)
> Review of attachment 170980 [details] [review]:
> 
> In my opinion, It is better to use meta_window property.
> e.g. actor.meta_window.get_window_type()

Makes sense.
Comment 11 drago01 2010-09-24 09:54:14 UTC
Created attachment 171011 [details] [review]
Don't use mutter_window_get_window_type

It has been removed so we have to use meta_window_get_window_type() instead.
Comment 12 Maxim Ermilov 2010-09-24 16:11:29 UTC
Created attachment 171042 [details] [review]
[windowDimmer] handle changing of window_type

(depend on 2 patches from this bug)
Comment 13 Owen Taylor 2010-09-29 19:06:21 UTC
Review of attachment 170971 [details] [review]:

::: src/compositor/mutter-window.c
@@ +556,3 @@
 {
   MutterWindowPrivate * priv = self->priv;
+  MetaCompWindowType window_type = meta_window_get_window_type (priv->window);

We should get rid of MetaCompWindowType and just use MetaWindowType, right?
Comment 14 Owen Taylor 2010-09-29 19:07:34 UTC
Review of attachment 171011 [details] [review]:

Needs adjustment for MetaCompWindowType removal as well.
Comment 15 Owen Taylor 2010-09-29 20:13:39 UTC
Review of attachment 171042 [details] [review]:

I'm OK with the approach of actor._windowType and actor._notifyWindowTypeSignalId, but in your notification function for window-type you are duplicating significant amounts of code from elsewhere in the file - needs refactoring to avoid that.

::: js/ui/windowManager.js
@@ +282,3 @@
+                if (this._shouldAnimate())
+                    this._dimParentWindow(actor, true);
+            } else if (actor._windowType == Meta.CompWindowType.MODAL_DIALOG) {

Will need updating to Meta.WindowType
Comment 16 drago01 2010-09-29 21:01:55 UTC
Created attachment 171362 [details] [review]
mutter-window: Don't track the window type twice

Currently mutter-window has its own type field, even though the same
information is already present in meta_window.

And while at it get rid of MetaCompWindowType, it is equally redundant.
Comment 17 drago01 2010-09-29 21:02:13 UTC
Created attachment 171363 [details] [review]
Don't use mutter_window_get_window_type / MetaCompWindowType

They have been removed so we have to use meta_window_get_window_type()
and MetaWindowType instead.
Comment 18 Maxim Ermilov 2010-09-29 23:55:19 UTC
Created attachment 171381 [details] [review]
[windowDimmer] handle changing of window_type
Comment 19 Maxim Ermilov 2010-09-29 23:58:26 UTC
Review of attachment 171363 [details] [review]:

::: js/ui/windowManager.js
@@ +226,3 @@
         var count = 0;
         parent.foreach_transient(function(win) {
+            if (win.meta_window.get_window_type() == Meta.WindowType.MODAL_DIALOG && win != self)

win is MetaWindow.
Comment 20 drago01 2010-09-30 06:42:52 UTC
Created attachment 171408 [details] [review]
Don't use mutter_window_get_window_type / MetaCompWindowType

They have been removed so we have to use meta_window_get_window_type()
and MetaWindowType instead.
Comment 21 Owen Taylor 2010-09-30 16:23:06 UTC
Review of attachment 171362 [details] [review]:

One minor cleanup needed, one extra space ,otherwise OK to commit.

::: src/compositor/compositor.c
@@ -153,2 @@
   else if (event->atom == meta_display_get_atom (display,
 					       META_ATOM__NET_WM_WINDOW_TYPE))

This whole if should be removed

::: src/compositor/plugins/default.c
@@ +585,3 @@
             gint end_x, gint end_y, gint end_width, gint end_height)
 {
+  MetaWindow  *meta_window = mutter_window_get_meta_window (mc_window);

extra space in 'MetaWindow  *'
Comment 22 Owen Taylor 2010-09-30 16:25:09 UTC
Review of attachment 171408 [details] [review]:

Looks fine
Comment 23 Owen Taylor 2010-09-30 16:34:47 UTC
Review of attachment 171381 [details] [review]:

::: js/ui/windowManager.js
@@ +233,3 @@
     },
 
+    _markParentWindowAsDimAble: function(actor, animate) {

Dimmable not DimAble

Other than that, looks reasonable... definitely better than the last version. I'm not sure it handles every change on the fly - e.g., it would be possible for the parent window to change on the fly - but I don't think it's worth a lot of effort to try to catch corner cases for that until/unless we hit problems.
Comment 24 drago01 2010-09-30 16:36:58 UTC
Comment on attachment 171362 [details] [review]
mutter-window: Don't track the window type twice

Attachment 171362 [details] pushed as f2ccf70 - mutter-window: Don't track the window type twice
Comment 25 drago01 2010-09-30 16:37:14 UTC
Comment on attachment 171408 [details] [review]
Don't use mutter_window_get_window_type / MetaCompWindowType

Attachment 171408 [details] pushed as 61c9068 - Don't use mutter_window_get_window_type / MetaCompWindowType