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
94dfc0e8
Commit
94dfc0e8
authored
Jun 05, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Don't mess with the caret if we don't have focus.
parent
e848f6d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
caret.c
dlls/riched20/caret.c
+12
-5
editor.c
dlls/riched20/editor.c
+3
-0
editstr.h
dlls/riched20/editstr.h
+1
-0
No files found.
dlls/riched20/caret.c
View file @
94dfc0e8
...
...
@@ -232,21 +232,28 @@ ME_MoveCaret(ME_TextEditor *editor)
ME_WrapMarkedParagraphs
(
editor
);
ME_GetCursorCoordinates
(
editor
,
&
editor
->
pCursors
[
0
],
&
x
,
&
y
,
&
height
);
CreateCaret
(
editor
->
hWnd
,
NULL
,
0
,
height
);
SetCaretPos
(
x
,
y
);
if
(
editor
->
bHaveFocus
)
{
CreateCaret
(
editor
->
hWnd
,
NULL
,
0
,
height
);
SetCaretPos
(
x
,
y
);
}
}
void
ME_ShowCaret
(
ME_TextEditor
*
ed
)
{
ME_MoveCaret
(
ed
);
ShowCaret
(
ed
->
hWnd
);
if
(
ed
->
bHaveFocus
)
ShowCaret
(
ed
->
hWnd
);
}
void
ME_HideCaret
(
ME_TextEditor
*
ed
)
{
HideCaret
(
ed
->
hWnd
);
DestroyCaret
();
if
(
ed
->
bHaveFocus
)
{
HideCaret
(
ed
->
hWnd
);
DestroyCaret
();
}
}
void
ME_InternalDeleteText
(
ME_TextEditor
*
editor
,
int
nOfs
,
...
...
dlls/riched20/editor.c
View file @
94dfc0e8
...
...
@@ -1153,6 +1153,7 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) {
ed
->
lpOleCallback
=
NULL
;
ed
->
mode
=
TM_RICHTEXT
|
TM_MULTILEVELUNDO
|
TM_MULTICODEPAGE
;
ed
->
AutoURLDetect_bEnable
=
FALSE
;
ed
->
bHaveFocus
=
FALSE
;
GetClientRect
(
hWnd
,
&
ed
->
rcFormat
);
for
(
i
=
0
;
i
<
HFONT_CACHE_SIZE
;
i
++
)
{
...
...
@@ -2335,11 +2336,13 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
}
break
;
case
WM_SETFOCUS
:
editor
->
bHaveFocus
=
TRUE
;
ME_ShowCaret
(
editor
);
ME_SendOldNotify
(
editor
,
EN_SETFOCUS
);
return
0
;
case
WM_KILLFOCUS
:
ME_HideCaret
(
editor
);
editor
->
bHaveFocus
=
FALSE
;
ME_SendOldNotify
(
editor
,
EN_KILLFOCUS
);
return
0
;
case
WM_ERASEBKGND
:
...
...
dlls/riched20/editstr.h
View file @
94dfc0e8
...
...
@@ -321,6 +321,7 @@ typedef struct tagME_TextEditor
BOOL
bHideSelection
;
BOOL
AutoURLDetect_bEnable
;
WCHAR
cPasswordMask
;
BOOL
bHaveFocus
;
}
ME_TextEditor
;
typedef
struct
tagME_Context
...
...
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