gtk4.git
7 years agogl renderer: Rename everything called window to surface
Timm Bäder [Mon, 26 Mar 2018 19:13:52 +0000 (21:13 +0200)]
gl renderer: Rename everything called window to surface

7 years agoentry: Remove useless queue_draw call
Timm Bäder [Mon, 26 Mar 2018 17:30:40 +0000 (19:30 +0200)]
entry: Remove useless queue_draw call

This is already taken care of by the add_class/remove_class.

7 years agosnapshot: Generate better names for offset nodes
Benjamin Otte [Sat, 24 Mar 2018 22:27:43 +0000 (23:27 +0100)]
snapshot: Generate better names for offset nodes

7 years agorendernode: Fix serializing
Benjamin Otte [Mon, 26 Mar 2018 17:41:38 +0000 (19:41 +0200)]
rendernode: Fix serializing

Adding the offset node broke serialization in 2 ways:

1. We store the enum value in the node, so make sure to not change it
   for existing values
2. The offset node was missing in the deserialization lookup table

7 years agoiconhelper: Apply scale to paintable
Benjamin Otte [Mon, 26 Mar 2018 16:46:22 +0000 (18:46 +0200)]
iconhelper: Apply scale to paintable

Instead of fiddling around with scale in the iconhelper (and getting it
wrong), create a GtkScaler around the paintable that takes care of the
scaling.

7 years agodnd: Remove gtk_drag_set_icon_surface()
Benjamin Otte [Mon, 26 Mar 2018 16:32:38 +0000 (18:32 +0200)]
dnd: Remove gtk_drag_set_icon_surface()

All users are gone. Use gtk_drag_set_icon_paintable() instead.

7 years agotests: Don't use gtk_drag_set_icon_surface()
Benjamin Otte [Mon, 26 Mar 2018 16:30:34 +0000 (18:30 +0200)]
tests: Don't use gtk_drag_set_icon_surface()

7 years agotextview: Port dnd icon to be a GdkPaintable
Benjamin Otte [Mon, 26 Mar 2018 04:49:55 +0000 (06:49 +0200)]
textview: Port dnd icon to be a GdkPaintable

7 years agocolorswatch: Port drag icon to paintables
Benjamin Otte [Mon, 26 Mar 2018 04:29:06 +0000 (06:29 +0200)]
colorswatch: Port drag icon to paintables

7 years agocolorbutton: Port dnd icon to paintable
Benjamin Otte [Mon, 26 Mar 2018 04:26:34 +0000 (06:26 +0200)]
colorbutton: Port dnd icon to paintable

Patch is untested, because colorbuttons can't do DND at the moment.

7 years agotreeview: Turn drag icon into paintable
Benjamin Otte [Mon, 26 Mar 2018 04:20:56 +0000 (06:20 +0200)]
treeview: Turn drag icon into paintable

7 years agoiconview: Port DND icons to snapshot paintables
Benjamin Otte [Mon, 26 Mar 2018 03:21:18 +0000 (05:21 +0200)]
iconview: Port DND icons to snapshot paintables

7 years agotests: Remove references to long-deleted property
Benjamin Otte [Mon, 26 Mar 2018 03:09:46 +0000 (05:09 +0200)]
tests: Remove references to long-deleted property

7 years agotextutil: Make gtk_text_util_create_drag_icon() return a paintable
Benjamin Otte [Mon, 26 Mar 2018 02:38:54 +0000 (04:38 +0200)]
textutil: Make gtk_text_util_create_drag_icon() return a paintable

7 years agosnapshot: Add gtk_snapshot_to_paintable()
Benjamin Otte [Mon, 26 Mar 2018 02:37:01 +0000 (04:37 +0200)]
snapshot: Add gtk_snapshot_to_paintable()

This is intended for DND icons

7 years agosnapshot: Export gtk_snapshot_append_layout()
Benjamin Otte [Mon, 26 Mar 2018 02:23:11 +0000 (04:23 +0200)]
snapshot: Export gtk_snapshot_append_layout()

This is the equivalent snapshot function to pango_cairo_show_layout().

Not to be confused with gtk_snapshot_render_layout(), which is the
equivalent to gtk_render_layout().

7 years agosnapshot: Make gtk_snapshot_append_node() take care of offset
Benjamin Otte [Tue, 20 Mar 2018 03:33:58 +0000 (04:33 +0100)]
snapshot: Make gtk_snapshot_append_node() take care of offset

Push an offset node when append_node is called. That resets the offset.

7 years agorendernode: Add an offset node
Benjamin Otte [Tue, 20 Mar 2018 01:46:57 +0000 (02:46 +0100)]
rendernode: Add an offset node

This is a special case of the transform node that does a 2D translation.

The implementation in the Vulkan and GL renderers is crude and just does
the same as the transform node.

Nothing uses that node yet.

7 years agoUpdate Polish translation
Piotr Drąg [Sun, 25 Mar 2018 23:42:57 +0000 (01:42 +0200)]
Update Polish translation

7 years agocolorscale: Draw gradient using render nodes
Benjamin Otte [Sun, 25 Mar 2018 22:29:52 +0000 (00:29 +0200)]
colorscale: Draw gradient using render nodes

Don't use Cairo when it's not needed.

7 years agocolorscale: Draw hue background as a texture
Benjamin Otte [Sun, 25 Mar 2018 22:12:20 +0000 (00:12 +0200)]
colorscale: Draw hue background as a texture

No need to use Cairo here.

7 years agocolorplane: Create background image as a texture
Benjamin Otte [Sun, 25 Mar 2018 21:56:09 +0000 (23:56 +0200)]
colorplane: Create background image as a texture

Don't create it using Cairo.

7 years agoMerge branch 'bz773274' into 'master'
Matthias Clasen [Sun, 25 Mar 2018 20:44:44 +0000 (20:44 +0000)]
Merge branch 'bz773274' into 'master'

wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!32

7 years agocolorscale: Don't free surface data before surface
Benjamin Otte [Sun, 25 Mar 2018 20:37:09 +0000 (22:37 +0200)]
colorscale: Don't free surface data before surface

When drawing onto a recording surface, source surfaces get cached.

But if we g_free() the surface data after we're done, that cache is
gonna point at invalid data...

7 years agoGdkGLContext: Add a GL debug message callback
Timm Bäder [Sun, 25 Mar 2018 13:28:40 +0000 (15:28 +0200)]
GdkGLContext: Add a GL debug message callback

If G_ENABLE_CONSISTENCY_CHECKS is defined (i.e. if our buildtype is
'debug'), add a opengl debug callback that prints all debug messages
with a severity higher than SEVERITY_NOTIFICATION as a warning to the
console.

7 years agogl renderer: Skip all 0-sized nodes
Timm Bäder [Sun, 25 Mar 2018 09:47:04 +0000 (11:47 +0200)]
gl renderer: Skip all 0-sized nodes

These will cause problems later on.

7 years agogl renderer: Remove cairo node special case
Timm Bäder [Sun, 25 Mar 2018 09:46:48 +0000 (11:46 +0200)]
gl renderer: Remove cairo node special case

7 years agoci: Remove --werror
Emmanuele Bassi [Sun, 25 Mar 2018 00:31:36 +0000 (00:31 +0000)]
ci: Remove --werror

Turns out that GCC errors out when building the GLib test suite, as it
now checks for overflows in allocator functions, and we're testing for
those.

This would not be an issue for GTK, but since we're building GLib as a
subproject, we get failures for those as well.

Until we can find out how to disable errors for subprojects, or fix the
GLib test suite not to trip up warnings in GCC, we're going to live
without compiler warnings treated as errors for a while.

7 years agoci: Use the appropriate argument for errors
Emmanuele Bassi [Sun, 25 Mar 2018 00:00:02 +0000 (00:00 +0000)]
ci: Use the appropriate argument for errors

The option to enable fatal warnings in Meson is `--werror`.

7 years agoMenu: Don't leak priv->motion_controller
Daniel Boles [Sat, 24 Mar 2018 21:57:42 +0000 (21:57 +0000)]
Menu: Don't leak priv->motion_controller

