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
bb8d1ca6
Commit
bb8d1ca6
authored
Apr 18, 2008
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Apr 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Update caret position.
parent
d79dff4e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
ime.c
dlls/winex11.drv/ime.c
+26
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
xim.c
dlls/winex11.drv/xim.c
+2
-5
No files found.
dlls/winex11.drv/ime.c
View file @
bb8d1ca6
...
@@ -1012,6 +1012,32 @@ INT IME_GetCursorPos()
...
@@ -1012,6 +1012,32 @@ INT IME_GetCursorPos()
return
rc
;
return
rc
;
}
}
void
IME_SetCursorPos
(
DWORD
pos
)
{
LPINPUTCONTEXT
lpIMC
;
LPCOMPOSITIONSTRING
compstr
;
if
(
!
hSelectedFrom
)
return
;
lpIMC
=
LockRealIMC
(
FROM_X11
);
if
(
!
lpIMC
)
return
;
compstr
=
(
LPCOMPOSITIONSTRING
)
ImmLockIMCC
(
lpIMC
->
hCompStr
);
if
(
!
compstr
)
{
UnlockRealIMC
(
FROM_X11
);
return
;
}
compstr
->
dwCursorPos
=
pos
;
ImmUnlockIMCC
(
lpIMC
->
hCompStr
);
UnlockRealIMC
(
FROM_X11
);
GenerateIMEMessage
(
FROM_X11
,
WM_IME_COMPOSITION
,
pos
,
GCS_CURSORPOS
);
return
;
}
void
IME_UpdateAssociation
(
HWND
focus
)
void
IME_UpdateAssociation
(
HWND
focus
)
{
{
ImmGetContext
(
focus
);
ImmGetContext
(
focus
);
...
...
dlls/winex11.drv/x11drv.h
View file @
bb8d1ca6
...
@@ -280,6 +280,7 @@ extern void IME_SetOpenStatus(BOOL fOpen);
...
@@ -280,6 +280,7 @@ extern void IME_SetOpenStatus(BOOL fOpen);
extern
void
IME_XIMPresent
(
BOOL
present
);
extern
void
IME_XIMPresent
(
BOOL
present
);
extern
LRESULT
IME_SendMessageToSelectedHWND
(
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
LRESULT
IME_SendMessageToSelectedHWND
(
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
INT
IME_GetCursorPos
();
extern
INT
IME_GetCursorPos
();
extern
void
IME_SetCursorPos
(
DWORD
pos
);
extern
void
IME_UpdateAssociation
(
HWND
focus
);
extern
void
IME_UpdateAssociation
(
HWND
focus
);
extern
BOOL
IME_SetCompositionString
(
DWORD
dwIndex
,
LPCVOID
lpComp
,
extern
BOOL
IME_SetCompositionString
(
DWORD
dwIndex
,
LPCVOID
lpComp
,
DWORD
dwCompLen
,
LPCVOID
lpRead
,
DWORD
dwCompLen
,
LPCVOID
lpRead
,
...
...
dlls/winex11.drv/xim.c
View file @
bb8d1ca6
...
@@ -48,7 +48,6 @@ static LPBYTE CompositionString = NULL;
...
@@ -48,7 +48,6 @@ static LPBYTE CompositionString = NULL;
static
DWORD
dwCompStringSize
=
0
;
static
DWORD
dwCompStringSize
=
0
;
static
LPBYTE
ResultString
=
NULL
;
static
LPBYTE
ResultString
=
NULL
;
static
DWORD
dwResultStringSize
=
0
;
static
DWORD
dwResultStringSize
=
0
;
static
DWORD
dwPreeditPos
=
0
;
#define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea)
#define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea)
#define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing)
#define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing)
...
@@ -216,7 +215,6 @@ static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_d
...
@@ -216,7 +215,6 @@ static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_d
TRACE
(
"PreEditStartCallback %p
\n
"
,
ic
);
TRACE
(
"PreEditStartCallback %p
\n
"
,
ic
);
X11DRV_ImmSetOpenStatus
(
TRUE
);
X11DRV_ImmSetOpenStatus
(
TRUE
);
ximInComposeMode
=
TRUE
;
ximInComposeMode
=
TRUE
;
IME_SendMessageToSelectedHWND
(
EM_GETSEL
,
0
,
(
LPARAM
)
&
dwPreeditPos
);
return
-
1
;
return
-
1
;
}
}
...
@@ -225,7 +223,6 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
...
@@ -225,7 +223,6 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
TRACE
(
"PreeditDoneCallback %p
\n
"
,
ic
);
TRACE
(
"PreeditDoneCallback %p
\n
"
,
ic
);
ximInComposeMode
=
FALSE
;
ximInComposeMode
=
FALSE
;
X11DRV_ImmSetOpenStatus
(
FALSE
);
X11DRV_ImmSetOpenStatus
(
FALSE
);
dwPreeditPos
=
0
;
}
}
static
void
XIMPreEditDrawCallback
(
XIM
ic
,
XPointer
client_data
,
static
void
XIMPreEditDrawCallback
(
XIM
ic
,
XPointer
client_data
,
...
@@ -271,6 +268,7 @@ static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
...
@@ -271,6 +268,7 @@ static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
}
}
else
else
X11DRV_ImmSetInternalString
(
GCS_COMPSTR
,
sel
,
len
,
NULL
,
0
);
X11DRV_ImmSetInternalString
(
GCS_COMPSTR
,
sel
,
len
,
NULL
,
0
);
IME_SetCursorPos
(
P_DR
->
caret
);
}
}
TRACE
(
"Finished
\n
"
);
TRACE
(
"Finished
\n
"
);
}
}
...
@@ -311,8 +309,7 @@ static void XIMPreEditCaretCallback(XIC ic, XPointer client_data,
...
@@ -311,8 +309,7 @@ static void XIMPreEditCaretCallback(XIC ic, XPointer client_data,
FIXME
(
"Not implemented
\n
"
);
FIXME
(
"Not implemented
\n
"
);
break
;
break
;
}
}
IME_SendMessageToSelectedHWND
(
EM_SETSEL
,
dwPreeditPos
+
pos
,
IME_SetCursorPos
(
pos
);
dwPreeditPos
+
pos
);
P_C
->
position
=
pos
;
P_C
->
position
=
pos
;
}
}
TRACE
(
"Finished
\n
"
);
TRACE
(
"Finished
\n
"
);
...
...
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