[gnome-shell] layout: Use window.is_monitor_sized



commit 6b4f52462071dc9af5b8915afebc8bc340b49ca2
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Sun Feb 17 21:27:40 2013 +0100

    layout: Use window.is_monitor_sized
    
    Mutter now provides a method for this, so use it.

 js/ui/layout.js |   24 +-----------------------
 1 files changed, 1 insertions(+), 23 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index edcb0e1..e76597e 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -776,33 +776,11 @@ const LayoutManager = new Lang.Class({
             if (!window.showing_on_its_workspace())
                 continue;
 
-            if (layer == Meta.StackLayer.FULLSCREEN) {
+            if (window.is_monitor_sized()) {
                 let monitor = this.monitors[metaWindow.get_monitor()];
                 if (monitor)
                     monitor.inFullscreen = true;
             }
-            if (layer == Meta.StackLayer.OVERRIDE_REDIRECT) {
-                // Check whether the window is screen sized
-                let isScreenSized =
-                    (window.x == 0 && window.y == 0 &&
-                    window.width == global.screen_width &&
-                    window.height == global.screen_height);
-
-                if (isScreenSized) {
-                    for (let i = 0; i < this.monitors.length; i++)
-                        this.monitors[i].inFullscreen = true;
-                }
-
-                // Or whether it is monitor sized
-                let monitor = this.monitors[metaWindow.get_monitor()];
-                if (monitor &&
-                    window.x <= monitor.x &&
-                    window.x + window.width >= monitor.x + monitor.width &&
-                    window.y <= monitor.y &&
-                    window.y + window.height >= monitor.y + monitor.height)
-                    monitor.inFullscreen = true;
-            } else
-                break;
         }
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]