Skip to content
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

feat: allow setting window shape #13789

Merged
merged 2 commits into from Jul 30, 2018

Conversation

Projects
None yet
5 participants
@nornagon
Copy link
Contributor

nornagon commented Jul 24, 2018

This binds Widget::SetShape, an API that already exists in Chromium. It's a more reliable method of having some parts of your window be "click-through" than the current setIgnoreMouseEvents API, which messes around with the WS_EX_LAYERED window style, causing strange bugs and incompatibility with hardware acceleration.

Checklist
  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

@nornagon nornagon requested a review from as a code owner Jul 24, 2018

@nornagon nornagon requested a review from zcbenz Jul 24, 2018

@nornagon nornagon force-pushed the window-set-shape branch from 51aef5a to c688a92 Jul 24, 2018

@nornagon nornagon requested a review from as a code owner Jul 24, 2018

feat: allow setting window shape
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

@nornagon nornagon force-pushed the window-set-shape branch from c688a92 to 41a322e Jul 24, 2018

@nornagon nornagon changed the title [wip] feat: allow setting window shape feat: allow setting window shape Jul 24, 2018

@@ -1262,6 +1262,11 @@ Sets the opacity of the window. On Linux does nothing.

Returns `Number` - between 0.0 (fully transparent) and 1.0 (fully opaque)

#### `win.setShape(rects)` _Windows_ _Linux_ _Experimental_

* `rects` [Rectangle[]](structures/rectangle.md) - Sets a shape on the window.

This comment has been minimized.

@zeke

zeke Jul 26, 2018

Member

Can you expand this documentation a bit to explain what shapes are and why you'd want to use them?

This comment has been minimized.

@nornagon

nornagon Jul 30, 2018

Author Contributor

done

@nornagon nornagon merged commit 3bdff2d into master Jul 30, 2018

2 of 13 checks passed

appveyor: electron-ia32-branch Waiting for AppVeyor build to complete
Details
appveyor: electron-ia32-pr Waiting for AppVeyor build to complete
Details
appveyor: electron-x64-branch Waiting for AppVeyor build to complete
Details
appveyor: electron-x64-pr Waiting for AppVeyor build to complete
Details
ci/circleci: electron-linux-arm CircleCI is running your tests
Details
ci/circleci: electron-linux-arm64 CircleCI is running your tests
Details
ci/circleci: electron-linux-gn-fyi CircleCI is running your tests
Details
ci/circleci: electron-linux-ia32 CircleCI is running your tests
Details
ci/circleci: electron-linux-x64 CircleCI is running your tests
Details
ci/circleci: electron-mas-x64 CircleCI is running your tests
Details
ci/circleci: electron-osx-x64 CircleCI is running your tests
Details
Semantic Pull Request ready to be squashed
Details
WIP ready for review
Details

@nornagon nornagon deleted the window-set-shape branch Jul 30, 2018

@ckerr

This comment has been minimized.

Copy link
Member

ckerr commented Aug 8, 2018

/trop run backport-to 2-1-x

@trop

This comment has been minimized.

Copy link
Contributor

trop bot commented Aug 8, 2018

The backport process for this PR has been manually initiated, sending your 1's and 0's to "2-1-x" here we go! :D

ckerr added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

nornagon added a commit that referenced this pull request Aug 8, 2018

feat: allow setting window shape (#13789) (backport 2-0-x)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

ckerr added a commit that referenced this pull request Aug 9, 2018

feat: allow setting window shape (#13789) (backport 2-0-x) (#13989)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

felixrieseberg added a commit that referenced this pull request Aug 29, 2018

feat: allow setting window shape (#13789)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.
@ckerr

This comment has been minimized.

Copy link
Member

ckerr commented Sep 4, 2018

/trop run backport-to 3-0-x

@trop

This comment has been minimized.

Copy link
Contributor

trop bot commented Sep 4, 2018

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "3-0-x" here we go! :D

@trop

This comment has been minimized.

Copy link
Contributor

trop bot commented Sep 4, 2018

We have automatically backported this PR to "3-0-x", please check out #14445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.