Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
electron
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ExcellentOSS
electron
Commits
32988f18
Unverified
Commit
32988f18
authored
3 years ago
by
trop[bot]
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: WCO window hover on window controls on Windows (#32719)
parent
124cfcaf
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
shell/browser/ui/win/electron_desktop_window_tree_host_win.cc
+17
-0
17 additions, 0 deletions
...l/browser/ui/win/electron_desktop_window_tree_host_win.cc
shell/browser/ui/win/electron_desktop_window_tree_host_win.h
+1
-0
1 addition, 0 deletions
shell/browser/ui/win/electron_desktop_window_tree_host_win.h
with
18 additions
and
0 deletions
shell/browser/ui/win/electron_desktop_window_tree_host_win.cc
+
17
−
0
View file @
32988f18
...
...
@@ -99,4 +99,21 @@ bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets(
return
false
;
}
bool
ElectronDesktopWindowTreeHostWin
::
HandleMouseEvent
(
ui
::
MouseEvent
*
event
)
{
// Call the default implementation of this method to get the event to its
// proper handler.
bool
handled
=
views
::
DesktopWindowTreeHostWin
::
HandleMouseEvent
(
event
);
// On WCO-enabled windows, we need to mark non-client mouse moved events as
// handled so they don't incorrectly propogate back to the OS.
if
(
native_window_view_
->
IsWindowControlsOverlayEnabled
()
&&
event
->
type
()
==
ui
::
ET_MOUSE_MOVED
&&
(
event
->
flags
()
&
ui
::
EF_IS_NON_CLIENT
)
!=
0
)
{
event
->
SetHandled
();
handled
=
true
;
}
return
handled
;
}
}
// namespace electron
This diff is collapsed.
Click to expand it.
shell/browser/ui/win/electron_desktop_window_tree_host_win.h
+
1
−
0
View file @
32988f18
...
...
@@ -36,6 +36,7 @@ class ElectronDesktopWindowTreeHostWin
bool
GetDwmFrameInsetsInPixels
(
gfx
::
Insets
*
insets
)
const
override
;
bool
GetClientAreaInsets
(
gfx
::
Insets
*
insets
,
HMONITOR
monitor
)
const
override
;
bool
HandleMouseEvent
(
ui
::
MouseEvent
*
event
)
override
;
private:
NativeWindowViews
*
native_window_view_
;
// weak ref
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment