Commit Graph

7316 Commits

Author SHA1 Message Date
Benjamin Otte
cca547e5bc vulkan: Initial support
Adds the gdk_display_ref_vulkan() and gdk_display_unref_vulkan()
functions which setup/tear down VUlkan support for the display.

Nothing is using those functions yet.
2016-12-09 18:35:51 +01:00
William Hua
9a7b0847b9 mir: swap buffers on paint 2016-12-08 15:28:31 -05:00
Benjamin Otte
cd2b898353 wayland: Sync attributes also when drawing with GL
Probably syncing attributes shouldn't happen when drawing in the first
place, but what do I know about Wayland. ¯\_(ツ)_/¯
2016-12-06 18:02:11 +01:00
Benjamin Otte
a85a97c1a1 wayland: Uncomment erroneously commented out code
I read the code as if (use_gl) instead of if (!use_gl) and commented it
out in bddfd7bb41. That broke drawing on
Wayland without OpenGL completely.

Whoops.

Now it's back.
2016-12-06 17:51:35 +01:00
Chun-wei Fan
060365a9bb GDK/Win32: Fix build after GDKGL refactoring
There were some parts that need some updates after the refactoring in
GDKGL, so that the code will continue to build and run.

For gdkwindow-win32.c, comment out the parts where we check for use_gl
(which was removed), since we are going to move all drawing to OpenGL,
but don't remove/disable the whole portion as that transition is not
complete at this point.

There a is new GDKGL function that checks for the damaged area of the back
buffer, but since the notion of "damage" is for *NIX (GLX/EGL for
Wayland/mir), meaning that there is no such extension for Windows in this
regard, so we can't support this on Windows as-is, at least for now.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-12-06 16:47:47 +08:00
William Hua
3c2aefddd4 mir: fix type warning 2016-12-05 11:06:32 -05:00
William Hua
32b3928eda mir: fix build failures 2016-12-05 10:28:48 -05:00
William Hua
e27e8e6e1c mir: implement display monitor vfuncs 2016-12-05 09:17:44 -05:00
Benjamin Otte
8915be00d1 gdkgl: Add gdk_gl_context_get_damage()
This is a way to query the damaged area of the backbuffer.

The GL renderer uses this to compute the extents of that damage region
(computed via buffer age) and use them to minimize the area to redraw.

This changes the semantics of GL rendering to "When calling
gdk_window_begin_frame() with a GL context, the area by
gdk_gl_context_get_damage() needs to be redrawn and every other pixel of
the backbuffer is guaranteed to be correct.
After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer
must be correct.

We can always glXBufferSwap() now because of this.
2016-12-05 15:02:47 +01:00
Benjamin Otte
ca78f5d3cb gdk: Make gdk_window_begin_draw_frame() take a draw context
... instead of a gl context.

This requires some refactoring in the way we mark the shared context as
drawing: We now call begin_frame/end_frame() on it and ignore the call
on the main context.
Unfortunately we need to do this check in all vfuncs, which sucks. But I
haven't found a better way.
2016-12-05 15:02:47 +01:00
Benjamin Otte
725a7236c0 gdk: Turn GdkGLContext into a GdkDrawContext 2016-12-05 15:02:47 +01:00
Benjamin Otte
db8e3065bd gdk: Add GdkDrawContext
This will be the base class for GdkVulkanContext and GdkGLContext.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e38bd27d58 gdk: Redo GL drawing
Reenable GL drawing, but do it without Cairo.

Now, the context passed to gdk_window_begin_draw_frame() decides how
drawing is going to happen. If it is NULL, Cairo is used like before.

If a context is passed, Cairo may not be used for drawing and
gdk_drawing_context_get_cairo_context() is going to return NULL.
Instead, the GL renderer must draw to the GL backbuffer and
end_draw_frame() is then swapping that to the front.

The GskGLRenderer has lost the texture it used to render to and adapted
to render directly to the backbuffer instead.

The only thing missing is for GtkGLArea to gain back a performant way to
render. But it didn't have one since the introduction of GSK, this
patchset doesn't change anything about it.

The new rendering avoids two indirections (the GSK renderer's texture
and the GDK double buffering surface).
It improves icon count in the fishbowl demo by 30%.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e87b472143 glcontext: Make begin/end_draw() paired
This way, we can query the GL context's state via
gdk_gl_context_is_drawing().

Use this function to make GL contexts as attached and grant them access
to the front/backbuffer for rendering.

All of this is still unused because GL drawing is still disabled.
2016-12-05 15:02:47 +01:00
Benjamin Otte
182d18bcd1 gdk: Large GL refactoring
No visible changes as GL rendering is disabled at the moment.

What was done:

1. Move window->invalidate_for_new_frame to glcontext->begin_frame
This moves the code to where it is used (the GLContext) and prepares it
for being called where it is used when actually beginning to draw the
frame.

2. Get rid of buffer-age usage
We want to let the application render directly to the backbuffer.
Because of that, we cannot make any assumptions about the contents the
application renders outside the clip area.
In particular GskGLRenderer renders random stuff there but not actual
contents.

3. Pass the actual GL context
Previously, we passed the shared context to end_frame, now we pass the
actual GL context that the application uses for rendering. This is so
that the vfuncs could prepare the actual contexts for rendering (they
don't currently).

4. Simplify the code
The previous code set up the final drawing method in begin_frame.
Instead, we now just ensure the clip area is something we can render
and decide on the actual method in end_frame.
This is both more robust (we can change the clip area in between if we
want to) and less code.
2016-12-05 15:02:47 +01:00
Benjamin Otte
4967257f3a gdk: Don't recurse when processing updates
We don't need to send expose events for backwards compatibility anymore.
2016-12-05 15:02:47 +01:00
Benjamin Otte
bddfd7bb41 gdk: Remove all code that only existed because of use_gl
Now that we don't use GL anymore, this code is unnecessary.
2016-12-05 15:02:47 +01:00
Benjamin Otte
77d336de17 gdk: Never draw with GL
This is a temporary switch-off of the GL dawing code that will make
things keep running. All GL related code (like the GSK renderer or
GtkGLArea will now fall back to software.
2016-12-05 15:02:47 +01:00
Benjamin Otte
332ed7be5b API: Require passing a GLContext to begin_draw_frame()
This is in preparation for requiring explicit passing of GL contexts
when drawing.
2016-12-05 15:02:47 +01:00
Benjamin Otte
9c041f6bcc window: Change behavior of gdk_window_begin_draw_frame()
(1) Require a native window
(2) Create the drawing context before calling begin_paint().
2016-12-05 15:02:47 +01:00
Benjamin Otte
a860bbbe46 drawingcontext: Store the GL paint context 2016-12-05 15:02:47 +01:00
Olivier Fourdan
f6b4477393 wayland: destroy subsurfaces along with parents
Wayland subsurfaces can have other native window parents, but those need
to be destroyed along with the rest of the window hierarchy otherwise
an assert() is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=774915
2016-12-05 10:56:41 +01:00
Matthias Clasen
92a1abcd23 wayland: Don't warn if we loose the compositor connection
And instead, exit cleanly. This avoids filling the logs with
these warnings from every single application that has a
connection to the compositor.
2016-11-30 13:45:04 -05:00
Matthias Clasen
1c51da82bd x11: Don't warn if the display is closed
This causes a storm of warnings from all applications in the logs
whenever the display goes away, and is not useful.
2016-11-30 13:45:00 -05:00
Benjamin Otte
efd04b47aa gdk: Make GdkDrawingContext not per-backend
No backend is using it, and we can put the backend-specific drawing code
into GdkGLContext.
2016-11-30 15:52:22 +01:00
Benjamin Otte
bdcfc17c43 gdkwindow: Remove unused vfunc
GdkGLContext knows how to realize itself.
2016-11-30 15:15:08 +01:00
Olivier Fourdan
bd4519922c wayland: Check for subsurface looking up the toplevel
gdk_window_get_toplevel() walks up the windows tree looking for the
corresponding toplevel window, but needs to account for subsurfaces as
well on Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=775319
2016-11-30 10:05:47 +01:00
William Hua
3efbb75619 mir: fix build failures 2016-11-27 21:31:21 -05:00
Benjamin Otte
624e0e1409 gdk: Rewrite docs some more
Now gdk_window_process_updates() isn't mentioned either.

GDK takes care of redrawing, not you!
2016-11-24 18:31:11 +01:00
Benjamin Otte
4b6e70b9c8 gdk: Get rid of all mentions of process_all_updates() 2016-11-24 15:26:49 +01:00
Olivier Fourdan
39200e75b6 wayland: Place subsurfaces relative to their parent
Now that subsurfaces can be created as child of another GdkWindow (and
not just the root window), they must be placed according to the location
of their parent, i.e. the abs_x/abs_y must be updated and taken int
account when placing and moving subsurfaces under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=774917
2016-11-24 09:32:41 +01:00
Benjamin Otte
ae29d4db5a gdk: Use stricter checks for begin_draw_frame()
We don't support drawing on child windows, so make sure nobody tries.
2016-11-24 04:43:42 +01:00
Matthias Clasen
3414f10bad Drop the GDK_PRIVATE_CALL mechanism
We don't need to do this extra complication anymore, since
we're now living inside a single shared library.
2016-11-23 19:31:16 -05:00
Benjamin Otte
0cb35bf394 gdk: Only draw toplevels
Simplify gdk_window_paint_on_clock () to only draw the toplevel. We do
no longer draw child windows and offscreens no longer exist.
2016-11-23 19:32:27 +01:00
Benjamin Otte
2a27b7ecc6 API: Remove gdk_window_process_all_updates()
It's completely unused since we have a frame clock.
2016-11-23 19:10:34 +01:00
Benjamin Otte
ef75ca2d53 API: gdk: Remove gdk_window_process_updates()
We have a frame clock now.
2016-11-23 19:02:58 +01:00
Benjamin Otte
4dedafb79b drawingcontext: Add a private struct
This is to control what backends can and cannot access.
2016-11-23 18:49:48 +01:00
Benjamin Otte
b7869c65a8 gdk: Move GdkDrawingContext definition to gdktypes.h 2016-11-23 18:48:15 +01:00
Andrew Chadwick
368e0117ed wintab: init only after the display is assigned
Only attempt to initialize Wintab after the display manager announces
that the first default display has been set. Fixes a segfault during
initialization of specific tablet drivers' wintab32.dlls. Add assertions
and verbose comments explaining this nonsense because this stuff is a
pain to have to keep fixing.

https://bugzilla.gnome.org/show_bug.cgi?id=774379
2016-11-22 12:50:32 +01:00
Andrew Chadwick
8fb9d1578d wintab tilt: Check return location for validity
https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 12:16:19 +01:00
Andrew Chadwick
9e3bd03d3e win32: Fix tilt from Wintab devices
Move the orientation sanity-checks into the packet decode func.
Rationale: the packet handling func may otherwise read beyond the end of
device->last_axis_data.

Also expand them to cope with my test Huion's weird reporting.

Also correct the azimuth angle to align with GDK's presentation.

Most importantly, fix annoying comment typo.

https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 11:21:06 +01:00
Andrew Chadwick
6e197afc44 wintab: fix skipping of odd-numbered devices
Fix a regression introduced in 4ce6d10601
which causes devices with an odd-numbered zero-based index in the list
to be passed over incorrectly. This might present as yet another "device
does not send pressure" bug for ~50% of devices out there.

This commit also closes off another potential segfault for wintab_devices
lists which have an odd length.

https://bugzilla.gnome.org/show_bug.cgi?id=774699
2016-11-21 19:11:09 +01:00
Chun-wei Fan
724e7f48e7 gdk/win32/gdkwindow-win32.c: Fix build
Fix the assignment of ->create_draw_context, in which an underscore is
accidently added.
2016-11-21 15:40:28 +08:00
Chun-wei Fan
18b1305d08 build: Complete renaming of broadwayd to gtk4-broadwayd
The parts where the Visual Studio projects are generated must also be updated
so that 'make dist' will work properly.
2016-11-21 15:09:35 +08:00
Benjamin Otte
e62a4d8eea API: gdk: Remove ability to render window contents
The functions gdk_pixbuf_get_from_window() and
gdk_cairo_set_source_window() are unreliable and depend on the windowing
system (they work great on X11 and Win32, less so on Quartz and Wayland).

With the switch to new drawing API and OpenGL, we can definitely no
longer support a generic way to snapshot windows.

People should either write windowsystem-specific code or draw their
widgets directly - like with gtk_widget_draw() - if they need to get a
rendering.
2016-11-20 11:47:44 +01:00
Benjamin Otte
1492175a28 window: Remove unused destroy_draw_context vfunc 2016-11-20 07:27:00 +01:00
Benjamin Otte
cb18752f94 gdk: Make each backend have a custom GdkDrawingContext subclass 2016-11-20 07:19:52 +01:00
Matthias Clasen
b15bc437a6 Rename broadwayd to gtk4-broadwayd
This was the last unprefixed binary, and it was causing file
conflicts between gtk3 and gtk4.
2016-11-18 13:40:37 -05:00
Olivier Fourdan
36575a4424 gdkwindow: Allow native subsurface for all parents
Under Wayland, a subsurface can have another surface as parent, but
gdk would not allow native windows if the parent is not the root window.

Allow native subsurface for all parent under Wayland, not just for the
root window.

https://bugzilla.gnome.org/show_bug.cgi?id=774475
2016-11-18 13:25:36 -05:00
Carlos Garnacho
665c3a2877 wayland: Keep last scale factor on surfaces after it left all outputs
This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=774476
2016-11-18 13:24:31 -05:00
Benjamin Otte
c162b87ebd gdk: Fix a variable
The passed in surface is the current_paint surface, so I guess this
usage hasn't been noticed.
2016-11-17 22:11:33 +01:00
Carlos Garnacho
f90dcb33f9 gdk: Fix win32 build typo
We've left libgdk-3 behind. Noticed by Andrew Chadwick, spotted
by Emmanuele Bassi.
2016-11-15 17:09:30 +01:00
Andrew Chadwick
83712a48f4 win32: remove an unused func operating on GdkColor
https://bugzilla.gnome.org/show_bug.cgi?id=774347
2016-11-14 14:11:36 -05:00
Olivier Fourdan
4ae1eab3b1 Revert "gdkwindow: configure native windows in move_native_children()"
This reverts commit 9e2b1ad39e.
2016-11-14 12:24:18 +01:00
Olivier Fourdan
5ccc570cca Revert "gdk: Get rid of unused variables"
This reverts commit 7016409e9f.
2016-11-14 12:24:18 +01:00
Chun-wei Fan
fcd216a409 gdkscreen-win32.c: Also define _WIN32_WINNT
As in the last commit on gdkdisplay-win32.c, we need to define that to be
0x0600 (Vista) or later so that the items needed in the Windows headers be
activated.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 21:06:01 +08:00
Chun-wei Fan
718efc2f59 gdkdisplay-win32.c: Define _WIN32_WINNT
... to be for Vista (0x0600) or later.  This is so that the necessary
items in the Windows headers be activated so that the code will build
properly on mingw-w64, and we already require Vista or later for GTK+.

Thanks Ting-Wei Lan for pointing this out.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 20:58:16 +08:00
Massimo Valentini
8121860251 GdkGLContext: chain finalize handler
https://bugzilla.gnome.org/show_bug.cgi?id=773979
2016-11-10 14:34:31 -05:00
Florian Müllner
d163aba030 gdkdisplay-wayland: Add API to set startup notification ID
For wayland clients, the startup notification ID is currently only set
from the DESKTOP_STARTUP_ID environment variable. As that variable is
only set for clients launched via exec(), startup completion is not
indicated correctly for DBus-activated applications unless an explicit
ID is specified - usually that is not the case, as the default handling
uses gdk_notify_startup_complete().
To address this, we need API to set the startup notification ID from GTK
as we have on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Chun-wei Fan
e470567fd0 gdkprivate-win32.h: Complete removal of attributes_mask
We removed this parameter from the function declaration, but not the
prototype.  Fix that.
2016-11-07 14:37:32 +08:00
Benjamin Otte
b04e25f29b gdk: gdk_window_new() is not called for foreign windows
So we can remove the special cases that were used for them.
2016-11-07 03:15:00 +01:00
Benjamin Otte
d2c26c471c gdk: Remove attributes_mask from gdk_window_new()
The only remaining values were always treated as 0, so we just hardcode
them to 0.
2016-11-07 01:33:43 +01:00
Benjamin Otte
9fe8b1e112 API: gdk: Remove gdk_window_new()
It's finally no longer public API.
2016-11-07 01:12:47 +01:00
Benjamin Otte
3b93773add API: gdk: Add gdk_window_new_temp()
Your one stop shop for all those nasty hidden input-only windows.
2016-11-07 01:03:17 +01:00
Benjamin Otte
24d0baec38 API: gdk: Add gdk_window_new_popup()
... and use it.
2016-11-06 23:47:56 +01:00
Benjamin Otte
b30afff511 API: wayland: Add gdk_wayland_window_new_subsurface()
... and use it instead of gdk_window_new().
2016-11-06 21:36:43 +01:00
Benjamin Otte
87f07bac6b API: gdk: Add gdk_window_new_toplevel()
... and use it in GTK.
2016-11-06 17:40:59 +01:00
Benjamin Otte
7a6cab14eb gdkwindow: Remove GdkWindowAttr.type_hint
Instead, let the callers call gdk_window_set_type_hint(). Which is
surprsingly what every backend did.
2016-11-06 16:22:21 +01:00
Benjamin Otte
b7619a2603 x11: Set override_redirect on input-only windows
b9955cfff1 broke this.
2016-11-06 15:43:06 +01:00
John Ralls
2c642dd654 Update gdk-quartz functions for the demise of GdkDeviceManager. 2016-11-05 15:08:59 -07:00
John Ralls
2b53583e80 Remove screen height and width functions from gdk-quartz.
Since they were previously deleted from gdk.
2016-11-05 15:08:59 -07:00
John Ralls
a45f96e9cb Update GdkOSXVersion enum with the last 4 MacOS releases. 2016-11-05 15:08:59 -07:00
Benjamin Otte
a659bbecb9 win32: Remove unused headers 2016-11-05 03:35:36 +01:00
Benjamin Otte
9707f4d3b3 API: gdk: Remove title from gdk_window_new()
Use gdk_window_set_title() afterwards instead.
2016-11-05 03:32:27 +01:00
Benjamin Otte
b9955cfff1 API: gdk: Remove override_redirect flag from GdkWindowAttr
When you want an override-redirect window, you create it that way by
creating a GDK_WINDOW_TEMP window.
2016-11-05 03:32:27 +01:00
Benjamin Otte
33e7a7898f API: gdk: Remove gdk_window_set_override_redirect()
When you want an override-redirect window, you create it that way.
Changing that behavior is not supported anywhere (but on X of course).
2016-11-05 03:32:27 +01:00
Matthias Clasen
338534fb8d Fix up the fullscreen_on_monitor support
I didn't pay attention, and forgot to port this code to the
new monitor apis.
2016-11-04 12:41:51 -04:00
Rui Matos
b8fc4c246a gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
This way we can recommend that applications use the
fullscreen_on_monitor() API on both X and Wayland otherwise they'd
have to keep a path for each backend to achieve this functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=773857
2016-11-04 12:10:43 -04:00
Руслан Ижбулатов
e75878f976 W32: Fix malformed svg file
https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 13:36:34 +00:00
Chun-wei Fan
6abd65c83b GDK-Win32/4.0: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays.  Notes for the current
work:

-The DPI awareness enabling can be disabled if and only if an application
 manifest is not embedded in the app to enable DPI awareness AND a user
 compatibility setting is not set to limit DPI awareness for the app, via
 the envvar GDK_WIN32_DISABLE_HIDPI.  The app manifest/user setting for
 DPI awareness will always win against the envvar, and so the HiDPI items
 will be always setup in such scenarios, unless DPI awareness is disabled.

-Both automatic detection for the scaling factor and setting the scale
 factor using the GDK_SCALE envvar are supported, where the envvar takes
 precedence, which will therefore disable automatic scaling when
 resolution changes.

-We now default to a per-system DPI awareness model, which means that we
 do not handle WM_DPICHANGED, unless one sets the
 GDK_WIN32_PER_MONITOR_HIDPI envvar, where notes for it are in the
 following point.

-Automatic scaling during WM_DISPLAYCHANGE is handled (DPI setting change of
 current monitor) is now supported.  WM_DPICHANGED is handled as well,
 except that the window positioning during the change of scaling still
 needs to be refined, a change in GDK itself may be required for this.

-I am unable to test the wintab items because I don't have such devices
 around.

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 18:14:48 +08:00
Chun-wei Fan
3baa4a9741 gdkscreen-win32.c: Remove leftovers of removal of visual APIs
There were some more items that ought to be removed.  Remove them.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-04 17:28:12 +08:00
Benjamin Otte
4b88b81e67 x11: Init no-multihead monitor without root window
Previous code gave warnings because the root window wasn't initialized
yet.
2016-11-04 00:33:13 +01:00
Benjamin Otte
7c474c689a wayland: Remove all mentions of visuals 2016-11-04 00:17:57 +01:00
Benjamin Otte
77a9e90cb9 mir: Remove all mentions of visuals 2016-11-04 00:15:52 +01:00
Benjamin Otte
8040d78c04 broadway: Remove all mentions of visuals 2016-11-04 00:15:07 +01:00
Benjamin Otte
31a0933fe9 quartz: Remove all mentions of visuals 2016-11-04 00:10:43 +01:00
Benjamin Otte
ec06a717ce win32: Remove all mentions of visuals 2016-11-04 00:08:03 +01:00
Benjamin Otte
4585af5719 gdk: Remove visual APIs from GdkScreen
gdk_screen_list_visuals(), gdk_screen_get_system_visual() and
gdk_screen_get_rgba_visual() are gone now.
2016-11-04 00:02:37 +01:00
Benjamin Otte
fe08641205 x11: Maointin window visuals without GdkVisual
That way, we don't need a GdkScreen to create a GdkWindow anymore.
2016-11-03 23:54:39 +01:00
Benjamin Otte
b741d32262 x11: Remove unused hash table
We were neatly populating it, but nobody ever looked at it.
2016-11-03 22:47:42 +01:00
Benjamin Otte
0192f93689 x11: Replace gdk_display_get_window_visual()
... with functions that don't use GdkVisual.

A small step towards getting rid of GdkVisual.
2016-11-03 22:40:36 +01:00
Benjamin Otte
d8d8059ee1 x11: Use X11 variables instead of GDK variables
This way, we avoid GdkVisual usage.
2016-11-03 20:33:33 +01:00
Benjamin Otte
4ebcb6fd1e x11: Remove unused complexity
With all Windows having the same visual, there's only ever one visual we
need to check.
2016-11-03 20:33:33 +01:00
Chun-wei Fan
53077f15d8 autotools: Update MSVC gir build script generation
Now that GTK+ is built as a single DLL, and the .lib that is built is
gtk-4.lib, we need to update the autotools sections in generating the
NMake Makefile snippets so that we can have the correct commands and flags
for building the .gir files, which will all now link to gtk-4-vsXX.dll (or
so).
2016-11-03 18:00:03 +08:00
Chun-wei Fan
abef8d4860 Windows: Update code for monolithic GTK DLL
Now that the autotools build folded the GDK/GSK bits into the main GTK+
DLL, there are some updates that need to be done for this.  We need to:

-Fold the DllMain() of GDK-Win32 into the main GTK+ DllMain(), as we need
 the HINSTANCE to register the window.  We can't have two DllMain()'s in a
 single DLL.
-Remove the GDK rc(.in) files, as that is not used anymore.  Make the GTK+
 .rc(.in) file load the gtk.ico GTK+ logo file instead so that we still
 get the GTK+ logo for the application icon by default.  Update the
 autotools build files as well.
-Revert commit b9f9980 as LRN pointed out in comment 25 in bug 773299, as
 GTK+ is now a monolithic DLL, and we ought not to export this private
 function.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-03 16:55:35 +08:00
Olivier Fourdan
2324b96a32 wayland: check valid pending cairo surface
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.

If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.

This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:50:34 +01:00
Chun-wei Fan
2d7df8e66a 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
2016-11-02 15:37:10 +08:00
Juan Pablo Ugarte
c607d51890 Use GLSL version 110 for OpenGL 2 shaders.
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1

Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 15:42:46 -03:00
Matthias Clasen
7a2537866b Drop GdkColor
It is deprecated and no longer used.
2016-11-01 13:58:11 -04:00
Benjamin Otte
3d8b00600e gdkgl: Change prototype of function
The function does not upload a cairo surface, it uploads pixel data.

So don't take a cairo surface as an argument, take pixel data.
2016-11-01 16:32:26 +01:00