mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 14:20:35 +00:00
Fix project-panel double click file support on Windows (#10917)
Release Notes:
- Fixed project panel double click to force open file on Windows.
Ref issue: #10898
@bennetbo
I saw you was also used `event.down.click_count` in Markdown Preview.
7dccbd8e3b (diff-c8d1735cb347ea08d03198df112343ec50a74de8d50414a6f3be6c6d674c6d19R161)
And this also used in other place:
<img width="870" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/b844e700-b95f-4cd2-987f-9e4305ebdd7c">
## Test demo after updated
Looks like it is no side effect

This commit is contained in:
parent
0d6fb08b67
commit
7065da2b98
1 changed files with 2 additions and 1 deletions
|
|
@ -701,12 +701,13 @@ impl WindowsWindowInner {
|
|||
if let Some(callback) = callbacks.input.as_mut() {
|
||||
let x = lparam.signed_loword() as f32;
|
||||
let y = lparam.signed_hiword() as f32;
|
||||
let click_count = self.click_state.borrow().current_count;
|
||||
let scale_factor = self.scale_factor.get();
|
||||
let event = MouseUpEvent {
|
||||
button,
|
||||
position: logical_point(x, y, scale_factor),
|
||||
modifiers: self.current_modifiers(),
|
||||
click_count: 1,
|
||||
click_count,
|
||||
};
|
||||
if callback(PlatformInput::MouseUp(event)).default_prevented {
|
||||
return Some(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue