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 595382 - [main] Better handle pushModal failing
[main] Better handle pushModal failing
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-16 15:39 UTC by Colin Walters
Modified: 2009-09-17 20:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[main] Better handle pushModal failing (1.63 KB, patch)
2009-09-16 15:39 UTC, Colin Walters
accepted-commit_now Details | Review
Better handle pushModal failing (3.23 KB, patch)
2009-09-17 18:07 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2009-09-16 15:39:34 UTC
Previously we'd leave the focus on the stack, etc.
Comment 1 Colin Walters 2009-09-16 15:39:40 UTC
Created attachment 143279 [details] [review]
[main] Better handle pushModal failing
Comment 2 Dan Winship 2009-09-16 17:41:31 UTC
Comment on attachment 143279 [details] [review]
[main] Better handle pushModal failing

sure, though there's still the problem that no one looks at the return value.
Comment 3 Owen Taylor 2009-09-16 17:56:41 UTC
Review of attachment 143279 [details] [review]:

Looks fine, one style comment.

::: js/ui/main.js
@@ +212,3 @@
     let timestamp = global.screen.get_display().get_current_time();
 
+    if (modalCount == 0 && !global.begin_modal(timestamp)) {

I'm not fan of the short-circuiting logic here too shell-like - I'd rather see:

 if (modalCount == 0) {
     if (!global.begin_modal(timestamp)) {
         ..
     }
 }
Comment 4 Owen Taylor 2009-09-16 17:58:34 UTC
Oh, and what Dan says too .. the callers need to check - it *can* happen - e.g., if anybody on the desktop does XGrabPointer() without grabbing the keyboard, then the overview key will trigger this problem.
Comment 5 Colin Walters 2009-09-17 18:07:03 UTC
Created attachment 143393 [details] [review]
Better handle pushModal failing

Previously we'd leave the focus on the stack, etc.
Comment 6 Owen Taylor 2009-09-17 19:07:18 UTC
Review of attachment 143393 [details] [review]:

Looks good to me
Comment 7 Owen Taylor 2009-09-17 20:40:07 UTC
Attachment 143393 [details] pushed as cee7106 - Better handle pushModal failing