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
7f83b940
Commit
7f83b940
authored
Sep 05, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Further tweeks to CFS_POINT and CFS_RECT placement of the default ime window.
parent
3822aa4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
12 deletions
+32
-12
imm.c
dlls/imm32/imm.c
+32
-12
No files found.
dlls/imm32/imm.c
View file @
7f83b940
...
@@ -1981,6 +1981,7 @@ static void PaintDefaultIMEWnd(HWND hwnd)
...
@@ -1981,6 +1981,7 @@ static void PaintDefaultIMEWnd(HWND hwnd)
LPBYTE
compdata
=
NULL
;
LPBYTE
compdata
=
NULL
;
HMONITOR
monitor
;
HMONITOR
monitor
;
MONITORINFO
mon_info
;
MONITORINFO
mon_info
;
INT
offX
=
0
,
offY
=
0
;
GetClientRect
(
hwnd
,
&
rect
);
GetClientRect
(
hwnd
,
&
rect
);
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)(
COLOR_WINDOW
+
1
));
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)(
COLOR_WINDOW
+
1
));
...
@@ -2005,24 +2006,30 @@ static void PaintDefaultIMEWnd(HWND hwnd)
...
@@ -2005,24 +2006,30 @@ static void PaintDefaultIMEWnd(HWND hwnd)
pt
.
y
=
size
.
cy
;
pt
.
y
=
size
.
cy
;
LPtoDP
(
hdc
,
&
pt
,
1
);
LPtoDP
(
hdc
,
&
pt
,
1
);
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_POINT
||
/*
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_FORCE_POSITION
)
* How this works based on tests on windows:
* CFS_POINT: then we start our window at the point and grow it as large
* as it needs to be for the string.
* CFS_RECT: we still use the ptCurrentPos as a starting point and our
* window is only as large as we need for the string, but we do not
* grow such that our window exceeds the given rect. Wrapping if
* needed and possible. If our ptCurrentPos is outside of our rect
* then no window is displayed.
* CFS_FORCE_POSITION: appears to behave just like CFS_POINT
* maybe becase the default MSIME does not do any IME adjusting.
*/
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
!=
CFS_DEFAULT
)
{
{
POINT
cpt
=
root_context
->
IMC
.
cfCompForm
.
ptCurrentPos
;
POINT
cpt
=
root_context
->
IMC
.
cfCompForm
.
ptCurrentPos
;
ClientToScreen
(
root_context
->
IMC
.
hWnd
,
&
cpt
);
ClientToScreen
(
root_context
->
IMC
.
hWnd
,
&
cpt
);
rect
.
left
=
cpt
.
x
;
rect
.
left
=
cpt
.
x
;
rect
.
top
=
cpt
.
y
;
rect
.
top
=
cpt
.
y
;
rect
.
right
=
rect
.
left
+
pt
.
x
+
20
;
rect
.
right
=
rect
.
left
+
pt
.
x
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
+
20
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
;
offX
=
offY
=
10
;
monitor
=
MonitorFromPoint
(
cpt
,
MONITOR_DEFAULTTOPRIMARY
);
monitor
=
MonitorFromPoint
(
cpt
,
MONITOR_DEFAULTTOPRIMARY
);
}
}
else
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_RECT
)
else
/* CFS_DEFAULT */
{
rect
=
root_context
->
IMC
.
cfCompForm
.
rcArea
;
MapWindowPoints
(
root_context
->
IMC
.
hWnd
,
0
,
(
POINT
*
)
&
rect
,
2
);
monitor
=
MonitorFromRect
(
&
rect
,
MONITOR_DEFAULTTOPRIMARY
);
}
else
{
{
/* Windows places the default IME window in the bottom left */
/* Windows places the default IME window in the bottom left */
HWND
target
=
root_context
->
IMC
.
hWnd
;
HWND
target
=
root_context
->
IMC
.
hWnd
;
...
@@ -2032,9 +2039,21 @@ static void PaintDefaultIMEWnd(HWND hwnd)
...
@@ -2032,9 +2039,21 @@ static void PaintDefaultIMEWnd(HWND hwnd)
rect
.
top
=
rect
.
bottom
;
rect
.
top
=
rect
.
bottom
;
rect
.
right
=
rect
.
left
+
pt
.
x
+
20
;
rect
.
right
=
rect
.
left
+
pt
.
x
+
20
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
+
20
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
+
20
;
offX
=
offY
=
10
;
monitor
=
MonitorFromWindow
(
target
,
MONITOR_DEFAULTTOPRIMARY
);
monitor
=
MonitorFromWindow
(
target
,
MONITOR_DEFAULTTOPRIMARY
);
}
}
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_RECT
)
{
RECT
client
;
client
=
root_context
->
IMC
.
cfCompForm
.
rcArea
;
MapWindowPoints
(
root_context
->
IMC
.
hWnd
,
0
,
(
POINT
*
)
&
client
,
2
);
IntersectRect
(
&
rect
,
&
rect
,
&
client
);
/* TODO: Wrap the input if needed */
}
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_DEFAULT
)
{
/* make sure we are on the desktop */
/* make sure we are on the desktop */
mon_info
.
cbSize
=
sizeof
(
mon_info
);
mon_info
.
cbSize
=
sizeof
(
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
...
@@ -2056,10 +2075,11 @@ static void PaintDefaultIMEWnd(HWND hwnd)
...
@@ -2056,10 +2075,11 @@ static void PaintDefaultIMEWnd(HWND hwnd)
rect
.
left
-=
shift
;
rect
.
left
-=
shift
;
rect
.
right
-=
shift
;
rect
.
right
-=
shift
;
}
}
}
SetWindowPos
(
hwnd
,
HWND_TOPMOST
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_NOACTIVATE
);
SetWindowPos
(
hwnd
,
HWND_TOPMOST
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_NOACTIVATE
);
TextOutW
(
hdc
,
10
,
10
,
CompString
,
compstr
->
dwCompStrLen
);
TextOutW
(
hdc
,
offX
,
offY
,
CompString
,
compstr
->
dwCompStrLen
);
if
(
oldfont
)
if
(
oldfont
)
SelectObject
(
hdc
,
oldfont
);
SelectObject
(
hdc
,
oldfont
);
...
...
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