forked from AuroraMiddleware/gtk
Revert "W32: RGBA GDK backend (broken)"
This reverts commit f89d38bc2d
.
Pushed by accident.
This commit is contained in:
parent
dd8612227f
commit
b1012256f2
19
configure.ac
19
configure.ac
@ -363,25 +363,6 @@ fi
|
|||||||
AC_SUBST(ENABLE_ON_X11)
|
AC_SUBST(ENABLE_ON_X11)
|
||||||
|
|
||||||
if test "$enable_win32_backend" = "yes"; then
|
if test "$enable_win32_backend" = "yes"; then
|
||||||
AC_MSG_CHECKING([for DWM])
|
|
||||||
AC_LINK_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([[
|
|
||||||
#include <windows.h>
|
|
||||||
#include <dwmapi.h>
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
DWM_BLURBEHIND bb;
|
|
||||||
memset (&bb, 0, sizeof (bb));
|
|
||||||
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
|
|
||||||
]]
|
|
||||||
)],
|
|
||||||
[dwm_ok=yes], [dwm_ok=no]
|
|
||||||
)
|
|
||||||
AC_MSG_RESULT($dwm_ok)
|
|
||||||
if test "$dwm_ok" = "yes"; then
|
|
||||||
AC_DEFINE([HAVE_W32_DWM], [1], [Define if W32 DWM API is available])
|
|
||||||
fi
|
|
||||||
|
|
||||||
cairo_backends="$cairo_backends cairo-win32"
|
cairo_backends="$cairo_backends cairo-win32"
|
||||||
GDK_BACKENDS="$GDK_BACKENDS win32"
|
GDK_BACKENDS="$GDK_BACKENDS win32"
|
||||||
backend_immodules="$backend_immodules,ime"
|
backend_immodules="$backend_immodules,ime"
|
||||||
|
@ -211,7 +211,7 @@ gdk_win32_screen_class_init (GdkWin32ScreenClass *klass)
|
|||||||
screen_class->get_monitor_geometry = gdk_win32_screen_get_monitor_geometry;
|
screen_class->get_monitor_geometry = gdk_win32_screen_get_monitor_geometry;
|
||||||
screen_class->get_monitor_workarea = gdk_win32_screen_get_monitor_geometry;
|
screen_class->get_monitor_workarea = gdk_win32_screen_get_monitor_geometry;
|
||||||
screen_class->get_system_visual = _gdk_win32_screen_get_system_visual;
|
screen_class->get_system_visual = _gdk_win32_screen_get_system_visual;
|
||||||
screen_class->get_rgba_visual = _gdk_win32_screen_get_system_visual;
|
screen_class->get_rgba_visual = gdk_win32_screen_get_rgba_visual;
|
||||||
screen_class->is_composited = gdk_win32_screen_is_composited;
|
screen_class->is_composited = gdk_win32_screen_is_composited;
|
||||||
screen_class->make_display_name = gdk_win32_screen_make_display_name;
|
screen_class->make_display_name = gdk_win32_screen_make_display_name;
|
||||||
screen_class->get_active_window = gdk_win32_screen_get_active_window;
|
screen_class->get_active_window = gdk_win32_screen_get_active_window;
|
||||||
|
@ -194,6 +194,7 @@ _gdk_visual_init (GdkScreen *screen)
|
|||||||
}
|
}
|
||||||
else if (bitspixel == 24 || bitspixel == 32)
|
else if (bitspixel == 24 || bitspixel == 32)
|
||||||
{
|
{
|
||||||
|
bitspixel = 24;
|
||||||
system_visual->type = GDK_VISUAL_TRUE_COLOR;
|
system_visual->type = GDK_VISUAL_TRUE_COLOR;
|
||||||
system_visual->red_mask = 0x00FF0000;
|
system_visual->red_mask = 0x00FF0000;
|
||||||
system_visual->green_mask = 0x0000FF00;
|
system_visual->green_mask = 0x0000FF00;
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
#include "gdkdisplayprivate.h"
|
#include "gdkdisplayprivate.h"
|
||||||
#include "gdkvisualprivate.h"
|
#include "gdkvisualprivate.h"
|
||||||
#include "gdkwin32window.h"
|
#include "gdkwin32window.h"
|
||||||
#ifdef HAVE_W32_DWM
|
|
||||||
#include <dwmapi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cairo-win32.h>
|
#include <cairo-win32.h>
|
||||||
|
|
||||||
@ -687,45 +684,6 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
|||||||
|
|
||||||
if (attributes_mask & GDK_WA_CURSOR)
|
if (attributes_mask & GDK_WA_CURSOR)
|
||||||
gdk_window_set_cursor (window, attributes->cursor);
|
gdk_window_set_cursor (window, attributes->cursor);
|
||||||
|
|
||||||
/* HAVE_W32_DWM means that we have necessary declarations at compile-time,
|
|
||||||
* but we'd still like to be able to run on XP, so we'll load the only non-XP
|
|
||||||
* function we need here at runtime.
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_W32_DWM
|
|
||||||
{
|
|
||||||
typedef HRESULT (WINAPI *PFN_DwmEnableBlurBehindWindow)(HWND,
|
|
||||||
const DWM_BLURBEHIND *);
|
|
||||||
HMODULE dwmdll;
|
|
||||||
PFN_DwmEnableBlurBehindWindow dwmEnableBlurBehindWindow = NULL;
|
|
||||||
|
|
||||||
dwmdll = GetModuleHandle ("dwmapi.dll");
|
|
||||||
dwmEnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow)
|
|
||||||
GetProcAddress (dwmdll, "DwmEnableBlurBehindWindow");
|
|
||||||
|
|
||||||
if (dwmEnableBlurBehindWindow)
|
|
||||||
{
|
|
||||||
/* Enable blurbehind, but give it an empty region, leaving us
|
|
||||||
with all the transparency with none of the blur */
|
|
||||||
DWM_BLURBEHIND bb;
|
|
||||||
HRGN hRgn;
|
|
||||||
hRgn = CreateRectRgn (0, 0, -1, -1);
|
|
||||||
if (hRgn != NULL)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
memset (&bb, 0, sizeof (bb));
|
|
||||||
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
|
|
||||||
bb.hRgnBlur = hRgn;
|
|
||||||
bb.fEnable = TRUE;
|
|
||||||
hr = dwmEnableBlurBehindWindow (GDK_WINDOW_HWND (window), &bb);
|
|
||||||
if (S_OK != hr)
|
|
||||||
g_warning ("%s: %s failed: %" G_GINT64_MODIFIER "x", G_STRLOC,
|
|
||||||
"DwmEnableBlurBehindWindow", (guint64) hr);
|
|
||||||
DeleteObject (hRgn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkWindow *
|
GdkWindow *
|
||||||
@ -3429,7 +3387,7 @@ gdk_win32_ref_cairo_surface (GdkWindow *window)
|
|||||||
if (!hdc)
|
if (!hdc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
impl->cairo_surface = cairo_win32_surface_create_with_alpha (hdc);
|
impl->cairo_surface = cairo_win32_surface_create (hdc);
|
||||||
|
|
||||||
cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key,
|
cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key,
|
||||||
impl, gdk_win32_cairo_surface_destroy);
|
impl, gdk_win32_cairo_surface_destroy);
|
||||||
|
Loading…
Reference in New Issue
Block a user