-
Notifications
You must be signed in to change notification settings - Fork 30
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
Open layer shell surfaces on wayland #66
base: master
Are you sure you want to change the base?
Conversation
win->handle = adw_window_title_new(_("Clickable"), NULL); | ||
adw_header_bar_set_title_widget(ADW_HEADER_BAR(win->header_bar), | ||
win->handle); | ||
gtk_box_append(GTK_BOX(win->box), win->header_bar); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally have no opinion about layer shell if it don't break other things, but if you insist to make myself unable to move my window, I cannot accept that. I am a GNOME lover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem I can add it back but only when is a floating window because it doesn't work when it is a layer.
Sorry for removing that, i was kinda desperate to make this work properly on hyprland (make the window not tile and be automatically positioned at the bottom) so probably have somethings to fix.
It seems that your editor is doing auto format for the UI file and makes a lot of unrelated changes, I think it's better not to change that file if it is unrelated to this PR. Thanks. |
GtkWindow* gtk_window = GTK_WINDOW(win); | ||
// Create a layer shell surface instead of a normal floating window | ||
gtk_layer_init_for_window(gtk_window); | ||
// Make the layer appear on top of normal windows | ||
gtk_layer_set_layer(gtk_window, GTK_LAYER_SHELL_LAYER_TOP); | ||
gtk_layer_set_anchor(gtk_window, GTK_LAYER_SHELL_EDGE_BOTTOM, true); | ||
gtk_layer_set_anchor(gtk_window, GTK_LAYER_SHELL_EDGE_RIGHT, true); | ||
gtk_layer_set_anchor(gtk_window, GTK_LAYER_SHELL_EDGE_LEFT, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this break desktops without layer shell? If the library don't check by itself, we may need to check here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it falls back to a floating window but i haven't checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it has a gtk_layer_is_supported()
function though so it's easy to check
I think we could make gtk4-layer-shell an optional dependency, for distros that does not have this library, but that could be done later. |
Probably we could make this an option? Because you already have a settings window so it's easy to just slap some options there for enabling layer shell surfaces, setting the anchors and margins |
I think compiling time checking is enough. |
Do you still have time to update this? I wish you could first split UI changes out of this PR, and then I could merge and update it. |
See issue #65 for more details
Closes #65