7 years agoci: build with -Werror
Benjamin Otte [Sat, 24 Mar 2018 21:27:28 +0000 (22:27 +0100)]
ci: build with -Werror

7 years agoci: Disable ccache
Emmanuele Bassi [Sat, 24 Mar 2018 21:17:34 +0000 (21:17 +0000)]
ci: Disable ccache

Forcibly remove any ccache use, even if it's installed.

7 years agodocs: Style fixes for the contribution guidelines
Emmanuele Bassi [Wed, 21 Mar 2018 01:05:29 +0000 (01:05 +0000)]
docs: Style fixes for the contribution guidelines

7 years agosnapshot: Remove renderer
Benjamin Otte [Sat, 24 Mar 2018 20:41:53 +0000 (21:41 +0100)]
snapshot: Remove renderer

Now that there's no longer a need to keep the renderer around for Cairo
rendering, don't do that then.

7 years agorendernode: Remove renderer argument
Benjamin Otte [Sat, 24 Mar 2018 20:33:08 +0000 (21:33 +0100)]
rendernode: Remove renderer argument

It's not needed to create Cairo nodes anymore.

7 years agorendernode: Create Cairo surfaces as recording surfaces
Benjamin Otte [Sat, 24 Mar 2018 19:42:42 +0000 (20:42 +0100)]
rendernode: Create Cairo surfaces as recording surfaces

This way, we can postpone the actual rendeing of the node until the
renderer. This allows the renderer to choose the right scale to
render at, so it can decide to use 2x scale for hidpi on its own.

Last but not least, it makes all nodes independent of the context they
are created in, because they do not need to know at snapshot time what
they will ultimately be rendered into.

7 years agovulkan: Remove special case for Cairo surfaces
Benjamin Otte [Sat, 24 Mar 2018 15:41:59 +0000 (16:41 +0100)]
vulkan: Remove special case for Cairo surfaces

This is in preparation for the next commits which switch Cairo nodes to
recording surfaces.

7 years agoMerge branch 'lrn/bug-773299' into 'master'
LRN [Sat, 24 Mar 2018 11:08:36 +0000 (11:08 +0000)]
Merge branch 'lrn/bug-773299' into 'master'

bug 773299 2nd

See merge request GNOME/gtk!79

7 years agoGDK W32: Adapt DnD event putting to recent changes
Руслан Ижбулатов [Sat, 24 Mar 2018 10:58:11 +0000 (10:58 +0000)]
GDK W32: Adapt DnD event putting to recent changes

Set the display for each event that we put.
Also reorganize the dnd_event_put() function a bit, giving it a surface
directly instead of setting it by implication.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

7 years agoMerge branch 'lrn/bug-773299' into 'master'
LRN [Sat, 24 Mar 2018 10:46:59 +0000 (10:46 +0000)]
Merge branch 'lrn/bug-773299' into 'master'

bug 773299

See merge request GNOME/gtk!78

7 years agoGDK W32: Don't check dest_surface for != NULL on button events
Руслан Ижбулатов [Sat, 24 Mar 2018 10:26:51 +0000 (10:26 +0000)]
GDK W32: Don't check dest_surface for != NULL on button events

dest_surface is going to always be NULL for source contexts.
Previously we used to put the root window there to pass this check,
but root windows are gone (and root surfaces never existed to begin
with), so we have to adapt.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

7 years agoGDK W32: Init display scale to the global Windows scale, not 1
Руслан Ижбулатов [Sat, 24 Mar 2018 10:05:34 +0000 (10:05 +0000)]
GDK W32: Init display scale to the global Windows scale, not 1

This affects gdk_device_query_state() for the virtual device. It has
no window, and is forced to query the display itself, and display
defaults its scale to 1 even for HiDPI desktops. Use the same
"query scale of a NULL monitor" trick that we use in other places
to get the global desktop scale.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

7 years agoGDK W32: adapt to the recent changes in GdkEvent
Руслан Ижбулатов [Sat, 24 Mar 2018 10:04:38 +0000 (10:04 +0000)]
GDK W32: adapt to the recent changes in GdkEvent

https://bugzilla.gnome.org/show_bug.cgi?id=773299

7 years agoUpdate zh_CN po and po-properties translations
Dz Chen [Fri, 23 Mar 2018 15:55:05 +0000 (23:55 +0800)]
Update zh_CN po and po-properties translations

7 years agoAdwaita: Regenerate CSS from SASS
Daniel Boles [Thu, 22 Mar 2018 20:58:31 +0000 (20:58 +0000)]
Adwaita: Regenerate CSS from SASS

https://gitlab.gnome.org/GNOME/gtk/merge_requests/66 introduced spurious
red/green fore/background.

Also, the GtkVideo stuff didn't get regenerated in.

7 years agoMerge branch 'toolbar-spacing-fix' into 'master'
Daniel Boles [Thu, 22 Mar 2018 20:54:01 +0000 (20:54 +0000)]
Merge branch 'toolbar-spacing-fix' into 'master'

theme: Be more selective when adding margins to toolbar items

See merge request GNOME/gtk!66

7 years agosurface: Make process_updates no longer be a vfunc
Benjamin Otte [Wed, 21 Mar 2018 20:58:08 +0000 (21:58 +0100)]
surface: Make process_updates no longer be a vfunc

7 years agosurface: Remove some unused vfuncs
Benjamin Otte [Wed, 21 Mar 2018 19:33:20 +0000 (20:33 +0100)]
surface: Remove some unused vfuncs

7 years agogdk: Remove GdkSurfaceImpl::shape_combine_region vfunc
Benjamin Otte [Wed, 21 Mar 2018 19:15:21 +0000 (20:15 +0100)]
gdk: Remove GdkSurfaceImpl::shape_combine_region vfunc

... and all the implementations.

Input shapes still exist.

7 years agogdk: Remove a bunch of unused variables
Benjamin Otte [Wed, 21 Mar 2018 18:58:49 +0000 (19:58 +0100)]
gdk: Remove a bunch of unused variables

7 years agoReduce the header level in the bug template
Emmanuele Bassi [Wed, 21 Mar 2018 11:49:24 +0000 (11:49 +0000)]
Reduce the header level in the bug template

Make version and additional information headers use h2, like everything else.

7 years agoMerge branch 'wip/sync-pre-swap-buffers' into 'master'
Matthias Clasen [Wed, 21 Mar 2018 11:40:55 +0000 (11:40 +0000)]
Merge branch 'wip/sync-pre-swap-buffers' into 'master'

Synchronize wl_surface state before wl_surface_commit

See merge request GNOME/gtk!75

7 years agoContinue renaming window to surface
Alexander Larsson [Wed, 21 Mar 2018 10:49:14 +0000 (11:49 +0100)]
Continue renaming window to surface

This renames a lot of arguments, local variables and functions.

7 years agoGdkSurface: Fix doc comments for remoteve invalidate_children argument
Alexander Larsson [Wed, 21 Mar 2018 08:18:30 +0000 (09:18 +0100)]
GdkSurface: Fix doc comments for remoteve invalidate_children argument

7 years agobroadway: Fix up window -> surface renames
Alexander Larsson [Wed, 21 Mar 2018 08:17:50 +0000 (09:17 +0100)]
broadway: Fix up window -> surface renames

7 years agoFix up indentation after GdkSurface rename
Alexander Larsson [Wed, 21 Mar 2018 08:06:31 +0000 (09:06 +0100)]
Fix up indentation after GdkSurface rename

This fixes up a lot of the indentation issues from the
rename of windows to surfaces, at least the ones in the headers
and many others.

7 years agowayland/vulkancontext: Sync surface state before vkQueuePresentKHR
Jonas Ådahl [Wed, 21 Mar 2018 06:08:13 +0000 (14:08 +0800)]
wayland/vulkancontext: Sync surface state before vkQueuePresentKHR

A side effect of vkQueuePresentKHR is the Vulkan implementation calling
wl_surface_commit() on the corresponding Wayland surface. Thus, before
this, we must synchronize the surface state (e.g. opaque region, window
geometry, etc) that changed since last time. Prior to this commit this
was done after calling vkQueuePresentKHR(), causing the surface state to
always correspond to the previous buffer state. As of this commit this
is now done before calling vkQueuePresentKHR(), thus before
wl_surface_commit().

7 years agowayland/glcontext: Sync surface state before swapping buffers
Jonas Ådahl [Wed, 21 Mar 2018 06:01:58 +0000 (14:01 +0800)]
wayland/glcontext: Sync surface state before swapping buffers

A side effect of eglSwapBuffers* is the EGL implementation calling
wl_surface_commit() on the corresponding Wayland surface. Thus, before
swapping buffers, we must synchronize the surface state (e.g. opaque
region, window geometry, etc) that changed since the last buffer swap.
Prior to this commit, this was done after eglSwapBuffers*, causing the
surface state to always correspond to the previous buffer state. As of
this commit this is now done before swapping the buffers, thus before
wl_surface_commit().

7 years agosurface: Simplify gdk_surface_invalidate_region()
Benjamin Otte [Wed, 21 Mar 2018 03:07:37 +0000 (04:07 +0100)]
surface: Simplify gdk_surface_invalidate_region()

Remove duplicate functions and unused arguments.

Functionality is identical otherwise.

7 years agosurface: Stop tracking clip region
Benjamin Otte [Wed, 21 Mar 2018 02:51:29 +0000 (03:51 +0100)]
surface: Stop tracking clip region

It's not needed because we're not using it for anything anymore now that
client-side surfaces aren't drawn anymore.

7 years agogdk: Remove gdk_surface_shape_combine_region()
Benjamin Otte [Wed, 21 Mar 2018 02:42:34 +0000 (03:42 +0100)]
gdk: Remove gdk_surface_shape_combine_region()

If you want transparent region, you can just render them transparent.
If you want input shaping, use gdk_surface_input_shape_combine_region().

Also remove gtk_widget_shape_combine_region().

7 years agosurface: Remove gdk_surface_get_clip_region()
Benjamin Otte [Wed, 21 Mar 2018 01:57:48 +0000 (02:57 +0100)]
surface: Remove gdk_surface_get_clip_region()

... and gdk_surface_get_visible_region() APIs. They are unused.

7 years agogdk: Remove unused members from surface struct
Benjamin Otte [Wed, 21 Mar 2018 01:50:37 +0000 (02:50 +0100)]
gdk: Remove unused members from surface struct

7 years agosurface: Stop shaping native children of csw surfaces
Benjamin Otte [Wed, 21 Mar 2018 01:45:43 +0000 (02:45 +0100)]
surface: Stop shaping native children of csw surfaces

We don't have them anymore and they are goig away anyway.

7 years agodocs: Drop the 'Contributing' section from the README
Emmanuele Bassi [Wed, 21 Mar 2018 01:02:23 +0000 (01:02 +0000)]
docs: Drop the 'Contributing' section from the README

We have a whole document for that, and it's up to date with regards to
the GitLab workflow.

7 years agoAdd a template for bug reports
Emmanuele Bassi [Wed, 21 Mar 2018 00:59:06 +0000 (00:59 +0000)]
Add a template for bug reports

GitLab issues can use templates to guide users when filing new bug
reports; we should take advantage of this feature.

7 years agodocs: Point at the right place for new bugs
Emmanuele Bassi [Wed, 21 Mar 2018 00:58:46 +0000 (00:58 +0000)]
docs: Point at the right place for new bugs

We use GitLab issues, now.

7 years agoAdd a build status badge
Emmanuele Bassi [Wed, 21 Mar 2018 00:45:09 +0000 (00:45 +0000)]
Add a build status badge

Like all cool kids are doing, these days.

7 years agoAdd appdata for gtk4-widget-factory
Matthias Clasen [Wed, 21 Mar 2018 00:04:20 +0000 (20:04 -0400)]
Add appdata for gtk4-widget-factory

This will let us build a better flatpak for gtk4-widget-factory.

7 years agosurface: Remove GSK_SURFACE_ROOT
Benjamin Otte [Tue, 20 Mar 2018 23:55:59 +0000 (00:55 +0100)]
surface: Remove GSK_SURFACE_ROOT

Root surface have been dead for a while now, no need to keep the enum
value around.

7 years agoMerge branch 'ci-flatpak'
Emmanuele Bassi [Tue, 20 Mar 2018 23:52:31 +0000 (23:52 +0000)]
Merge branch 'ci-flatpak'

Generate Flatpak bundles for gtk-demo and gtk-widget-factory when
running the CI pipeline, and store them as artifacts on the CI server.

7 years agosurface: Remove gdk_surface_invalidate_maybe_recurse()
Benjamin Otte [Tue, 20 Mar 2018 23:35:51 +0000 (00:35 +0100)]
surface: Remove gdk_surface_invalidate_maybe_recurse()

This also means we can now get rid of child funcs because they're not
used anymore.

7 years agosurface: Remove gdk_surface_scroll()
Benjamin Otte [Tue, 20 Mar 2018 22:55:20 +0000 (23:55 +0100)]
surface: Remove gdk_surface_scroll()

It's yet another fancy way to call gdk_surface_invalidate_region().

Also remove the one testgtk test that was still using it.

7 years agosurface: Remove gdk_surface_move_region()
Benjamin Otte [Tue, 20 Mar 2018 22:04:36 +0000 (23:04 +0100)]
surface: Remove gdk_surface_move_region()

It's just a cute version of gdk_surface_invalidate_region()
these days and people can call that function instead.

7 years agosurface: Remove queue_antiexpose()
Benjamin Otte [Tue, 20 Mar 2018 21:53:13 +0000 (22:53 +0100)]
surface: Remove queue_antiexpose()

... and its implementation in the X11 backend.

GDK does lots of work trying to reduce the region in expose events
so that when the server sends multiple expose events, touching the
same area we can make sure to only redraw stuff once. However:
(1) this is only relevant of there's tons of delay and multiple
    expose events get sent
(2) we coalesce multiple events into a single expose event anyway
(3) we do this on the frame clock

But most importantly:
(4) Since the invention of compositing, servers caches all contents
    anyway

7 years agogdk: Remove unused area member from GdkEventExpose
Benjamin Otte [Tue, 20 Mar 2018 21:32:26 +0000 (22:32 +0100)]
gdk: Remove unused area member from GdkEventExpose

7 years agogdk: Remove unused count member from GdkEventExpose
Benjamin Otte [Tue, 20 Mar 2018 21:30:04 +0000 (22:30 +0100)]
gdk: Remove unused count member from GdkEventExpose

7 years agowidget: Remove useless macro
Benjamin Otte [Tue, 20 Mar 2018 03:40:09 +0000 (04:40 +0100)]
widget: Remove useless macro

7 years agoAdd appdata for gtk4-demo
Matthias Clasen [Tue, 20 Mar 2018 23:40:30 +0000 (19:40 -0400)]
Add appdata for gtk4-demo

This will let us build a better flatpak for gtk4-demo.

7 years agoci: Add two flatpak jobs
Emmanuele Bassi [Tue, 20 Mar 2018 16:08:45 +0000 (16:08 +0000)]
ci: Add two flatpak jobs

When building GTK through the CI infrastructure, it would help to have
some ways of testing it; for instance, if we want to verify that theme
changes are useful, or if we want to run the result without necessarily
build it locally.

This is where flatpak comes in handy. By having the CI build a flatpak
buundle, and storing it as an artifact, of the GTK demos, we can easily
point developers and designers to an installable binary that won't break
their system, nor will require development tools and environments to
run.

7 years agoAdd flatpak builder manifests for our demos
Emmanuele Bassi [Tue, 20 Mar 2018 16:07:38 +0000 (16:07 +0000)]
Add flatpak builder manifests for our demos

We can use manifests as targets when building GTK inside a flatpak
environment; or we can use them for CI purposes.

7 years agowayland: Drop cairo surfaces when withdrawing
Olivier Fourdan [Tue, 30 Jan 2018 12:57:35 +0000 (13:57 +0100)]
wayland: Drop cairo surfaces when withdrawing

If a surface is unmapped by the client while gdk is processing updates,
(for example Firefox un-mapping its window on Expose events), the
windowing backend resources might be lost (for example with Wayland)
which can cause a crash in end_paint().

Make sure we drop the cairo surfaces as well when hiding the surface,
that will avoid the crash in gdk_surface_impl_wayland_end_paint() when
trying to attach the staging cairo surface to a released wl_surface,
these will be recreated when needed when the surface becomes visible
again and there is no need to keep such buffers around for a surface
which is not visible anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=793062

7 years agoMerge branch 'tests-gdk' into 'master'
Emmanuele Bassi [Tue, 20 Mar 2018 17:20:28 +0000 (17:20 +0000)]
Merge branch 'tests-gdk' into 'master'

gitlab-ci: enable gtk+:gdk tests

See merge request GNOME/gtk!74

7 years agotests: Update renamed symbol
Emmanuele Bassi [Tue, 20 Mar 2018 17:00:19 +0000 (17:00 +0000)]
tests: Update renamed symbol

7 years agoMerge branch 'detect-synaptics-touchpads-v2' into 'master'
Carlos Garnacho [Tue, 20 Mar 2018 17:03:15 +0000 (17:03 +0000)]
Merge branch 'detect-synaptics-touchpads-v2' into 'master'

x11/xi2: Report touchpads as TOUCHPAD, not MOUSE

See merge request GNOME/gtk!65

7 years agoUpdate POTFILES.in
Piotr Drąg [Tue, 20 Mar 2018 16:32:35 +0000 (17:32 +0100)]
Update POTFILES.in

7 years agogitlab-ci: enable gtk+:gdk tests
Christoph Reiter [Tue, 20 Mar 2018 16:31:38 +0000 (17:31 +0100)]
gitlab-ci: enable gtk+:gdk tests

xvfb doesn't like C.utf8 and returns XLocaleNotSupported.

While (afaik) C.utf8 and C.UTF.8 should be the same thing, and the former
is returned by locale -a on Fedora, switch to C.UTF-8 to make xvfb happy.

This makes gtk+:gdk tests pass.

7 years agoMerge branch 'rename-window-to-surface' into 'master'
Alexander Larsson [Tue, 20 Mar 2018 16:16:57 +0000 (16:16 +0000)]
Merge branch 'rename-window-to-surface' into 'master'

Rename window to surface

See merge request GNOME/gtk!72

7 years agoMerge branch 'accessible-role' into 'master'
Matthias Clasen [Tue, 20 Mar 2018 15:46:20 +0000 (15:46 +0000)]
Merge branch 'accessible-role' into 'master'

gtkbuilder: add accessibility role declaration

Closes #109

See merge request GNOME/gtk!69

7 years agoMerge branch 'style-context-null-widget-guard-master' into 'master'
Benjamin Otte [Tue, 20 Mar 2018 15:36:19 +0000 (15:36 +0000)]
Merge branch 'style-context-null-widget-guard-master' into 'master'

gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places

See merge request GNOME/gtk!71

7 years agoMerge branch 'a11y-fixes' into 'master'
Matthias Clasen [Tue, 20 Mar 2018 15:33:35 +0000 (15:33 +0000)]
Merge branch 'a11y-fixes' into 'master'

Fix some accessibility issues in demos

Closes #110

See merge request GNOME/gtk!68

7 years agoConvert all references to GdkEvent->surface
Alexander Larsson [Tue, 20 Mar 2018 15:25:50 +0000 (16:25 +0100)]
Convert all references to GdkEvent->surface

7 years agogtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in...
Christoph Reiter [Mon, 19 Mar 2018 17:21:25 +0000 (18:21 +0100)]
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places

When the widget gets finalized it clears the widgetnode and gtk_css_widget_node_get_widget
returns NULL. Guard against gtk_css_widget_node_get_widget() returning NULL like in other
places.

