Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.41k stars 576 forks source link

Force transparency on #1523

Closed SoniEx2 closed 5 years ago

SoniEx2 commented 5 years ago

Guake version 3.4.0 and 3.5.0

Due to the way stuff works and stuff, Guake can sometimes start up before my composite manager, which is not part of my WM. As such, it gets stuck without transparency. I'd like the ability to force transparency to be used even when it's not detected so this issue doesn't happen.

psychon commented 5 years ago

I'd rather suggest that Guake reacts to a compositor starting up.

Namely, instead of just checking during startup: https://github.com/Guake/guake/blob/e72dacf45e83a0641e587bd038235fa229e14854/guake/guake_app.py#L205-L211 ..you should handle the composited-changed signal of the GdkScreen: https://developer.gnome.org/gdk3/stable/GdkScreen.html#GdkScreen-composited-changed (although that required to re-realise the window: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-visual)

gsemet commented 5 years ago

I would accept PR on that :)

mlouielu commented 5 years ago

@SoniEx2 @psychon Hi there, can you give me the way to reproduce "composited-changed" (or as @SoniEx2 said, start Guake before composite manager in WM)?

Thanks.

SoniEx2 commented 5 years ago

use ArchLinux, no DE, no DM, just startx + awesomewm + compton.

start compton using awesome.

psychon commented 5 years ago

I would say/guess: Just start an X11 session without a compositor. Then start a compositor in some terminal. Since there is now a compositor, we go from "no compositor" to "some compositor". That should fire the composited-changed signal. Similarly, kill the compositor running in the terminal and now the signal should fire for the change in the other direction.

The use case of @SoniEx2 is similar, but relies on compton starting slower than or after Guake.

mlouielu commented 5 years ago

Thanks @SoniEx2 @psychon for your help, I've submitted the PR #1597 to fix this issue.

It is worth to mention how one could much easy to do this reproduce:

  1. Start LXDE (w/o compositor), then start xcompmgr or compton in terminal. (most easiest way)
  2. Start Xephyr, then start xcompmgr inside it.

    • $ Xephyr :2 -resizable
    • $ DISPLAY=:2 make run # run Guake inside Xephyr
    • $ xcompmgr # inside Xephyr