mirror of
https://github.com/elementary/gala.git
synced 2024-08-16 18:40:27 +03:00
Merge branch 'master' into danirabbit/windowswitcher-a11y
This commit is contained in:
commit
3883ae9629
@ -69,6 +69,8 @@ public class Gala.Drawing.Canvas : GLib.Object, Clutter.Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void invalidate () {
|
public void invalidate () {
|
||||||
|
bitmap = null;
|
||||||
|
|
||||||
if (width <= 0 || height <= 0) {
|
if (width <= 0 || height <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -217,6 +217,7 @@ namespace Gala {
|
|||||||
|
|
||||||
ui_group = new Clutter.Actor ();
|
ui_group = new Clutter.Actor ();
|
||||||
ui_group.reactive = true;
|
ui_group.reactive = true;
|
||||||
|
update_ui_group_size ();
|
||||||
stage.add_child (ui_group);
|
stage.add_child (ui_group);
|
||||||
|
|
||||||
window_group = display.get_window_group ();
|
window_group = display.get_window_group ();
|
||||||
@ -380,6 +381,25 @@ namespace Gala {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void update_ui_group_size () {
|
||||||
|
unowned var display = get_display ();
|
||||||
|
|
||||||
|
int max_width = 0;
|
||||||
|
int max_height = 0;
|
||||||
|
|
||||||
|
var num_monitors = display.get_n_monitors ();
|
||||||
|
for (int i = 0; i < num_monitors; i++) {
|
||||||
|
var geom = display.get_monitor_geometry (i);
|
||||||
|
var total_width = geom.x + geom.width;
|
||||||
|
var total_height = geom.y + geom.height;
|
||||||
|
|
||||||
|
max_width = (max_width > total_width) ? max_width : total_width;
|
||||||
|
max_height = (max_height > total_height) ? max_height : total_height;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_group.set_size (max_width, max_height);
|
||||||
|
}
|
||||||
|
|
||||||
private void launch_action (string action_key) {
|
private void launch_action (string action_key) {
|
||||||
try {
|
try {
|
||||||
var action = behavior_settings.get_string (action_key);
|
var action = behavior_settings.get_string (action_key);
|
||||||
@ -390,6 +410,7 @@ namespace Gala {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void on_monitors_changed () {
|
private void on_monitors_changed () {
|
||||||
|
update_ui_group_size ();
|
||||||
screen_shield.expand_to_screen_size ();
|
screen_shield.expand_to_screen_size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user