* Returns true if pointer x position is at monitor edge. * @returns Boolean
()
| 239 | * @returns Boolean |
| 240 | */ |
| 241 | _pointerIsAtEdge() { |
| 242 | const [x] = global.get_pointer(); |
| 243 | switch (this._direction) { |
| 244 | case Meta.MotionDirection.LEFT: |
| 245 | if ( |
| 246 | x >= this.monitor.x && |
| 247 | x <= this.monitor.x + 2 |
| 248 | ) { |
| 249 | return true; |
| 250 | } |
| 251 | break; |
| 252 | case Meta.MotionDirection.RIGHT: |
| 253 | if ( |
| 254 | x <= this.monitor.x + this.monitor.width && |
| 255 | x >= this.monitor.x + this.monitor.width - 2 |
| 256 | ) { |
| 257 | return true; |
| 258 | } |
| 259 | break; |
| 260 | } |
| 261 | |
| 262 | return false; |
| 263 | } |
| 264 | |
| 265 | /** |
| 266 | * Triggers edge window preview. |
no outgoing calls
no test coverage detected