window->shape.mask);
}
- if (strcmp(ee->driver, "direct3d") == 0)
+ /* Nothing to be done for the GDI backend at the evas level */
+
+#ifdef BUILD_ECORE_EVAS_SOFTWRE_DDRAW
+ if (strcmp(ee->driver, "software_ddraw") == 0)
{
-#ifdef BUILD_ECORE_EVAS_DIRECT3D
- Evas_Engine_Info_Direct3D *einfo;
+ Evas_Engine_Info_Software_DDraw *einfo;
- einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee));
+ einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ecore_evas_get(ee));
if (einfo != NULL)
{
einfo->info.fullscreen = !!on;
- einfo->info.layered = window->shape.layered;
+/* einfo->info.layered = window->shape.layered; */
evas_engine_info_set(ecore_evas_get(ee), (Evas_Engine_Info *)einfo);
}
-#endif /* BUILD_ECORE_EVAS_DIRECT3D */
}
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
- if (strcmp(ee->driver, "software_ddraw") == 0)
+#ifdef BUILD_ECORE_EVAS_DIRECT3D
+ if (strcmp(ee->driver, "direct3d") == 0)
{
-#ifdef BUILD_ECORE_EVAS_SOFTWRE_DDRAW
- Evas_Engine_Info_Software_DDraw *einfo;
+ Evas_Engine_Info_Direct3D *einfo;
- einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ecore_evas_get(ee));
+ einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee));
if (einfo != NULL)
{
einfo->info.fullscreen = !!on;
-/* einfo->info.layered = window->shape.layered; */
+ einfo->info.layered = window->shape.layered;
evas_engine_info_set(ecore_evas_get(ee), (Evas_Engine_Info *)einfo);
}
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
}
+#endif /* BUILD_ECORE_EVAS_DIRECT3D */
}
{
wnd->shape.layered = 0;
#if defined(WS_EX_LAYERED)
- if (!SetWindowLong(wnd->window, GWL_EXSTYLE,
- GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)))
+ SetLastError(0);
+ if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
+ GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
+ (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!RedrawWindow(wnd->window, NULL, NULL,
version_info.dwOSVersionInfoSize = sizeof(version_info);
if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5)
{
- if (!SetWindowLong(wnd->window, GWL_EXSTYLE,
- GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED))
+ SetLastError(0);
+ if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
+ GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
+ (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
wnd->shape.layered = 1;
EINA_ERROR_PINFO("showing window\n");
- if (!ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- return;
- }
+ ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
{
EINA_ERROR_PERR("UpdateWindow() failed\n");
}
- if (!SendMessage(((struct _Ecore_Win32_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
- {
- EINA_ERROR_PERR("SendMessage() failed\n");
- }
}
/* FIXME: seems to block the taskbar */
EINA_ERROR_PINFO("hiding window\n");
- if (!ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- }
- if (!SendMessage(((struct _Ecore_Win32_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
- {
- EINA_ERROR_PERR("SendMessage() failed\n");
- }
+ ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
}
void
EINA_ERROR_PINFO("iconifying window: %s\n", on ? "yes" : "no");
- if (!ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- }
+ ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
ew->iconified = on;
}
((!ew->borderless) && (!on)))
return;
- EINA_ERROR_PINFO("setting window border: %s\n", on ? "yes" : "no");
+ EINA_ERROR_PINFO("setting window without border: %s\n", on ? "yes" : "no");
w = ew->window;
style = GetWindowLong(w, GWL_STYLE);
if (on)
{
- SetWindowLong(w, GWL_STYLE, style & ~WS_CAPTION);
+ if (!GetClientRect(w, &rect))
+ {
+ EINA_ERROR_PERR("GetClientRect() failed\n");
+ return;
+ }
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style & ~WS_CAPTION) && (GetLastError() != 0))
+ {
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ return;
+ }
}
else
{
EINA_ERROR_PERR("AdjustWindowRect() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_STYLE, style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
}
}
style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
style |= WS_VISIBLE | WS_POPUP;
- if (!SetWindowLong(w, GWL_STYLE, style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_EXSTYLE, WS_EX_TOPMOST))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
}
else
{
- if (!SetWindowLong(w, GWL_STYLE, ew->style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_EXSTYLE, 0))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_NOTOPMOST,
}
SetLastError(0);
- if (!SetWindowLong(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
+ if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
DestroyWindow(w->window);
free(w);
return NULL;