-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Feature to hide native titlebar for maximized/tiled windows #964
Comments
I read the code and found that the feature is there, but it doesn't work.
Looks like the problem is here: material-shell/src/utils/windows.ts Lines 23 to 47 in 89f460b
I changed the code to this.. export const setTitleBarVisibility = function (
metaWindow: MetaWindowWithMsProperties,
visible: boolean
) {
const windowXID = getWindowXID(metaWindow);
if (!windowXID || metaWindow.is_client_decorated()) // 1
return;
try {
Util.trySpawn([
'xprop',
'-id',
windowXID,
'-f',
'_MOTIF_WM_HINTS',
'32c',
'-set',
'_MOTIF_WM_HINTS',
`2, 0, ${visible ? '1' : '0'} 0, 0`, // 2
]);
} catch (e) {
Me.logFocus('xprop', e);
}
metaWindow.titleBarVisible = visible;
}; ..and it looks like everything is working, but I haven't tested it very well, so there may be some unknown issues with this code. |
I started seeing the same issue after upgrading to GNOME 44 |
Your fix seems solved the problem for now. diff --git a/src/utils/windows.ts b/src/utils/windows.ts
index 2787b37..23f8efb 100644
--- a/src/utils/windows.ts
+++ b/src/utils/windows.ts
@@ -25,7 +25,8 @@ export const setTitleBarVisibility = function (
visible: boolean
) {
const windowXID = getWindowXID(metaWindow);
- if (!windowXID || metaWindow.is_client_decorated() || !metaWindow.decorated)
+ if (!windowXID || metaWindow.is_client_decorated())
+ // 1
return;
try {
Util.trySpawn([
@@ -37,7 +38,7 @@ export const setTitleBarVisibility = function (
'32c',
'-set',
'_MOTIF_WM_HINTS',
- `2, 0, ${visible ? '1' : '2'} 0, 0`,
+ `2, 0, ${visible ? '1' : '0'} 0, 0`, // 2
]);
} catch (e) {
Me.logFocus('xprop', e);
|
Issue not present on GNOME 42.5 to 42.9. |
Hey guys ! Thanks for waiting ! I made a PR to fix this #977 |
Is your feature request related to a problem? Please describe.
The title bar is useless when the window is maximized or tiled.
I found out that in #68 people say this feature is present, but it's not
I don't know, is this a bug or has this feature been removed?
Describe the solution you'd like
Describe alternatives you've considered
There is an extension GTK Title Bar that does just that, but unfortunately it doesn't work when the window is tiled by Material Shell, and it doesn't support gnome 44.
The text was updated successfully, but these errors were encountered: