BackgroundManager: Don't position background actors (#1809)

This commit is contained in:
Leo 2023-12-19 04:01:56 +09:00 committed by GitHub
parent 26be385587
commit a4a3fa5bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 10 deletions

View File

@ -12,14 +12,13 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
public WindowManager wm { get; construct; }
public int monitor_index { get; construct; }
public bool control_position { get; construct; }
private BackgroundSource background_source;
private Meta.BackgroundActor background_actor;
private Meta.BackgroundActor? new_background_actor = null;
public BackgroundManager (WindowManager wm, int monitor_index, bool control_position = true) {
Object (wm: wm, monitor_index: monitor_index, control_position: control_position);
public BackgroundManager (WindowManager wm, int monitor_index) {
Object (wm: wm, monitor_index: monitor_index);
}
construct {
@ -128,10 +127,6 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
var monitor = display.get_monitor_geometry (monitor_index);
background_actor.set_size (monitor.width, monitor.height);
if (control_position) {
background_actor.set_position (monitor.x, monitor.y);
}
ulong changed_handler = 0;
changed_handler = background.changed.connect (() => {
background.disconnect (changed_handler);

View File

@ -41,7 +41,7 @@ namespace Gala {
construct {
reactive = true;
background = new BackgroundManager (wm, monitor, false);
background = new BackgroundManager (wm, monitor);
var scale = display.get_monitor_scale (monitor);

View File

@ -30,8 +30,7 @@ namespace Gala {
public FramedBackground (WindowManager wm) {
Object (
wm: wm,
monitor_index: wm.get_display ().get_primary_monitor (),
control_position: false
monitor_index: wm.get_display ().get_primary_monitor ()
);
}