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 711619 - Replace zenity "not responding" dialogue with native dialogue
Replace zenity "not responding" dialogue with native dialogue
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: 2013-11-07 14:38 UTC by Bastien Nocera
Modified: 2017-06-28 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (18.93 KB, image/png)
2013-11-08 11:05 UTC, Bastien Nocera
  Details
core: Add MetaCloseDialog (6.02 KB, patch)
2016-07-11 11:34 UTC, Carlos Garnacho
none Details | Review
core: Implement MetaCloseDialogDefault (10.43 KB, patch)
2016-07-11 11:34 UTC, Carlos Garnacho
none Details | Review
src: Add infrastructure to build marshalers (2.13 KB, patch)
2016-07-11 11:34 UTC, Carlos Garnacho
none Details | Review
core: Add MetaDisplay:create-close-dialog signal/vmethod (4.46 KB, patch)
2016-07-11 11:34 UTC, Carlos Garnacho
none Details | Review
core: Replace close dialog implementation with MetaCloseDialog (6.30 KB, patch)
2016-07-11 11:34 UTC, Carlos Garnacho
none Details | Review
core: Add MetaCloseDialog (6.62 KB, patch)
2017-01-19 20:16 UTC, Carlos Garnacho
none Details | Review
core: Implement MetaCloseDialogDefault (10.43 KB, patch)
2017-01-19 20:16 UTC, Carlos Garnacho
none Details | Review
src: Add infrastructure to build marshalers (2.13 KB, patch)
2017-01-19 20:17 UTC, Carlos Garnacho
none Details | Review
core: Add MetaDisplay:create-close-dialog signal/vmethod (4.49 KB, patch)
2017-01-19 20:17 UTC, Carlos Garnacho
none Details | Review
core: Replace close dialog implementation with MetaCloseDialog (6.13 KB, patch)
2017-01-19 20:17 UTC, Carlos Garnacho
none Details | Review
core: Add MetaCloseDialog (6.52 KB, patch)
2017-01-26 19:11 UTC, Carlos Garnacho
committed Details | Review
core: Implement MetaCloseDialogDefault (10.44 KB, patch)
2017-01-26 19:11 UTC, Carlos Garnacho
committed Details | Review
compositor: Expose MetaPlugin vmethod to create a MetaCloseDialog (4.29 KB, patch)
2017-01-26 19:11 UTC, Carlos Garnacho
committed Details | Review
core: Replace close dialog implementation with MetaCloseDialog (6.45 KB, patch)
2017-01-26 19:11 UTC, Carlos Garnacho
committed Details | Review

Description Bastien Nocera 2013-11-07 14:38:19 UTC
Instead of spawning a pretty bad looking zenity dialogue when an application is not responding, we could overlay the window with something of similar purpose. It would look better, and like a native gnome-shell dialogue, rather than something bolted on.
Comment 1 Matthias Clasen 2013-11-07 14:40:56 UTC
Also, it would be good to log instances of 'not responding' to the journal with enough data to identify the app
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-11-07 17:39:38 UTC
Design is needed for this. I think a gnome-shell-style dialog is wrong, and we can't pop up a GTK+ dialog in mutter itself, which is why we fork out to zenity.
Comment 3 Allan Day 2013-11-08 08:27:33 UTC
As much as possible, we should make apps look and behave like they are self-contained functional units. I would say that my preference would be to make the app fail state look like it belongs to the app itself, rather than the system.
Comment 4 Milan Bouchet-Valat 2013-11-08 08:48:37 UTC
(In reply to comment #3)
> As much as possible, we should make apps look and behave like they are
> self-contained functional units. I would say that my preference would be to
> make the app fail state look like it belongs to the app itself, rather than the
> system.
Yeah, this is mostly what happens now with the Zenity dialog. Maybe it should simply get its appearance improved a bit? Bastien, why do you find it so ugly? :-)
Comment 5 Bastien Nocera 2013-11-08 11:05:30 UTC
Created attachment 259247 [details]
screenshot

This doesn't look one bit good. Spacing is busted, it's using the window title instead of the application name. And mutter requiring 5 megs of dependency when it could package a 10kB helper...
Comment 6 Jakub Steiner 2014-04-25 13:12:57 UTC
Just cleaning up the dialog, keeping the same approach:

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/00patterns/not-responding/not-responding.png

