mirror of
https://github.com/elementary/gala.git
synced 2024-08-17 19:10:41 +03:00
Revert "BackgroundManager: Don't position background actors" (#1814)
This commit is contained in:
parent
fa8ebfd0be
commit
fe1918dee2
@ -12,13 +12,14 @@ 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) {
|
||||
Object (wm: wm, monitor_index: monitor_index);
|
||||
public BackgroundManager (WindowManager wm, int monitor_index, bool control_position = true) {
|
||||
Object (wm: wm, monitor_index: monitor_index, control_position: control_position);
|
||||
}
|
||||
|
||||
construct {
|
||||
@ -135,6 +136,10 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
|
||||
|
||||
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);
|
||||
|
@ -41,7 +41,7 @@ namespace Gala {
|
||||
construct {
|
||||
reactive = true;
|
||||
|
||||
background = new BackgroundManager (wm, monitor);
|
||||
background = new BackgroundManager (wm, monitor, false);
|
||||
|
||||
var scale = display.get_monitor_scale (monitor);
|
||||
|
||||
|
@ -30,7 +30,8 @@ namespace Gala {
|
||||
public FramedBackground (WindowManager wm) {
|
||||
Object (
|
||||
wm: wm,
|
||||
monitor_index: wm.get_display ().get_primary_monitor ()
|
||||
monitor_index: wm.get_display ().get_primary_monitor (),
|
||||
control_position: false
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user