Commit Graph

7317 Commits

Author SHA1 Message Date
Rui Matos
ae61220c9f gdk/wayland: Handle non-existant gsettings keys
Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:32 +01:00
Rui Matos
b46da27d34 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:27 +01:00
William Hua
57a11ca28d mir: fix compile-time warnings 2017-01-09 17:55:31 -05:00
William Hua
a50a98f38b mir: properly handle empty clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-09 12:04:48 -05:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Benjamin Otte
7ade6e3f46 gdk: Remove testing functions
They were unused and unimplemented.
2017-01-08 03:46:30 +01:00
Benjamin Otte
4749eedc08 docs: Remove a line that's not true anymore 2017-01-08 00:48:13 +01:00
Benjamin Otte
bc797f38f5 gdk: Remove unused debug category 2017-01-08 00:48:12 +01:00
Georges Basile Stavracas Neto
fc1cfd569a vulkancontext: Improve debug output 2017-01-06 02:02:08 -02:00
Georges Basile Stavracas Neto
ea952a6ec3 vulkancontext: Never abort on validation layer debug
Validation layers should never interfere on application
execution.
2017-01-06 02:01:58 -02:00
William Hua
384fe52e96 mir: paste clipboard data from content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-05 17:57:36 -05:00
William Hua
516c0a2aab mir: copy clipboard data to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-05 17:57:36 -05:00
William Hua
dcda372c15 mir: connect to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-05 17:57:36 -05:00
William Hua
440e80c832 mir: track focused window
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-05 17:57:36 -05:00
William Hua
ed0bd0bba2 mir: implement window properties
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-05 17:57:36 -05:00
Georges Basile Stavracas Neto
a001ddf7bf vulkan: Use LGPL v2 2017-01-04 16:02:44 -02:00
Georges Basile Stavracas Neto
c6ec982ac6 vulkan: Turn headers to LGPL 2017-01-04 18:40:20 +01:00
Benjamin Otte
f74490739f vulkan: Create required number of swapchain images
Wayland has minImageCount == 4, so us just creating 2 images is not very
nice. So we don't do that anymore.
2017-01-04 18:38:40 +01:00
Benjamin Otte
efc5f8dc47 gdkvulkan: Track if we reffed the display's vulkan data
When reffing the display fails in init, we were still trying to unref
it. Which obviously failed and spewed warnings to stderr.
2017-01-04 18:26:14 +01:00
Georges Basile Stavracas Neto
3887548d55 wayland: Add support for Vulkan renderer
Mirror what's done with the X11 Vulkan renderer implementation,
with the addition of the extra Wayland window synchronization on
end_paint() override.
2017-01-04 13:24:08 +01:00
Georges Basile Stavracas Neto
38d6e45b32 vulkancontext: Assume the window geometry when extents are bogus
When the current extent is -1, we should assume whatever size
the GdkWindow has.
2017-01-04 13:23:48 +01:00
Georges Basile Stavracas Neto
d62e18ac87 vulkancontext: Fix header 2017-01-04 13:23:35 +01:00
Chun-wei Fan
2fdd0cefa5 Visual Studio builds: Support Vulkan builds
This will assume that the Vulkan SDK can be found in the INCLUDE/LIB paths
that are used by the Visual Studio compiler.
2016-12-30 14:42:38 +08:00
Chun-wei Fan
ee2f577991 Visual Studio builds: Drop the Broadway projects
Since the status of the GDK broadway backend is more or less unsupported,
drop the projects that build gtk4-broadwayd and gdk-broadway, and update
the projects to not to refer to them.

However, keep the Broadway configs for now as we will later transform
them to become configs for Vulkan, so bascially besides "installation"
parts and output settings, they will do the same as their Release|Debug
counterparts with no support for Broadway.
2016-12-30 11:09:46 +08:00
Chun-wei Fan
9db5cc9a98 gdk/gdkvulkancontext.c: Avoid VLAs
During the drive to enable Vulkan context creation on Windows, some more
VLAs were found here.  Replace them with g_newa().

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-12-29 17:51:56 +08:00
Chun-wei Fan
c4244ea104 GDK/Win32: Support Vulkan context creation
This adds support to the GDK Win32 backend so that we can support Vulkan
context creation for use in the GSK Vulkan renderer, so that we can test
it on Windows platforms as well.

https://bugzilla.gnome.org/show_bug.cgi?id=776544
2016-12-29 17:48:39 +08:00
Benjamin Otte
293248c1d3 gdkvulkan: Track changes per swapchain image
... and use those in begin_frame() to ensure all of the invalid area
gets invalidated.
2016-12-26 22:24:22 +01:00
Benjamin Otte
b30225e67c vulkan: We use VK_FORMAT_B8G8R8A8_UNORM
... not SRGB. SRGB messes up alpha compositing, GdkRGBA and everything
else.
2016-12-25 06:23:12 +01:00
Benjamin Otte
d58799ff7a gdk: Export gdk_cairo_surface_paint_pixbuf() into private header 2016-12-23 08:11:01 +01:00
Benjamin Otte
071c9a8221 API: gdk: Add gdk_rgba_is_clear() and gdk_rgba_is_opaque()
I want to use these inside GSK, and I'm not a fan of putting GdkRGBA
APIs into it or duplicating it into GTK.

So public API it is.
2016-12-20 18:01:12 +01:00
Piotr Drąg
a2da4ddceb Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772371
2016-12-19 15:08:10 -05:00
Chun-wei Fan
4a7e7c00c1 GDK/Win32: Fix Windows backend after GdkWindow simplification
Fix the build after the branch wip/alexl/simplify-gdkwindow was merged, as
there are some changes that broke things in the Windows backend, namely:

-gdk_win32_input_shape_combine_region() should not be removed at this
 point (though it is a stub--otherwise GDK/Win32 will crash)

-Some more code need to be removed due to the removal of items in the
 above-mentioned merged branch

Also, like the X11 backend, do not allow the creation of native child
windows, and stop checking for subsequent child windows
(GDK_WINDOW_CHILD), so that we can clean things up a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-12-19 17:47:47 +08:00
Debarshi Ray
339f6e141a Mention that gdk_window_create_similar_image_surface inherits the scale
https://bugzilla.gnome.org/show_bug.cgi?id=776132
2016-12-17 22:50:18 +01:00
Alexander Larsson
330c7feaa2 gdk: Drop gdk_window_reparent
We're not currently using this, and dropping it allows us to loose
a bunch of code which leads us towards the goal of having GdkWindow
only for toplevels (and reparenting makes not sense for toplevels).
2016-12-16 12:35:03 +01:00
Alexander Larsson
5bf28a3869 gdk: Drop support for native (and thus foreign) subwindows
We can't really support these on e.g. wayland anyway, and we're trying
to get rid of subwindow at totally in the long term, so lets drop this.
It allows us to drop a lot of complexity.
2016-12-16 12:28:44 +01:00
Olivier Fourdan
5c3192c75a wayland: apply empty input shape on parent commit
For subsurfaces, the new state which includes the input shape is not
applied by the compositor if the subsurface is in effective synchronous
mode.

So we need to apply the input shape once parent surface is in effective
desynchronized mode, which is when it's committed, otherwise the input
shape may never be applied if the widget is not using being_paint() /
end_paint() to draw on its subsurface, like clutter does.

We do that only for empty input shape as those won't need update when
the subsurface is resized, for all other non-empty input shape, the
client still has to use begin_paint()/end_paint() for the input shape to
be applied.

https://bugzilla.gnome.org/show_bug.cgi?id=774534
2016-12-15 13:27:39 +01:00
Matthias Clasen
4ae50bf38e Trivial doc fixups 2016-12-09 14:59:46 -05:00
Benjamin Otte
2c0564a46e build: Make sure GTK compiles without Vulkan headers installed
Previously, code would work fine with --disable-vulkan if the Vulkan
headers were installed - code would happily just use them as they're
installed in /usr/include.
2016-12-09 20:23:06 +01:00
Matthias Clasen
98f5e794a6 Forgotten file 2016-12-09 14:22:14 -05:00
Matthias Clasen
3dd4f76703 Rename GDK_WINDOWING_VULKAN
The WINDOWING defines are only for GDK backends, really.
Define GDK_RENDERING_VULKAN instead.
2016-12-09 14:11:37 -05:00
Matthias Clasen
5b6a837b17 Only include vulkan.h if we have it 2016-12-09 14:05:26 -05:00
Benjamin Otte
747df7aa3c vulkan: Also wait on the draw semaphore when present()ing
That way we have a synchronization primitive at the start and at the
end.
2016-12-09 18:35:51 +01:00
Benjamin Otte
5e4f95d77f x11: Don't make random windows native
Instead, complain if somebody calls gdk_x11_window_get_xid() on a
non-native window.

We cannot make random windows native anymore because there's no GSK
renderer associated with them, so we cannot draw them.
2016-12-09 18:35:51 +01:00
Benjamin Otte
8ba2898e08 vulkan: acquire/present images when drawing
Another step towards the final goal of actually showing something.
2016-12-09 18:35:51 +01:00
Benjamin Otte
325efe7078 vulkan: Expose the swapchain images in public API 2016-12-09 18:35:51 +01:00
Benjamin Otte
0c8e7d0ac0 vulkan: Register debug handler
We now hook Vulkan error reporting into glib's error reporting.

I'm not sure on the severity handling yet, but we can fix that as we go
along.
2016-12-09 18:35:51 +01:00
Benjamin Otte
b6227aa998 gdk: Add GDK_VULKAN env variable
Also add 2 flags:

GDK_VULKAN="disable" will disable Vulkan usage.

GDK_VULKAN="validate" will enable VK_LAYER_LUNARG_standard_validation.
2016-12-09 18:35:51 +01:00
Benjamin Otte
e11a6a0e68 x11: Call gdk_display_sync() when creating Vulkan surfaces
The Vulkan driver wants to operate on an X Window that it is sure does
exist.
2016-12-09 18:35:51 +01:00
Benjamin Otte
e22cb94e50 vulkan: More work on GdkVulkanContext
Code has now arrived at creation of swapchains.
2016-12-09 18:35:51 +01:00
Benjamin Otte
4ef8bf821e vulkan: Turn GdkVulkanContext into a GdkDrawContext 2016-12-09 18:35:51 +01:00