When discussing this with allan, he made a good point about communicating the 'system' nature of the action/termination. However, a simple system modal would not be appropriate due to its workflow-interrupting nature. We'd need to figure out a more involved solution to indicate app misbehaving and the OS wanting to deal with it.
Comment 7 Florian Müllner 2014-04-25 13:22:14 UTC
(In reply to comment #6)
> When discussing this with allan, he made a good point about communicating the
> 'system' nature of the action/termination. However, a simple system modal would
> not be appropriate

I don't think anyone was suggesting that - we'd obviously need to introduce "window/app modal dialogs"
Comment 8 Bastien Nocera 2014-06-03 16:18:59 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > When discussing this with allan, he made a good point about communicating the
> > 'system' nature of the action/termination. However, a simple system modal would
> > not be appropriate
> 
> I don't think anyone was suggesting that - we'd obviously need to introduce
> "window/app modal dialogs"

Yes, I wasn't suggesting to change the level of modality of the dialog. It pertains to an application/window, so I would expect the new dialog to stay at that level, and not block anything but the application itself.

MacOS X uses the infamous beachball for blocked applications, not a dialogue.
Comment 9 Carlos Garnacho 2016-07-11 11:29:31 UTC
I've been looking into this during the weekend. The gnome-shell patches are still kinda wip so I'm only attaching the mutter patches at the moment.

As for the gnome-shell implementation, do we generally want the same UI on window-modal than on desktop-modal dialogs? (except the "spotlight" effect of course). I wonder how much can be detached/reused from js/ui/modalDialog.js
Comment 10 Carlos Garnacho 2016-07-11 11:34:10 UTC
Created attachment 331205 [details] [review]
core: Add MetaCloseDialog

This is an interface that can be used to implement the "application
is not responding" dialog. One instance is created per window, which
is initially hidden, and can be shown/hidden on demand.
Comment 11 Carlos Garnacho 2016-07-11 11:34:16 UTC
Created attachment 331206 [details] [review]
core: Implement MetaCloseDialogDefault

This is basically a copy of the implementation currently residing
in src/core/delete.c, which will be eventually deleted in favor
of this one.
Comment 12 Carlos Garnacho 2016-07-11 11:34:22 UTC
Created attachment 331207 [details] [review]
src: Add infrastructure to build marshalers

The only marshaler currently in the list is meant for
MetaDisplay:create-close-dialog, which has a signature not covered
by the glib marshalers.
Comment 13 Carlos Garnacho 2016-07-11 11:34:28 UTC
Created attachment 331208 [details] [review]
core: Add MetaDisplay:create-close-dialog signal/vmethod

The default behavior of this vmethod is returning a MetaCloseDialogDefault
implementing the good ol' zenity dialog. This can be overriden though
in order implement the close dialog otherwise.
Comment 14 Carlos Garnacho 2016-07-11 11:34:34 UTC
Created attachment 331209 [details] [review]
core: Replace close dialog implementation with MetaCloseDialog

src/core/delete.c now entirely relies on MetaCloseDialog in order
to handle the "Application is not responding" dialog.
Comment 15 Allan Day 2016-07-11 11:37:54 UTC
There's some discussion about styling in bug 762083 ...
Comment 16 Carlos Garnacho 2017-01-19 20:16:45 UTC
Created attachment 343834 [details] [review]
core: Add MetaCloseDialog

This is an interface that can be used to implement the "application
is not responding" dialog. One instance is created per window, which
is initially hidden, and can be shown/hidden on demand.
Comment 17 Carlos Garnacho 2017-01-19 20:16:53 UTC
Created attachment 343835 [details] [review]
core: Implement MetaCloseDialogDefault

This is basically a copy of the implementation currently residing
in src/core/delete.c, which will be eventually deleted in favor
of this one.
Comment 18 Carlos Garnacho 2017-01-19 20:17:02 UTC
Created attachment 343836 [details] [review]
src: Add infrastructure to build marshalers

The only marshaler currently in the list is meant for
MetaDisplay:create-close-dialog, which has a signature not covered
by the glib marshalers.
Comment 19 Carlos Garnacho 2017-01-19 20:17:09 UTC
Created attachment 343837 [details] [review]
core: Add MetaDisplay:create-close-dialog signal/vmethod

The default behavior of this vmethod is returning a MetaCloseDialogDefault
implementing the good ol' zenity dialog. This can be overriden though
in order implement the close dialog otherwise.
Comment 20 Carlos Garnacho 2017-01-19 20:17:17 UTC
Created attachment 343838 [details] [review]
core: Replace close dialog implementation with MetaCloseDialog

src/core/delete.c now entirely relies on MetaCloseDialog in order
to handle the "Application is not responding" dialog.
Comment 21 Jonas Ådahl 2017-01-25 02:36:49 UTC
Review of attachment 343834 [details] [review]:

::: src/meta/meta-close-dialog.h
@@ +36,3 @@
+{
+  META_CLOSE_DIALOG_RESPONSE_WAIT,
+  META_CLOSE_DIALOG_RESPONSE_CLOSE,

nit: FORCE_CLOSE? (not that it matters much)

@@ +39,3 @@
+} MetaCloseDialogResponse;
+
+struct _MetaCloseDialogInterface {

nit: { on its own line

@@ +46,3 @@
+
+  void (* response) (MetaCloseDialog         *dialog,
+                     MetaCloseDialogResponse  response);

Doesn't seem to be used.
Comment 22 Jonas Ådahl 2017-01-25 02:46:47 UTC
Review of attachment 343836 [details] [review]:

I'm not very familiar with marshalers etc, but can't find anything standing out; except that splinter review shows the meta-marshalers.list as empty, but seems to be non-empty when opening the actual patch.
Comment 23 Jonas Ådahl 2017-01-25 02:49:48 UTC
Review of attachment 343837 [details] [review]:

::: src/core/display.c
@@ +423,3 @@
+                  _meta_marshal_OBJECT__OBJECT,
+                  META_TYPE_CLOSE_DIALOG,
+                  1, META_TYPE_WINDOW);

Shouldn't we rather put this in meta-plugin.h? Seems a bit obscure to semi-hide this in a MetaDisplay signal.
Comment 24 Jonas Ådahl 2017-01-25 02:52:19 UTC
Review of attachment 343838 [details] [review]:

Looks good to me.
Comment 25 Carlos Garnacho 2017-01-26 19:11:03 UTC
Created attachment 344346 [details] [review]
core: Add MetaCloseDialog

This is an interface that can be used to implement the "application
is not responding" dialog. One instance is created per window, which
is initially hidden, and can be shown/hidden on demand.
Comment 26 Carlos Garnacho 2017-01-26 19:11:15 UTC
Created attachment 344348 [details] [review]
core: Implement MetaCloseDialogDefault

This is basically a copy of the implementation currently residing
in src/core/delete.c, which will be eventually deleted in favor
of this one.
Comment 27 Carlos Garnacho 2017-01-26 19:11:31 UTC
Created attachment 344349 [details] [review]
compositor: Expose MetaPlugin vmethod to create a MetaCloseDialog

So the actual close dialog can be overridden by MetaPlugin implementations.
Comment 28 Carlos Garnacho 2017-01-26 19:11:42 UTC
Created attachment 344350 [details] [review]
core: Replace close dialog implementation with MetaCloseDialog

src/core/delete.c now entirely relies on MetaCloseDialog in order
to handle the "Application is not responding" dialog.
Comment 29 Jonas Ådahl 2017-05-03 06:13:58 UTC
Review of attachment 344346 [details] [review]:

Looks good. Just a nit.

::: src/meta/meta-close-dialog.h
@@ +28,3 @@
+#define META_TYPE_CLOSE_DIALOG (meta_close_dialog_get_type ())
+
+typedef struct _MetaCloseDialog MetaCloseDialog;

Not needed.
Comment 30 Jonas Ådahl 2017-05-03 06:16:05 UTC
Review of attachment 344348 [details] [review]:

lgtm.
Comment 31 Jonas Ådahl 2017-05-03 06:17:41 UTC
Review of attachment 344349 [details] [review]:

coding style nits, but otherwise lgtm.

::: src/compositor/meta-plugin-manager.c
@@ +381,3 @@
+MetaCloseDialog *
+meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
+                                         MetaWindow *window)

nit: coding style

::: src/compositor/meta-plugin-manager.h
@@ +93,3 @@
 
+MetaCloseDialog * meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
+                                                           MetaWindow *window);

nit: coding style
Comment 32 Jonas Ådahl 2017-05-03 06:22:46 UTC
Review of attachment 344350 [details] [review]:

style nit, otherwise lgtm.

::: src/core/delete.c
@@ +60,3 @@
 {
+  if (is_alive && window->close_dialog)
+    meta_close_dialog_hide (window->close_dialog);

style nit: all or none branches with {}
Comment 33 Carlos Garnacho 2017-05-15 13:13:20 UTC
Thanks for the review! Fixed those nits and pushed to master. The gnome-shell follow-up will happen on bug #762083.

Attachment 344346 [details] pushed as b47de58 - core: Add MetaCloseDialog
Attachment 344348 [details] pushed as 020e0bb - core: Implement MetaCloseDialogDefault
Attachment 344349 [details] pushed as 68a9675 - compositor: Expose MetaPlugin vmethod to create a MetaCloseDialog
Attachment 344350 [details] pushed as fe5138d - core: Replace close dialog implementation with MetaCloseDialog