Sebastian Lackner : wineconsole: Allocate fake hwnds for curses backend.

Alexandre Julliard julliard at wine.codeweavers.com
Wed May 20 10:04:12 CDT 2015


Module: wine
Branch: master
Commit: 2100d3e1ec3e47194fb7076de30f1acfe2b60bef
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2100d3e1ec3e47194fb7076de30f1acfe2b60bef

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed May 13 19:06:23 2015 +0200

wineconsole: Allocate fake hwnds for curses backend.

Based on a patch by Qian Hong.

---

 programs/wineconsole/curses.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c
index 24aab88..2903b80 100644
--- a/programs/wineconsole/curses.c
+++ b/programs/wineconsole/curses.c
@@ -1001,6 +1001,7 @@ static void WCCURSES_DeleteBackend(struct inner_data* data)
 #endif
     endwin();
 
+    if (data->hWnd) DestroyWindow(data->hWnd);
     HeapFree(GetProcessHeap(), 0, PRIVATE(data)->line);
     HeapFree(GetProcessHeap(), 0, PRIVATE(data));
     data->private = NULL;
@@ -1042,6 +1043,8 @@ static int WCCURSES_MainLoop(struct inner_data* data)
  */
 enum init_return WCCURSES_InitBackend(struct inner_data* data)
 {
+    static const WCHAR messageW[] = {'M','e','s','s','a','g','e',0};
+
     if( !WCCURSES_bind_libcurses() )
         return init_not_supported;
 
@@ -1058,7 +1061,8 @@ enum init_return WCCURSES_InitBackend(struct inner_data* data)
     data->fnScroll             = WCCURSES_Scroll;
     data->fnSetFont            = WCCURSES_SetFont;
     data->fnDeleteBackend      = WCCURSES_DeleteBackend;
-    data->hWnd                 = NULL;
+    data->hWnd                 = CreateWindowW(messageW, NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0,
+                                               GetModuleHandleW(0), NULL);
 
     /* FIXME: should find a good way to enable buffer scrolling
      * For the time being, setting this to 1 will allow scrolling up/down 




More information about the wine-cvs mailing list