summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/win32.c22
-rw-r--r--src/win32.h5
2 files changed, 12 insertions, 15 deletions
diff --git a/src/win32.c b/src/win32.c
index 504cfe90..8f7bdc02 100644
--- a/src/win32.c
+++ b/src/win32.c
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28#define WIN32_LEAN_AND_MEAN 28#define WIN32_LEAN_AND_MEAN
29#include <Windows.h> 29#include <Windows.h>
30#include <windowsx.h> 30#include <windowsx.h>
31#include <dwmapi.h>
31#include <d2d1.h> 32#include <d2d1.h>
32 33
33void setDPIAware_Win32(void) { 34void setDPIAware_Win32(void) {
@@ -63,18 +64,6 @@ void useExecutableIconResource_SDLWindow(SDL_Window *win) {
63 } 64 }
64} 65}
65 66
66#if 0
67void setup_SDLWindow(SDL_Window *win) {
68 SDL_SysWMinfo wmInfo;
69 SDL_VERSION(&wmInfo.version);
70 if (SDL_GetWindowWMInfo(win, &wmInfo)) {
71 HWND hwnd = wmInfo.info.win.window;
72// printf("configuring window\n");
73// SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | WS_SYSMENU);
74 }
75}
76#endif
77
78#if defined (LAGRANGE_CUSTOM_FRAME) 67#if defined (LAGRANGE_CUSTOM_FRAME)
79iInt2 cursor_Win32(void) { 68iInt2 cursor_Win32(void) {
80 POINT p; 69 POINT p;
@@ -85,12 +74,17 @@ iInt2 cursor_Win32(void) {
85void processNativeEvent_Win32(const struct SDL_SysWMmsg *msg, iWindow *window) { 74void processNativeEvent_Win32(const struct SDL_SysWMmsg *msg, iWindow *window) {
86 static int winDown_[2] = { 0, 0 }; 75 static int winDown_[2] = { 0, 0 };
87 HWND hwnd = msg->msg.win.hwnd; 76 HWND hwnd = msg->msg.win.hwnd;
88 printf("[syswm] %x\n", msg->msg.win.msg); fflush(stdout); 77 //printf("[syswm] %x\n", msg->msg.win.msg); fflush(stdout);
89 const WPARAM wp = msg->msg.win.wParam; 78 const WPARAM wp = msg->msg.win.wParam;
90 switch (msg->msg.win.msg) { 79 switch (msg->msg.win.msg) {
80 case WM_ACTIVATE: {
81 //LONG style = GetWindowLong(hwnd, GWL_STYLE);
82 //SetWindowLog(hwnd, GWL_STYLE, style);
83 break;
84 }
91 case WM_KEYDOWN: { 85 case WM_KEYDOWN: {
92 if (wp == VK_LWIN) { 86 if (wp == VK_LWIN) {
93 printf("lwin down\n"); fflush(stdout); 87 //printf("lwin down\n"); fflush(stdout);
94 winDown_[0] = iTrue; 88 winDown_[0] = iTrue;
95 } 89 }
96 else if (wp == VK_RWIN) { 90 else if (wp == VK_RWIN) {
diff --git a/src/win32.h b/src/win32.h
index 4b8f00da..27aa0539 100644
--- a/src/win32.h
+++ b/src/win32.h
@@ -31,6 +31,9 @@ iDeclareType(Window)
31void setDPIAware_Win32(void); 31void setDPIAware_Win32(void);
32float desktopDPI_Win32(void); 32float desktopDPI_Win32(void);
33void useExecutableIconResource_SDLWindow(SDL_Window *win); 33void useExecutableIconResource_SDLWindow(SDL_Window *win);
34void processNativeEvent_Win32(const struct SDL_SysWMmsg *msg, iWindow *window);
35 34
35#if defined (LAGRANGE_CUSTOM_FRAME)
36iInt2 cursor_Win32(void); 36iInt2 cursor_Win32(void);
37void processNativeEvent_Win32(const struct SDL_SysWMmsg *msg, iWindow *window);
38void setup_SDLWindow(SDL_Window *);
39#endif