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 636522 - breaks when main window is closed via window manager keyboard shortcut
breaks when main window is closed via window manager keyboard shortcut
Status: RESOLVED FIXED
Product: the-board
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: The-Board Maintainers
The-Board Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-05 16:06 UTC by Antonio Terceiro
Modified: 2010-12-06 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch fixing this bug (1.15 KB, patch)
2010-12-05 16:06 UTC, Antonio Terceiro
needs-work Details | Review
avoid destroying window when closing through window manager (1.23 KB, patch)
2010-12-06 01:21 UTC, Antonio Terceiro
committed Details | Review

Description Antonio Terceiro 2010-12-05 16:06:20 UTC
Created attachment 175880 [details] [review]
patch fixing this bug

After I close The Board's window with my window manager's keyboard shortcut, when I click the notification area icon the window comes back all gray, as if it is not rendering anymore. Turns out that the delete event must handled as to not let gtk destroy the window, and hide it instead, which is the current behaviour of pressing ESC.

The attached patch fixes the problem.
Comment 1 Lucas Rocha 2010-12-05 17:45:10 UTC
Review of attachment 175880 [details] [review]:

::: src/js/ui/mainWindow.js
@@ +96,3 @@
+
+        this._gtkWindow.connect("delete-event",
+                                Lang.bind(this, this._hideGtkWindow));

I'd prefer a separate onWindowDeleteEvent callback. This way you don't have to add the hacky boolean return on hideGtkWindow.
Comment 2 Lucas Rocha 2010-12-05 17:46:07 UTC
The onGtkWindowDeleteEvent would obviously call hideGtkWindow.
Comment 3 Antonio Terceiro 2010-12-06 01:21:07 UTC
Created attachment 175896 [details] [review]
avoid destroying window when closing through window manager

patch reworked as per Lucas' suggestion
Comment 4 Lucas Rocha 2010-12-06 15:15:22 UTC
Pushed to master (582d1d8b3a74bdc10e83f4adbfb5919b0a7bde52), thanks!