Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5b2bdc06
Commit
5b2bdc06
authored
Jul 05, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Jul 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Fixed double click issues by sharing code with single click.
parent
379835b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
25 deletions
+17
-25
caret.c
dlls/riched20/caret.c
+10
-16
editor.c
dlls/riched20/editor.c
+6
-8
editor.h
dlls/riched20/editor.h
+1
-1
No files found.
dlls/riched20/caret.c
View file @
5b2bdc06
...
...
@@ -749,8 +749,6 @@ ME_SelectWord(ME_TextEditor *editor)
ME_MoveCursorWords
(
editor
,
&
editor
->
pCursors
[
1
],
+
1
);
editor
->
pCursors
[
0
]
=
editor
->
pCursors
[
1
];
ME_MoveCursorWords
(
editor
,
&
editor
->
pCursors
[
0
],
-
1
);
ME_InvalidateSelection
(
editor
);
ME_SendSelChange
(
editor
);
}
...
...
@@ -871,7 +869,7 @@ ME_CharFromPos(ME_TextEditor *editor, int x, int y)
}
void
ME_LButtonDown
(
ME_TextEditor
*
editor
,
int
x
,
int
y
)
void
ME_LButtonDown
(
ME_TextEditor
*
editor
,
int
x
,
int
y
,
int
clickNum
)
{
ME_Cursor
tmp_cursor
;
int
is_selection
=
0
;
...
...
@@ -888,19 +886,15 @@ void ME_LButtonDown(ME_TextEditor *editor, int x, int y)
ME_FindPixelPos
(
editor
,
x
,
y
,
&
editor
->
pCursors
[
0
],
&
editor
->
bCaretAtEnd
);
if
(
GetKeyState
(
VK_SHIFT
)
>=
0
)
{
/* Shift key is not down */
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
if
(
clickNum
>
1
)
ME_SelectWord
(
editor
);
}
else
if
(
!
is_selection
)
{
editor
->
pCursors
[
1
]
=
tmp_cursor
;
is_selection
=
1
;
}
ME_InvalidateSelection
(
editor
);
HideCaret
(
editor
->
hWnd
);
ME_MoveCaret
(
editor
);
ShowCaret
(
editor
->
hWnd
);
ME_ClearTempStyle
(
editor
);
ME_SendSelChange
(
editor
);
}
else
{
...
...
@@ -934,13 +928,13 @@ void ME_LButtonDown(ME_TextEditor *editor, int x, int y)
}
editor
->
pCursors
[
2
]
=
editor
->
pCursors
[
0
];
editor
->
pCursors
[
3
]
=
editor
->
pCursors
[
1
];
ME_InvalidateSelection
(
editor
);
HideCaret
(
editor
->
hWnd
);
ME_MoveCaret
(
editor
);
ShowCaret
(
editor
->
hWnd
);
ME_ClearTempStyle
(
editor
);
ME_SendSelChange
(
editor
);
}
ME_InvalidateSelection
(
editor
);
HideCaret
(
editor
->
hWnd
);
ME_MoveCaret
(
editor
);
ShowCaret
(
editor
->
hWnd
);
ME_ClearTempStyle
(
editor
);
ME_SendSelChange
(
editor
);
}
void
ME_MouseMove
(
ME_TextEditor
*
editor
,
int
x
,
int
y
)
...
...
dlls/riched20/editor.c
View file @
5b2bdc06
...
...
@@ -2966,17 +2966,22 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ME_DestroyEditor
(
editor
);
SetWindowLongPtrW
(
hWnd
,
0
,
0
);
return
0
;
case
WM_LBUTTONDBLCLK
:
case
WM_LBUTTONDOWN
:
{
int
clickNum
=
(
msg
==
WM_LBUTTONDBLCLK
)
?
2
:
1
;
ME_CommitUndo
(
editor
);
/* End coalesced undos for typed characters */
if
((
editor
->
nEventMask
&
ENM_MOUSEEVENTS
)
&&
!
ME_FilterEvent
(
editor
,
msg
,
&
wParam
,
&
lParam
))
return
0
;
SetFocus
(
hWnd
);
ME_LButtonDown
(
editor
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
));
ME_LButtonDown
(
editor
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
clickNum
);
SetCapture
(
hWnd
);
ME_LinkNotify
(
editor
,
msg
,
wParam
,
lParam
);
if
(
!
ME_SetCursor
(
editor
,
LOWORD
(
lParam
)))
goto
do_default
;
break
;
}
case
WM_MOUSEMOVE
:
if
((
editor
->
nEventMask
&
ENM_MOUSEEVENTS
)
&&
!
ME_FilterEvent
(
editor
,
msg
,
&
wParam
,
&
lParam
))
...
...
@@ -3001,13 +3006,6 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
if
(
!
ret
)
goto
do_default
;
}
break
;
case
WM_LBUTTONDBLCLK
:
if
((
editor
->
nEventMask
&
ENM_MOUSEEVENTS
)
&&
!
ME_FilterEvent
(
editor
,
msg
,
&
wParam
,
&
lParam
))
return
0
;
ME_LinkNotify
(
editor
,
msg
,
wParam
,
lParam
);
ME_SelectWord
(
editor
);
break
;
case
WM_RBUTTONUP
:
case
WM_RBUTTONDOWN
:
ME_CommitUndo
(
editor
);
/* End coalesced undos for typed characters */
...
...
dlls/riched20/editor.h
View file @
5b2bdc06
...
...
@@ -181,7 +181,7 @@ void ME_HideCaret(ME_TextEditor *ed);
void
ME_ShowCaret
(
ME_TextEditor
*
ed
);
void
ME_MoveCaret
(
ME_TextEditor
*
ed
);
int
ME_CharFromPos
(
ME_TextEditor
*
editor
,
int
x
,
int
y
);
void
ME_LButtonDown
(
ME_TextEditor
*
editor
,
int
x
,
int
y
);
void
ME_LButtonDown
(
ME_TextEditor
*
editor
,
int
x
,
int
y
,
int
clickNum
);
void
ME_MouseMove
(
ME_TextEditor
*
editor
,
int
x
,
int
y
);
void
ME_DeleteTextAtCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
int
nChars
);
void
ME_InsertTextFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment