[gtk+] Revert "W32: RGBA GDK backend (broken)"
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "W32: RGBA GDK backend (broken)"
- Date: Thu, 10 Apr 2014 18:00:43 +0000 (UTC)
commit b1012256f238f2958ce3cf0fec56dc2692b4ce56
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Apr 10 17:59:48 2014 +0000
Revert "W32: RGBA GDK backend (broken)"
This reverts commit f89d38bc2d139ae1baab5c25e1d6ac451a2d5a5e.
Pushed by accident.
configure.ac | 19 ------------------
gdk/win32/gdkscreen-win32.c | 2 +-
gdk/win32/gdkvisual-win32.c | 1 +
gdk/win32/gdkwindow-win32.c | 44 +------------------------------------------
4 files changed, 3 insertions(+), 63 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0556016..462bcca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -363,25 +363,6 @@ fi
AC_SUBST(ENABLE_ON_X11)
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"
GDK_BACKENDS="$GDK_BACKENDS win32"
backend_immodules="$backend_immodules,ime"
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index d2c2dea..8cab471 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -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_workarea = gdk_win32_screen_get_monitor_geometry;
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->make_display_name = gdk_win32_screen_make_display_name;
screen_class->get_active_window = gdk_win32_screen_get_active_window;
diff --git a/gdk/win32/gdkvisual-win32.c b/gdk/win32/gdkvisual-win32.c
index 6f84db3..34ee434 100644
--- a/gdk/win32/gdkvisual-win32.c
+++ b/gdk/win32/gdkvisual-win32.c
@@ -194,6 +194,7 @@ _gdk_visual_init (GdkScreen *screen)
}
else if (bitspixel == 24 || bitspixel == 32)
{
+ bitspixel = 24;
system_visual->type = GDK_VISUAL_TRUE_COLOR;
system_visual->red_mask = 0x00FF0000;
system_visual->green_mask = 0x0000FF00;
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 307a1fb..aa8f591 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -38,9 +38,6 @@
#include "gdkdisplayprivate.h"
#include "gdkvisualprivate.h"
#include "gdkwin32window.h"
-#ifdef HAVE_W32_DWM
-#include <dwmapi.h>
-#endif
#include <cairo-win32.h>
@@ -687,45 +684,6 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
if (attributes_mask & GDK_WA_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 *
@@ -3429,7 +3387,7 @@ gdk_win32_ref_cairo_surface (GdkWindow *window)
if (!hdc)
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,
impl, gdk_win32_cairo_surface_destroy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]