Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot close About window on i3/xmonad window managers #1750

Closed
1 task done
Strubbl opened this issue Nov 9, 2017 · 11 comments
Closed
1 task done

Cannot close About window on i3/xmonad window managers #1750

Strubbl opened this issue Nov 9, 2017 · 11 comments

Comments

@Strubbl
Copy link

Strubbl commented Nov 9, 2017

  • I have searched open and closed issues for duplicates

Bug description

When i open the about window, i cannot close it anymore. Only closing via quitting signal desktop app is possible.

Steps to reproduce

  • open signal desktop
  • open about box via "Help -> About"
  • about window is present and cannot be closed

Actual result: about window cannot be closed
Expected result: click anywhere in the about window to close it or via pressing key ESC

Screenshots

2017-11-09-230314_6400x2160_scrot

Platform info

Operating System: Archlinux with window manager i3wm
Browser: -

Signal version: v1.0.37

Link to debug log

@scottnonnenberg
Copy link
Contributor

Can you post a screenshot of your primary application window? What affordances does it have for closing/minimizing/etc.?

@Strubbl
Copy link
Author

Strubbl commented Nov 9, 2017

It has nothing of it (closing/minimizing/etc.). That is a feature of window managers like i3 or xmonad.

My primary app window looks similar to the about window screen shot i posted. Only difference is that it has a menu bar.
Taking a screenshot is possible, but i need to censor contactlist. That could take a while because i have to figure out how to do that properly.

@scottnonnenberg
Copy link
Contributor

No need to censor. Don't worry about it. Just take a screenshot of how windows are supposed to be closable via the chrome in i3/xmonad.

@Strubbl
Copy link
Author

Strubbl commented Nov 9, 2017

I need to censor it to not expose my contacts.

If the popup window itself does not provide a method to close it, there is no way to close it. Applications can be closed via menu bar (File->quit) or via key combo ctrl+q. In browsers like Chrome or Firefox tabs can be closed via the small x or via key combo ctrl+w.
The about box from Firefox can be close via ESC key.

I am preparing a screenshot. That is going to take a moment.

@scottnonnenberg scottnonnenberg changed the title Cannot close About window Cannot close About window on i3/xmonad window managers Nov 9, 2017
@Strubbl
Copy link
Author

Strubbl commented Nov 9, 2017

Gimp helped me. Btw. Gimp about box can be closed via an extra button being placed in the box or via ESC key press.

signal

@scottnonnenberg
Copy link
Contributor

Thanks. All I really needed was the top bar. Indeed, no close button! Interesting!

@ixjlyons
Copy link

Just to give a bit more context here, i3 and xmonad are tiling window managers, where one of the key ideas is that users control windows using the keyboard. These window managers typically have minimal to no window decorations and don't have/need the typical minimize/maximize/close buttons. signal-desktop's about dialog can still be closed with the usual window manager keybinding (e.g. for i3, $mod+shift+q), but it seems common for applications to have a separate close or ok button at the bottom of the dialog (as noted above: firefox, gimp, etc.). I can't actually find another application that doesn't have one.

@He-Ro
Copy link

He-Ro commented Nov 20, 2017

Hello, chiming in as a longterm i3 user. As @ixjlyons is explaining in his last comment, it is normal, that there do not exist close / minimize / maximize buttons in the top bar. It is one of the features of i3 (and other tilting window managers) that one uses the mouse less and keyboard shortcuts more, e.g. for closing a window. This keyboard shortcut works on the the main window and also on the about page, but other applications look different:
Gimp:
screenshot-selection-2017-11-20-07 53 16

Inkscape:
screenshot-selection-2017-11-20-07 53 51

They have dedicated close buttons. But even more interesting is the fact, that those windows are floating by default (which means they appear in front of other windows, which in i3 is only used for splash screens or dialog / popup windows). Compare these two screenshots where I opened the about page in Signal and Gimp:
Gimp:
screenshot-2017-11-20-08 04 41

Signal:
screenshot-2017-11-20-08 05 15

This is because Gimp sets a Window Property, specifically _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_DIALOG, see https://specifications.freedesktop.org/wm-spec/1.4/ar01s05.html. The Signal About window has this set to _NET_WM_WINDOW_TYPE_NORMAL.
I think that this should be considered changing, in addition to adding a close button.
Edit:
Those dialog windows can be closed in i3 by pressing the Escape key, so this does not need to be implemented by Signal, if the About page is changed to a dialog window.

@He-Ro
Copy link

He-Ro commented Nov 20, 2017

With the following diff, the dialog property is set, see https://electronjs.org/docs/api/browser-window#parent-and-child-windows:

diff --git a/main.js b/main.js
index 3c5ae37a..33ed5469 100644
--- a/main.js
+++ b/main.js
@@ -249,7 +249,8 @@ function showAbout() {
     webPreferences: {
       nodeIntegration: false,
       preload: path.join(__dirname, 'preload.js')
-    }
+    },
+    parent: mainWindow
   };
 
   aboutWindow = new BrowserWindow(options);

And it looks like this after clicking the About button:
screenshot-2017-11-20-09 43 40

But contrary to my previous understanding the Escape key does not close the window, so it should be considered to add a close button and/or handle the Escape key.

@scottnonnenberg
Copy link
Contributor

Thanks for the investigation, everyone. We'll get this fixed soon.

@scottnonnenberg
Copy link
Contributor

v1.0.39 is released and you can use the escape key to close the About window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants