Ecore_Win32: let cursors on the non-client area (the borders) be like the default...
authorVincent Torri <vincent dot torri at gmail dot com>
Sat, 12 Dec 2015 12:41:04 +0000 (13:41 +0100)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 14 Dec 2015 02:14:51 +0000 (11:14 +0900)
After the support of the X11 cursors on Windows, the cursors were set for the whole
window (even the borders). Now we let the system use the default cursors for the borders
and we use the cursors set by the API for the client area only

src/lib/ecore_win32/ecore_win32.c

index 069c596..1cdbed5 100644 (file)
@@ -339,6 +339,18 @@ _ecore_win32_window_procedure(HWND   window,
            Ecore_Win32_Window *w;
 
            INF("SetCursor");
+
+           /*
+            * Do not change the cursors on the non client area
+            * we are in the client area if and only if LOWORD(data_param) == 1
+            */
+           if (LOWORD(data_param) != 1)
+             return DefWindowProc(window, message, window_param, data_param);
+
+           /*
+            * Otherwise, we use the cursors set by the API for the
+            *current window
+            */
            w = (Ecore_Win32_Window *)GetWindowLongPtr(window, GWLP_USERDATA);
            if (w && w->cursor)
              {