cassidyjames / ideogram

Insert emoji anywhere in elementary OS, even in non-native apps
https://cassidyjames.com
GNU General Public License v3.0
92 stars 19 forks source link

Fake window is visible when GTK_CSD isn't set #26

Closed worldofpeace closed 5 years ago

worldofpeace commented 5 years ago

I've attempted to package this application for NixOS and when I launch it the application appears like this:

Screenshot from 2019-08-04 07 32 19

Un-captured in this screenshot are the window decorations.

Is this expected? I was under the impression this was going to appear in the same concept as

cassidyjames commented 5 years ago

This probably depends on the window manager and its version… I have only tested Ideogram on elementary OS. The Shortcut Overlay is not drawing a fake window or anything, it’s just a dialog-styled window. But I need to draw a fake window to give the popover somewhere to go, because GTK does not support showing popovers outside of windows. I'm not sure why the styling to hide the window is not working on NixOS.

worldofpeace commented 5 years ago

This probably depends on the window manager and its version…

I maintain Pantheon in nixpkgs and this was observed within it. Window manager is Gala 0.3.1.

The Shortcut Overlay is not drawing a fake window or anything, it’s just a dialog-styled window. But I need to draw a fake window to give the popover somewhere to go, because GTK does not support showing popovers outside of windows.

I see how that is needed here specifically. Thanks for explaining.

I'm not sure why the styling to hide the window is not working on NixOS.

Can you link to where the actual styling is happening within the source?

cassidyjames commented 5 years ago

Styling:

https://github.com/cassidyjames/ideogram/blob/master/data/Application.css

What version of Mutter are you building against? Do other windows (specifically: actual dialogs) show a titlebar when they shouldn't? If I recall correctly, there's a specific environment variable set in elementary OS for GTK that changes how titlebars work.

Oh also, what version of GTK are you using?

worldofpeace commented 5 years ago

GTK3: 3.24.10 GLib: 2.60.4 Mutter: 3.28.4 with backported patches GSD: 3.30.2

nixpkgs on master currently has GNOME 3.32, and we've kept around older versions of mutter and patched gnome-settings-daemon to support Pantheon (ubuntu and pantheon's patches).

Do other windows (specifically: actual dialogs) show a titlebar when they shouldn't? If I recall correctly, there's a specific environment variable set in elementary OS for GTK that changes how titlebars work.

I recall this discussion also and believed it wasn't an issue we were having. Think it was https://github.com/elementary/default-settings/blob/master/profile.d/gtk-csd.sh.

And after running the executable with GTK_CSD=1 com.github.cassidyjames.ideogram this window appears appropriately :fireworks:

Is it possible you can have the application set this environment variable until that gets worked out in gtk?

cassidyjames commented 5 years ago

I can add that to the .desktop file, maybe. I'll take a look.