Skip to content
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

PanelWindow: send the right size to the compositor #539

Merged
merged 2 commits into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/PanelWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public class Wingpanel.PanelWindow : Gtk.Window {
if (Utils.is_wayland ()) {
// We just use our monitor because Gala makes sure we are always on the primary one
monitor_dimensions = get_display ().get_monitor_at_window (get_window ()).get_geometry ();
monitor_dimensions.width /= get_scale_factor ();
monitor_dimensions.height /= get_scale_factor ();
monitor_dimensions.x /= get_scale_factor ();
monitor_dimensions.y /= get_scale_factor ();
} else {
monitor_dimensions = get_display ().get_primary_monitor ().get_geometry ();
}
Expand Down Expand Up @@ -249,7 +253,7 @@ public class Wingpanel.PanelWindow : Gtk.Window {
desktop_panel = desktop_shell.get_panel (wl_surface);
desktop_panel.set_anchor (TOP);
desktop_panel.set_hide_mode (NEVER);
desktop_panel.set_size (-1, get_allocated_height ());
desktop_panel.set_size (-1, get_allocated_height () * get_scale_factor ());

Idle.add_once (update_panel_dimensions); // Update again since we now can be 100% sure that we are on the primary monitor
}
Expand Down
Loading