From ed4e567ec1f68b6f8b0db08c22a9947b3a678d31 Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Wed, 30 Jul 2025 19:33:35 +0200 Subject: [PATCH] add `skipTaskbar` and `hiddenInMissionControl` window options Introduced `skipTaskbar` and `hiddenInMissionControl` methods to configure window behavior. Updated `toArray` to include these new properties and extended tests to validate functionality. --- src/Windows/Window.php | 20 ++++++++++++++++++++ tests/Windows/WindowTest.php | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/src/Windows/Window.php b/src/Windows/Window.php index 7eadd248..92af58b5 100644 --- a/src/Windows/Window.php +++ b/src/Windows/Window.php @@ -44,6 +44,10 @@ class Window protected bool $focusable = true; + protected bool $skipTaskbar = false; + + protected bool $hiddenInMissionControl = false; + protected bool $focused = false; protected bool $hasShadow = true; @@ -157,6 +161,20 @@ public function focusable($value = true): self return $this; } + public function skipTaskbar($value = true): self + { + $this->skipTaskbar = $value; + + return $this; + } + + public function hiddenInMissionControl($value = true): self + { + $this->hiddenInMissionControl = $value; + + return $this; + } + public function hasShadow($value = true): self { $this->hasShadow = $value; @@ -323,6 +341,8 @@ public function toArray() 'maxWidth' => $this->maxWidth, 'maxHeight' => $this->maxHeight, 'focusable' => $this->focusable, + 'skipTaskbar' => $this->skipTaskbar, + 'hiddenInMissionControl' => $this->hiddenInMissionControl, 'hasShadow' => $this->hasShadow, 'frame' => $this->frame, 'titleBarStyle' => $this->titleBarStyle, diff --git a/tests/Windows/WindowTest.php b/tests/Windows/WindowTest.php index 8cf21d6a..cabfde71 100644 --- a/tests/Windows/WindowTest.php +++ b/tests/Windows/WindowTest.php @@ -16,6 +16,8 @@ ->titleBarStyle('milwad') ->rememberState() ->frameless() + ->skipTaskbar() + ->hiddenInMissionControl() ->focusable() ->hasShadow() ->alwaysOnTop() @@ -36,6 +38,8 @@ expect($windowArray['titleBarStyle'])->toBe('milwad'); expect($windowArray['rememberState'])->toBeTrue(); expect($windowArray['frame'])->toBeFalse(); + expect($windowArray['skipTaskbar'])->toBeTrue(); + expect($windowArray['hiddenInMissionControl'])->toBeTrue(); expect($windowArray['focusable'])->toBeTrue(); expect($windowArray['hasShadow'])->toBeTrue(); expect($windowArray['alwaysOnTop'])->toBeTrue();