See https://gitlab.gnome.org/GNOME/pygobject/issues/28#note_82862

7 years agoGtkWidget: Continuer rename of widget->surface
Alexander Larsson [Tue, 20 Mar 2018 14:40:31 +0000 (15:40 +0100)]
GtkWidget: Continuer rename of widget->surface

This completes the rename manually.

7 years agoGtkWidget: Start renaming widget->window
Alexander Larsson [Tue, 20 Mar 2018 14:21:12 +0000 (15:21 +0100)]
GtkWidget: Start renaming widget->window

This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*

7 years agoGdkSurface: Rename lots of stuff from window->surface
Alexander Larsson [Tue, 20 Mar 2018 14:14:10 +0000 (15:14 +0100)]
GdkSurface: Rename lots of stuff from window->surface

Mostly these are internal things, but the major public change is
that event.window is now event.surface.

7 years agoGdkSurface: Rename various functions and variables
Alexander Larsson [Tue, 20 Mar 2018 11:05:26 +0000 (12:05 +0100)]
GdkSurface: Rename various functions and variables

This is an automatic rename of various things related
to the window->surface rename.

Public symbols changed by this is:
 GDK_MODE_WINDOW
 gdk_device_get_window_at_position
 gdk_device_get_window_at_position_double
 gdk_device_get_last_event_window
 gdk_display_get_monitor_at_window
 gdk_drag_context_get_source_window
 gdk_drag_context_get_dest_window
 gdk_drag_context_get_drag_window
 gdk_draw_context_get_window
 gdk_drawing_context_get_window
 gdk_gl_context_get_window
 gdk_synthesize_window_state
 gdk_surface_get_window_type
 gdk_x11_display_set_window_scale
 gsk_renderer_new_for_window
 gsk_renderer_get_window
 gtk_text_view_buffer_to_window_coords
 gtk_tree_view_convert_widget_to_bin_window_coords
 gtk_tree_view_convert_tree_to_bin_window_coords

The commands that generated this are:

git sed -f g "GDK window" "GDK surface"
git sed -f g window_impl surface_impl
(cd gdk; git sed -f g impl_window impl_surface)
git sed -f g WINDOW_IMPL SURFACE_IMPL
git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface

(cd gdk; git sed -f g window_type surface_type)
git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type

git sed -f g window_at_position surface_at_position
git sed -f g event_window event_surface
git sed -f g window_coord surface_coord
git sed -f g window_state surface_state
git sed -f g window_cursor surface_cursor
git sed -f g window_scale surface_scale
git sed -f g window_events surface_events
git sed -f g monitor_at_window monitor_at_surface
git sed -f g window_under_pointer surface_under_pointer
(cd gdk; git sed -f g for_window for_surface)
git sed -f g window_anchor surface_anchor
git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
git sed -f g native_window native_surface
git sed -f g source_window source_surface
git sed -f g dest_window dest_surface
git sed -f g drag_window drag_surface
git sed -f g input_window input_surface

git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml

7 years agoGdkWindow -> GdkSurface: File renames
Alexander Larsson [Tue, 20 Mar 2018 10:46:11 +0000 (11:46 +0100)]
GdkWindow -> GdkSurface: File renames

Rename all *window.[ch] source files.

This is an automatic operation, done by the following commands:

for i in $(git ls-files gdk | grep window); do
    git mv $i $(echo $i | sed s/window/surface/);
    git sed -f g $(basename $i) $(basename $i | sed s/window/surface/) ;
done

git checkout NEWS* po-properties po

7 years agoGdkWindow -> GdkSurface initial type rename
Alexander Larsson [Tue, 20 Mar 2018 10:40:08 +0000 (11:40 +0100)]
GdkWindow -> GdkSurface initial type rename

This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties

7 years agotests: Add testtexture
Timm Bäder [Tue, 20 Mar 2018 08:19:10 +0000 (09:19 +0100)]
tests: Add testtexture

a test that simply loads a given file as a texture and renders it.