[client,win]: warning fixes and opaque settings fixes
This commit is contained in:
parent
1ef7b9e3e0
commit
137f9fc2f2
@ -46,6 +46,7 @@
|
|||||||
#include <freerdp/log.h>
|
#include <freerdp/log.h>
|
||||||
#include <freerdp/freerdp.h>
|
#include <freerdp/freerdp.h>
|
||||||
#include <freerdp/constants.h>
|
#include <freerdp/constants.h>
|
||||||
|
#include <freerdp/settings.h>
|
||||||
|
|
||||||
#include <freerdp/locale/keyboard.h>
|
#include <freerdp/locale/keyboard.h>
|
||||||
#include <freerdp/codec/region.h>
|
#include <freerdp/codec/region.h>
|
||||||
@ -443,8 +444,8 @@ static BOOL wf_post_connect(freerdp* instance)
|
|||||||
context->update->EndPaint = wf_end_paint;
|
context->update->EndPaint = wf_end_paint;
|
||||||
wf_register_pointer(context->graphics);
|
wf_register_pointer(context->graphics);
|
||||||
|
|
||||||
wfc->floatbar =
|
wfc->floatbar = wf_floatbar_new(wfc, wfc->hInstance,
|
||||||
wf_floatbar_new(wfc, wfc->hInstance, freerdp_settings_get_bool(settings, FreeRDP_Floatbar));
|
freerdp_settings_get_uint32(settings, FreeRDP_Floatbar));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1375,11 +1376,11 @@ static int wfreerdp_client_start(rdpContext* context)
|
|||||||
freerdp* instance = context->instance;
|
freerdp* instance = context->instance;
|
||||||
WINPR_ASSERT(instance);
|
WINPR_ASSERT(instance);
|
||||||
|
|
||||||
rdpContext* settings = context->instance;
|
rdpSettings* settings = context->settings;
|
||||||
WINPR_ASSERT(settings);
|
WINPR_ASSERT(settings);
|
||||||
|
|
||||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||||
HWND hWndParent = (HWND)freerdp_settings_get_uint64(context->settings, FreeRDP_ParentWindowId);
|
HWND hWndParent = (HWND)freerdp_settings_get_uint64(settings, FreeRDP_ParentWindowId);
|
||||||
if (!freerdp_settings_set_bool(settings, FreeRDP_EmbeddedWindow, (hWndParent) ? TRUE : FALSE))
|
if (!freerdp_settings_set_bool(settings, FreeRDP_EmbeddedWindow, (hWndParent) ? TRUE : FALSE))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -57,15 +57,11 @@ static BOOL g_keystates[256] = { 0 };
|
|||||||
|
|
||||||
static BOOL ctrl_down(void)
|
static BOOL ctrl_down(void)
|
||||||
{
|
{
|
||||||
WINPR_ASSERT(g_keystates && (ARRAYSIZE(g_keystates) >= 0xFF));
|
|
||||||
|
|
||||||
return g_keystates[VK_CONTROL] || g_keystates[VK_LCONTROL] || g_keystates[VK_RCONTROL];
|
return g_keystates[VK_CONTROL] || g_keystates[VK_LCONTROL] || g_keystates[VK_RCONTROL];
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL alt_ctrl_down(void)
|
static BOOL alt_ctrl_down(void)
|
||||||
{
|
{
|
||||||
WINPR_ASSERT(g_keystates && (ARRAYSIZE(g_keystates) >= 0xFF));
|
|
||||||
|
|
||||||
const BOOL altDown = g_keystates[VK_MENU] || g_keystates[VK_LMENU] || g_keystates[VK_RMENU];
|
const BOOL altDown = g_keystates[VK_MENU] || g_keystates[VK_LMENU] || g_keystates[VK_RMENU];
|
||||||
return altDown && ctrl_down();
|
return altDown && ctrl_down();
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#include "wf_client.h"
|
#include "wf_client.h"
|
||||||
|
|
||||||
void wf_invalidate_region(wfContext* wfc, UINT32 x, UINT32 y, UINT32 width, UINT32 height);
|
void wf_invalidate_region(wfContext* wfc, UINT32 x, UINT32 y, UINT32 width, UINT32 height);
|
||||||
wfBitmap* wf_image_new(wfContext* wfc, UINT32 width, UINT32 height, UINT32 bpp, const BYTE* data);
|
|
||||||
void wf_image_free(wfBitmap* image);
|
|
||||||
void wf_update_offset(wfContext* wfc);
|
void wf_update_offset(wfContext* wfc);
|
||||||
void wf_resize_window(wfContext* wfc);
|
void wf_resize_window(wfContext* wfc);
|
||||||
void wf_toggle_fullscreen(wfContext* wfc);
|
void wf_toggle_fullscreen(wfContext* wfc);
|
||||||
|
@ -185,7 +185,7 @@ static BOOL flip_bitmap(const BYTE* src, BYTE* dst, UINT32 scanline, UINT32 nHei
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL wf_Pointer_New(rdpContext* context, const rdpPointer* pointer)
|
static BOOL wf_Pointer_New(rdpContext* context, rdpPointer* pointer)
|
||||||
{
|
{
|
||||||
HCURSOR hCur;
|
HCURSOR hCur;
|
||||||
ICONINFO info;
|
ICONINFO info;
|
||||||
@ -275,19 +275,17 @@ fail:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL wf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
|
static void wf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
|
||||||
{
|
{
|
||||||
HCURSOR hCur;
|
HCURSOR hCur;
|
||||||
|
|
||||||
if (!context || !pointer)
|
if (!context || !pointer)
|
||||||
return FALSE;
|
return;
|
||||||
|
|
||||||
hCur = ((wfPointer*)pointer)->cursor;
|
hCur = ((wfPointer*)pointer)->cursor;
|
||||||
|
|
||||||
if (hCur != 0)
|
if (hCur != 0)
|
||||||
DestroyIcon(hCur);
|
DestroyIcon(hCur);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL wf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
static BOOL wf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
||||||
|
Loading…
Reference in New Issue
Block a user