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
39aa7556
Commit
39aa7556
authored
Aug 27, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Update position of default IME window.
parent
f20432bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
13 deletions
+38
-13
imm.c
dlls/imm32/imm.c
+38
-13
No files found.
dlls/imm32/imm.c
View file @
39aa7556
...
...
@@ -1967,6 +1967,8 @@ static void PaintDefaultIMEWnd(HWND hwnd)
HDC
hdc
=
BeginPaint
(
hwnd
,
&
ps
);
LPCOMPOSITIONSTRING
compstr
;
LPBYTE
compdata
=
NULL
;
HMONITOR
monitor
;
MONITORINFO
mon_info
;
GetClientRect
(
hwnd
,
&
rect
);
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)(
COLOR_WINDOW
+
1
));
...
...
@@ -2000,28 +2002,51 @@ static void PaintDefaultIMEWnd(HWND hwnd)
rect
.
top
=
cpt
.
y
;
rect
.
right
=
rect
.
left
+
pt
.
x
+
20
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
+
20
;
monitor
=
MonitorFromPoint
(
cpt
,
MONITOR_DEFAULTTOPRIMARY
);
}
else
if
(
root_context
->
IMC
.
cfCompForm
.
dwStyle
==
CFS_RECT
)
{
POINT
cpt
;
cpt
.
x
=
root_context
->
IMC
.
cfCompForm
.
rcArea
.
left
;
cpt
.
y
=
root_context
->
IMC
.
cfCompForm
.
rcArea
.
top
;
ClientToScreen
(
root_context
->
IMC
.
hWnd
,
&
cpt
);
rect
.
left
=
cpt
.
x
;
rect
.
top
=
cpt
.
y
;
cpt
.
x
=
root_context
->
IMC
.
cfCompForm
.
rcArea
.
right
;
cpt
.
y
=
root_context
->
IMC
.
cfCompForm
.
rcArea
.
bottom
;
ClientToScreen
(
root_context
->
IMC
.
hWnd
,
&
cpt
);
rect
.
right
=
cpt
.
x
;
rect
.
bottom
=
cpt
.
y
;
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 */
HWND
target
=
root_context
->
IMC
.
hWnd
;
if
(
!
target
)
target
=
GetFocus
();
GetWindowRect
(
target
,
&
rect
);
rect
.
top
=
rect
.
bottom
;
rect
.
right
=
rect
.
left
+
pt
.
x
+
20
;
rect
.
bottom
=
rect
.
top
+
pt
.
y
+
20
;
monitor
=
MonitorFromWindow
(
target
,
MONITOR_DEFAULTTOPRIMARY
);
}
/* make sure we are on the desktop */
mon_info
.
cbSize
=
sizeof
(
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
if
(
rect
.
bottom
>
mon_info
.
rcWork
.
bottom
)
{
int
shift
=
rect
.
bottom
-
mon_info
.
rcWork
.
bottom
;
rect
.
top
-=
shift
;
rect
.
bottom
-=
shift
;
}
if
(
rect
.
left
<
0
)
{
rect
.
right
-=
rect
.
left
;
rect
.
left
=
0
;
}
MoveWindow
(
hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
FALSE
);
if
(
rect
.
right
>
mon_info
.
rcWork
.
right
)
{
int
shift
=
rect
.
right
-
mon_info
.
rcWork
.
right
;
rect
.
left
-=
shift
;
rect
.
right
-=
shift
;
}
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
);
if
(
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