phw / peek

Simple animated GIF screen recorder with an easy to use interface
GNU General Public License v3.0
10.25k stars 319 forks source link

Close button on the wrong left side with Peek Flatpak on Fedora 27 #266

Open orschiro opened 6 years ago

orschiro commented 6 years ago

Not really an issue but just curious. I installed both Peek and Gradio from Flatpak. Gradio uses this default Flatpak design which nicely integrates into Adwaita Fedora. Peek, however, uses a dark design and the close button on the left.

Is that a design choice done on purpose? :-)

screenshot from 2018-01-25 17-18-20

phw commented 6 years ago

Using the dark theme is intentional. Peek uses the dark variant if the theme provides one (and Adwaita does). For me this matches better with Peek being a kind of frame you move around atop other windows. But if you don't like this behavior you can change it with dconf:

dconf write /com/uploadedlobster/peek/interface-prefer-dark-theme false

The close button is strange, that should actually only happen if you have configured the window buttons accordingly. Can you give me the output of

dconf read /org/gnome/desktop/wm/preferences/button-layout

And also please run Peek with:

G_MESSAGES_DEBUG=all flatpak run com.uploadedlobster.peek

Among other output there should be a line like the following:

** (peek:3): DEBUG: application-window.vala:824: Decoration layout: menu:minimize,close

The string menu:minimize,close is the decoration layout. It should actually match the output of the above dconf query if you are on GNOME. If close is on the left of the colon that means the close button gets placed on the left side, and GTK applications usually honor that unless they override it.

What OS is this, Fedora or Ubuntu? Do you have other desktop environments installed that could interfere here?

orschiro commented 6 years ago

Hey @phw

Thanks for your explanation!

But if you don't like this behavior you can change it with dconf:

Works! :-)

Can you give me the output of

It's empty...

[orschiro@localhost ~]$ dconf read /org/gnome/desktop/wm/preferences/button-layout
[orschiro@localhost ~]$ 

And also please run Peek with:

[orschiro@localhost ~]$ G_MESSAGES_DEBUG=all flatpak run com.uploadedlobster.peek
** (peek:2): DEBUG: desktop-integration.vala:168: Desktop: GNOME
** (peek:2): DEBUG: application.vala:286: GTK theme: Adwaita
** (peek:2): DEBUG: desktop-integration.vala:168: Desktop: GNOME
** (peek:2): DEBUG: application.vala:341: Decoration layout: close:menu,maximize
** (peek:2): DEBUG: desktop-integration.vala:168: Desktop: GNOME
** (peek:2): DEBUG: application.vala:42: Loading local settings failed: Failed to open file “./data/gschemas.compiled”: open() failed: No such file or directory
** (peek:2): DEBUG: application.vala:221: Changed keybinding_toggle_recording  => <Ctrl><Alt>R
** (peek:2): DEBUG: desktop-integration.vala:168: Desktop: GNOME
Using screen recorder backend gnome-shell
** (peek:2): DEBUG: application-window.vala:818: Decoration layout: close:menu,maximize

Hmm. So mine is different.

What OS is this, Fedora or Ubuntu? Do you have other desktop environments installed that could interfere here?

Currently with default Fedora 27. But I used the same home folder with LM 18.3 Cinnamon and eOS Loki in the past. Maybe that's why?

phw commented 6 years ago

Currently with default Fedora 27. But I used the same home folder with LM 18.3 Cinnamon and eOS Loki in the past. Maybe that's why?

Yes, probably. That /org/gnome/desktop/wm/preferences/button-layout is empty indicates that this is loaded from somewhere else, but I don't know from where. I will try to find out.

orschiro commented 6 years ago

but I don't know from where. I will try to find out.

Awesome, thanks! Let me know if I can help somehow...

phw commented 6 years ago

Ok, it is unusual that this setting is not configured in /org/gnome/desktop/wm/preferences/button-layout, but it might also be in dconf read /org/gnome/shell/extensions/classic-overrides/button-layout if you used the classic session once.

It can also be configured in the files $HOME/.config/gtk-3.0/settings.ini or /etc/gtk-3.0/settings.ini. Do you have those files and what's their content?

Somehwere this is set to close:menu,maximize for you, if you find the location you could either remove (and use the default) it or change it to something like menu:maximize,close.

orschiro commented 6 years ago

Here we go:

[orschiro@localhost ~]$ dconf read /org/gnome/shell/extensions/classic-overrides/button-layout
[orschiro@localhost ~]$ 

Empty....not using the classic mode.

Config files:

[orschiro@localhost ~]$ cat $HOME/.config/gtk-3.0/settings.ini
[Settings]
gtk-font-name=Noto Sans 10
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
[orschiro@localhost ~]$ cat /etc/gtk-3.0/settings.ini
cat: /etc/gtk-3.0/settings.ini: No such file or directory

Somehwere this is set to close:menu,maximize for you, if you find the location you could either remove (and use the default) it or change it to something like menu:maximize,close.

Hmm ok. Let's see if I can find it..

ghost commented 6 years ago

Popping in to note that I too have the close button on the left side window. (You're not alone!) F27 (GNOME) After reading through the comments, I checked my gsettings and they're not showing anything under the mentioned categories. I don't have a shared home folder though.

phw commented 6 years ago

@Schyken Can you also check what the output of running peek with G_MESSAGES_DEBUG=all is?

Did you also install with Flatpak or otherwise?

For Flatpak run:

G_MESSAGES_DEBUG=all flatpak run com.uploadedlobster.peek

For a normal install just:

G_MESSAGES_DEBUG=all peek