Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2681c021
Commit
2681c021
authored
Dec 13, 2001
by
Eric Laforest
Committed by
Alexandre Julliard
Dec 13, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the missing functionality in the tty driver.
parent
eb9a8631
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
160 additions
and
0 deletions
+160
-0
ttydrv.spec
dlls/ttydrv/ttydrv.spec
+1
-0
wnd.c
dlls/ttydrv/wnd.c
+159
-0
No files found.
dlls/ttydrv/ttydrv.spec
View file @
2681c021
...
...
@@ -67,3 +67,4 @@ debug_channels (ttydrv)
@ cdecl IsClipboardFormatAvailable(long) TTYDRV_IsClipboardFormatAvailable
@ cdecl RegisterClipboardFormat(str) TTYDRV_RegisterClipboardFormat
@ cdecl IsSelectionOwner() TTYDRV_IsSelectionOwner
@ cdecl ShowWindow(long long) TTYDRV_ShowWindow
dlls/ttydrv/wnd.c
View file @
2681c021
...
...
@@ -645,3 +645,162 @@ BOOL TTYDRV_SetWindowPos( WINDOWPOS *winpos )
WIN_ReleaseWndPtr
(
wndPtr
);
return
retvalue
;
}
/***********************************************************************
* WINPOS_MinMaximize (internal)
*
*Lifted from x11 driver
*/
static
UINT
WINPOS_MinMaximize
(
HWND
hwnd
,
UINT
cmd
,
LPRECT
rect
)
{
WND
*
wndPtr
;
UINT
swpFlags
=
0
;
WINDOWPLACEMENT
wpl
;
TRACE
(
"0x%04x %u
\n
"
,
hwnd
,
cmd
);
FIXME
(
"(%x): stub
\n
"
,
hwnd
);
wpl
.
length
=
sizeof
(
wpl
);
GetWindowPlacement
(
hwnd
,
&
wpl
);
/* If I glark this right, yields an immutable window*/
swpFlags
=
SWP_NOSIZE
|
SWP_NOMOVE
;
if
(
!
(
wndPtr
=
WIN_FindWndPtr
(
hwnd
)))
return
0
;
/*cmd handling goes here. see dlls/x1drv/winpos.c*/
WIN_ReleaseWndPtr
(
wndPtr
);
return
swpFlags
;
}
/***********************************************************************
* ShowWindow (TTYDRV.@)
*
*Lifted from x11 driver
*Sets the specified windows' show state.
*/
BOOL
TTYDRV_ShowWindow
(
HWND
hwnd
,
INT
cmd
)
{
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
BOOL
wasVisible
,
showFlag
;
RECT
newPos
=
{
0
,
0
,
0
,
0
};
UINT
swp
=
0
;
if
(
!
wndPtr
)
return
FALSE
;
hwnd
=
wndPtr
->
hwndSelf
;
/* make it a full handle */
TRACE
(
"hwnd=%04x, cmd=%d
\n
"
,
hwnd
,
cmd
);
wasVisible
=
(
wndPtr
->
dwStyle
&
WS_VISIBLE
)
!=
0
;
switch
(
cmd
)
{
case
SW_HIDE
:
if
(
!
wasVisible
)
goto
END
;;
swp
|=
SWP_HIDEWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
;
break
;
case
SW_SHOWMINNOACTIVE
:
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* fall through */
case
SW_SHOWMINIMIZED
:
swp
|=
SWP_SHOWWINDOW
;
/* fall through */
case
SW_MINIMIZE
:
swp
|=
SWP_FRAMECHANGED
;
if
(
!
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
)
swp
|=
WINPOS_MinMaximize
(
hwnd
,
SW_MINIMIZE
,
&
newPos
);
else
swp
|=
SWP_NOSIZE
|
SWP_NOMOVE
;
break
;
case
SW_SHOWMAXIMIZED
:
/* same as SW_MAXIMIZE */
swp
|=
SWP_SHOWWINDOW
|
SWP_FRAMECHANGED
;
if
(
!
(
wndPtr
->
dwStyle
&
WS_MAXIMIZE
)
)
swp
|=
WINPOS_MinMaximize
(
hwnd
,
SW_MAXIMIZE
,
&
newPos
);
else
swp
|=
SWP_NOSIZE
|
SWP_NOMOVE
;
break
;
case
SW_SHOWNA
:
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* fall through */
case
SW_SHOW
:
swp
|=
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
;
/*
* ShowWindow has a little peculiar behavior that if the
* window is already the topmost window, it will not
* activate it.
*/
if
(
GetTopWindow
((
HWND
)
0
)
==
hwnd
&&
(
wasVisible
||
GetActiveWindow
()
==
hwnd
))
swp
|=
SWP_NOACTIVATE
;
break
;
case
SW_SHOWNOACTIVATE
:
swp
|=
SWP_NOZORDER
;
if
(
GetActiveWindow
())
swp
|=
SWP_NOACTIVATE
;
/* fall through */
case
SW_SHOWNORMAL
:
/* same as SW_NORMAL: */
case
SW_SHOWDEFAULT
:
/* FIXME: should have its own handler */
case
SW_RESTORE
:
swp
|=
SWP_SHOWWINDOW
|
SWP_FRAMECHANGED
;
if
(
wndPtr
->
dwStyle
&
(
WS_MINIMIZE
|
WS_MAXIMIZE
)
)
swp
|=
WINPOS_MinMaximize
(
hwnd
,
SW_RESTORE
,
&
newPos
);
else
swp
|=
SWP_NOSIZE
|
SWP_NOMOVE
;
break
;
}
showFlag
=
(
cmd
!=
SW_HIDE
);
if
(
showFlag
!=
wasVisible
)
{
SendMessageA
(
hwnd
,
WM_SHOWWINDOW
,
showFlag
,
0
);
if
(
!
IsWindow
(
hwnd
))
goto
END
;
}
/* We can't activate a child window */
if
((
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
(
wndPtr
->
dwExStyle
&
WS_EX_MDICHILD
))
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
SetWindowPos
(
hwnd
,
HWND_TOP
,
newPos
.
left
,
newPos
.
top
,
newPos
.
right
,
newPos
.
bottom
,
LOWORD
(
swp
)
);
if
(
cmd
==
SW_HIDE
)
{
/* FIXME: This will cause the window to be activated irrespective
* of whether it is owned by the same thread. Has to be done
* asynchronously.
*/
if
(
hwnd
==
GetActiveWindow
())
WINPOS_ActivateOtherWindow
(
hwnd
);
/* Revert focus to parent */
if
(
hwnd
==
GetFocus
()
||
IsChild
(
hwnd
,
GetFocus
()))
SetFocus
(
GetParent
(
hwnd
)
);
}
if
(
!
IsWindow
(
hwnd
))
goto
END
;
else
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
WINPOS_ShowIconTitle
(
hwnd
,
TRUE
);
if
(
wndPtr
->
flags
&
WIN_NEED_SIZE
)
{
/* should happen only in CreateWindowEx() */
int
wParam
=
SIZE_RESTORED
;
wndPtr
->
flags
&=
~
WIN_NEED_SIZE
;
if
(
wndPtr
->
dwStyle
&
WS_MAXIMIZE
)
wParam
=
SIZE_MAXIMIZED
;
else
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
wParam
=
SIZE_MINIMIZED
;
SendMessageA
(
hwnd
,
WM_SIZE
,
wParam
,
MAKELONG
(
wndPtr
->
rectClient
.
right
-
wndPtr
->
rectClient
.
left
,
wndPtr
->
rectClient
.
bottom
-
wndPtr
->
rectClient
.
top
));
SendMessageA
(
hwnd
,
WM_MOVE
,
0
,
MAKELONG
(
wndPtr
->
rectClient
.
left
,
wndPtr
->
rectClient
.
top
)
);
}
END:
WIN_ReleaseWndPtr
(
wndPtr
);
return
wasVisible
;
}
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