mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
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
This commit is contained in:
parent
b9f9980bb4
commit
2d7df8e66a
@ -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);
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user