[gtk+] gdk/win32: Complete gdk_screen_is_composited() removal
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk/win32: Complete gdk_screen_is_composited() removal
- Date: Wed, 2 Nov 2016 07:37:22 +0000 (UTC)
commit 2d7df8e66a59a140aff623c27d91f409ba668f38
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Nov 1 16:42:31 2016 +0800
gdk/win32: Complete gdk_screen_is_composited() removal
Commit d249e77 (API: screen: Remove gdk_screen_is_composited()) attempted
to update the GDK-Win32 for the removal of the API, but some parts were
missed. This updates the code so that things continue to build and run.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
gdk/win32/gdkdisplay-win32.c | 4 ++++
gdk/win32/gdkevents-win32.c | 1 +
gdk/win32/gdkglcontext-win32.c | 5 ++---
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 422a831..ad40ea3 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -28,6 +28,8 @@
#include "gdkmonitor-win32.h"
#include "gdkwin32.h"
+#include <dwmapi.h>
+
static int debug_indent = 0;
static GdkMonitor *
@@ -399,6 +401,8 @@ _gdk_win32_display_open (const gchar *display_name)
win32_display = GDK_WIN32_DISPLAY (_gdk_display);
win32_display->screen = g_object_new (GDK_TYPE_WIN32_SCREEN, NULL);
+ if (gdk_screen_get_rgba_visual (win32_display->screen) == NULL)
+ gdk_display_set_rgba (_gdk_display, FALSE);
_gdk_events_init (_gdk_display);
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index d7899d9..411bd0f 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -50,6 +50,7 @@
#include "gdkwin32.h"
#include "gdkkeysyms.h"
#include "gdkdevicemanager-win32.h"
+#include "gdkdisplay-win32.h"
#include "gdkdeviceprivate.h"
#include "gdkdevice-wintab.h"
#include "gdkwin32dnd.h"
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index a153b9b..ee80e0d 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -777,7 +777,6 @@ _gdk_win32_display_make_gl_context_current (GdkDisplay *display,
GdkWin32GLContext *context_win32;
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
GdkWindow *window;
- GdkScreen *screen;
gboolean do_frame_sync = FALSE;
@@ -806,8 +805,8 @@ _gdk_win32_display_make_gl_context_current (GdkDisplay *display,
* the swap when drawing on the offscreen, rendering to the screen
* happens later anyway, and its up to the compositor to sync that
* to the vblank. */
- screen = gdk_window_get_screen (window);
- do_frame_sync = ! gdk_screen_is_composited (screen);
+ display = gdk_window_get_display (window);
+ do_frame_sync = ! gdk_display_is_composited (display);
if (do_frame_sync != context_win32->do_frame_sync)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]