Skip to content

add skipTaskbar and hiddenInMissionControl window options #671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Windows/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions tests/Windows/WindowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
->titleBarStyle('milwad')
->rememberState()
->frameless()
->skipTaskbar()
->hiddenInMissionControl()
->focusable()
->hasShadow()
->alwaysOnTop()
Expand All @@ -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();
Expand Down
Loading