mirror of
https://github.com/elementary/gala.git
synced 2024-08-17 11:00:28 +03:00
Use Meta.Window.is_on_primary_monitor ()
(#1731)
This commit is contained in:
parent
eef351e5df
commit
b4a6a04d72
@ -677,7 +677,7 @@ public class Gala.WindowClone : Clutter.Actor {
|
||||
// for an icon group, we only do animations if there is an actual movement possible
|
||||
if (icon_group != null
|
||||
&& icon_group.workspace == window.get_workspace ()
|
||||
&& window.get_monitor () == window.get_display ().get_primary_monitor ()) {
|
||||
&& window.is_on_primary_monitor ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -733,7 +733,7 @@ public class Gala.WindowClone : Clutter.Actor {
|
||||
|
||||
var will_move = window.get_workspace ().index () != inserter.workspace_index;
|
||||
|
||||
if (Meta.Prefs.get_workspaces_only_on_primary () && window.get_monitor () != primary) {
|
||||
if (Meta.Prefs.get_workspaces_only_on_primary () && !window.is_on_primary_monitor ()) {
|
||||
window.move_to_monitor (primary);
|
||||
will_move = true;
|
||||
}
|
||||
@ -763,7 +763,7 @@ public class Gala.WindowClone : Clutter.Actor {
|
||||
|
||||
bool did_move = false;
|
||||
|
||||
if (Meta.Prefs.get_workspaces_only_on_primary () && window.get_monitor () != primary) {
|
||||
if (Meta.Prefs.get_workspaces_only_on_primary () && !window.is_on_primary_monitor ()) {
|
||||
window.move_to_monitor (primary);
|
||||
did_move = true;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ namespace Gala {
|
||||
foreach (var window in windows) {
|
||||
if (window.window_type == Meta.WindowType.NORMAL
|
||||
&& !window.on_all_workspaces
|
||||
&& window.get_monitor () == display.get_primary_monitor ()) {
|
||||
&& window.is_on_primary_monitor ()) {
|
||||
window_container.add_window (window);
|
||||
icon_group.add_window (window, true);
|
||||
}
|
||||
@ -256,7 +256,7 @@ namespace Gala {
|
||||
if (window.window_type != Meta.WindowType.NORMAL
|
||||
|| window.get_workspace () != workspace
|
||||
|| window.on_all_workspaces
|
||||
|| window.get_monitor () != window.get_display ().get_primary_monitor ())
|
||||
|| !window.is_on_primary_monitor ())
|
||||
return;
|
||||
|
||||
foreach (var child in window_container.get_children ())
|
||||
|
@ -1896,7 +1896,7 @@ namespace Gala {
|
||||
unowned Meta.Window window = actor.get_meta_window ();
|
||||
|
||||
if (!window.showing_on_its_workspace () ||
|
||||
(move_primary_only && window.get_monitor () != primary) ||
|
||||
(move_primary_only && !window.is_on_primary_monitor ()) ||
|
||||
(moving != null && window == moving))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user