Skip to content

Commit 7976260

Browse files
authored
add skipTaskbar and hiddenInMissionControl window options (#671)
Introduced `skipTaskbar` and `hiddenInMissionControl` methods to configure window behavior. Updated `toArray` to include these new properties and extended tests to validate functionality.
1 parent 86f9b87 commit 7976260

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Windows/Window.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class Window
4444

4545
protected bool $focusable = true;
4646

47+
protected bool $skipTaskbar = false;
48+
49+
protected bool $hiddenInMissionControl = false;
50+
4751
protected bool $focused = false;
4852

4953
protected bool $hasShadow = true;
@@ -157,6 +161,20 @@ public function focusable($value = true): self
157161
return $this;
158162
}
159163

164+
public function skipTaskbar($value = true): self
165+
{
166+
$this->skipTaskbar = $value;
167+
168+
return $this;
169+
}
170+
171+
public function hiddenInMissionControl($value = true): self
172+
{
173+
$this->hiddenInMissionControl = $value;
174+
175+
return $this;
176+
}
177+
160178
public function hasShadow($value = true): self
161179
{
162180
$this->hasShadow = $value;
@@ -323,6 +341,8 @@ public function toArray()
323341
'maxWidth' => $this->maxWidth,
324342
'maxHeight' => $this->maxHeight,
325343
'focusable' => $this->focusable,
344+
'skipTaskbar' => $this->skipTaskbar,
345+
'hiddenInMissionControl' => $this->hiddenInMissionControl,
326346
'hasShadow' => $this->hasShadow,
327347
'frame' => $this->frame,
328348
'titleBarStyle' => $this->titleBarStyle,

tests/Windows/WindowTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
->titleBarStyle('milwad')
1717
->rememberState()
1818
->frameless()
19+
->skipTaskbar()
20+
->hiddenInMissionControl()
1921
->focusable()
2022
->hasShadow()
2123
->alwaysOnTop()
@@ -36,6 +38,8 @@
3638
expect($windowArray['titleBarStyle'])->toBe('milwad');
3739
expect($windowArray['rememberState'])->toBeTrue();
3840
expect($windowArray['frame'])->toBeFalse();
41+
expect($windowArray['skipTaskbar'])->toBeTrue();
42+
expect($windowArray['hiddenInMissionControl'])->toBeTrue();
3943
expect($windowArray['focusable'])->toBeTrue();
4044
expect($windowArray['hasShadow'])->toBeTrue();
4145
expect($windowArray['alwaysOnTop'])->toBeTrue();

0 commit comments

Comments
 (0)