ishovkun / SierraBreeze

OSX-like window decoration for KDE Plasma written in C++
356 stars 40 forks source link

Once SSH'd a Konsole window no longer is treated correctly #36

Closed krisives closed 5 years ago

krisives commented 5 years ago

Appears it's this line of code:

https://github.com/ishovkun/SierraBreeze/blob/380ac8fbceb3523140bebce95191a5f1828f7066/breezedecoration.cpp#L360-L363 A simple workaround is removing the check for colon (:) but a more comprehensive fix might be needed to actually check window class, etc.

krisives commented 5 years ago

image

krisives commented 5 years ago

image

trmdi commented 5 years ago

@alex47 Can you please fix this?

alex47 commented 5 years ago

@trmdi I fixed it in my fork which is still waiting for merge in https://github.com/ishovkun/SierraBreeze/pull/31 We are waiting for @ishovkun to review and merge it

Pros: more flexible Konsole titlebar transparency check, should work with your ssh use case Cons: child windows of Konsole have transparent titlebars

krisives commented 5 years ago

I don't know the Kwin decoration system well enough, but is it possible to check if the window is actually a Konsole window without resorting to title bar hacks? For example the KDE Window Rules tool shows this information:

image

krisives commented 5 years ago

Appears this is the code where KDE does the "detect window" feature which shows that information above:

https://github.com/KDE/kwin/blob/1d71292e13fc820c12996d28d693d6e02c23defe/kcmkwin/kwinrules/detectwidget.cpp#L146-L175

krisives commented 5 years ago

Appears this essentially works using this code:

https://github.com/KDE/kwin/blob/a3cff85e7aec126e089a1ee7685fa1ebfd84813a/kcmkwin/kwinrules/main.cpp#L83-L87

That code uses ClientMachine but some other code uses KWindowInfo - so I am not sure which is the "correct" way. In either case they seem to be wrappers that get the window ID of the underlying system and uses that to get the window class information.

trmdi commented 5 years ago

OT: Can you @krisives share your Konsole light colorscheme (and vim color if it's available) ? It looks quite nice.

krisives commented 5 years ago

Sure! It's based on the "One Half Light" from the KDE store with some modifications to make it more readable: https://gist.github.com/krisives/fa7dcd273737f7c43996c416592919c3