Commit Graph

54069 Commits

Author SHA1 Message Date
Timm Bäder
38fa5ab57b widget: Add a translate_coordinates version for doubles
So we can use that one when translating event coordinates. Also adapt
the widgetfocus demo to ensure this works.

We should probably at some point delete either the int or the double
version.
2018-03-07 20:17:39 +01:00
Timm Bäder
034017425c linkbutton: Remove priv pointer 2018-03-07 20:17:39 +01:00
Timm Bäder
4dfe4a6476 expander: Remove label-fill property
It's just setting some internal boolean and nothing else. It's like this
in gtk3 as well so it can't be too important either.
2018-03-07 20:17:39 +01:00
Timm Bäder
6cc824af43 Merge branch 'expander-add-like-bin' into 'master'
expander: Check for an existing child when adding

See merge request GNOME/gtk!48
2018-03-07 19:09:30 +00:00
Benjamin Otte
db6fed1496 overlay: Add GtkOverlay::measure child property
It determines whether a child is included in the overlay's size
measurement.

The first user is (gonna be) GtkVideo.
2018-03-07 16:17:15 +01:00
Benjamin Otte
325f6121ba eventcontroller: Remove unused evmask member variable 2018-03-07 16:17:15 +01:00
Benjamin Otte
074e7001dc eventcontroller: Get rid of constructed vfunc
Instead, add the controller to the widget in set_property.
2018-03-07 16:17:15 +01:00
Benjamin Otte
8920639a2b texture: Add GdkMemoryTexture
GdkMemoryTexture is a texture implementation for holding data in memory
(read: GBytes). You specify the GdkMemoryFormat that data is in and off
you go.

Renderers can use this to add uploads in various different formats and
don't need to fallback to GDK doing the conersion on the CPU.

Supported formats can be extended if we need new ones, for now I just
added the relevant ones for Cairo and GdkPixbuf.

The constructor is also private still, because I'm not sure we want to
export GdkMemoryFormat.
Wrappers that do from_cairo_surface() and for_pixbuf() do exist though.
2018-03-07 16:17:15 +01:00
Benjamin Otte
160e6ad6f6 gdk: Split out GL texture
Put GdkGLTexture into its own file and rename the API to
gdk_gl_texture_foo() instead of gdk_texture_foo_for_gl().

Apart from naming, no actual code changes.
2018-03-07 16:17:15 +01:00
Carlos Garnacho
b49c6cdcb1 imwayland: Fix parent type
It was inadvertently changed in commit 15cc20e7b.

https://gitlab.gnome.org/GNOME/gtk/issues/58

Closes: #58
2018-03-07 10:58:22 +01:00
Matthias Clasen
cc6d60afa4 Use gio-querymodules
GIO has this facility, so we should use it.
At the same time, make sure the immodules directory
exists, even if we don't install any modules there
outselves.
2018-03-06 20:54:26 -05:00
Matthias Clasen
5ec41fb47b Make debug messages work earlier
We need to be able to produce debug output during module
loading. This change ensures that we can.
2018-03-06 20:54:26 -05:00
Alexandre Franke
122e7b16e6 Update French translation 2018-03-06 21:01:36 +00:00
Peter Bloomfield
a207ab6105 expander: Check for an existing child when adding
Now that GtkExpander subclasses GtkContainer instead of GtkBin, it needs
its own guard against adding more than one child.

Also, the documentation should no longer describe adding a child as if
it is descended from GtkBin.
2018-03-06 14:26:08 -05:00
Timm Bäder
de537a0755 entry: Fix invisible cursors 2018-03-06 20:04:30 +01:00
Timm Bäder
2f5d5ca9f8 GdkSelectionInputStreamX11: Plug a memory leak 2018-03-06 19:59:29 +01:00
Timm Bäder
49a7bf267b GdkSelectionOutputStreamX11: Plug a memory leak 2018-03-06 19:47:18 +01:00
Timm Bäder
f5e290517a expander: fix sizes in resize_toplevel
We can't use gtk_widget_get_allocation for either non-anchored widgets
(which happens with the child widget when the expander is unexpanded)
nor toplevel windows since that will include the window decorations.

Fixes #70 in gtk4
2018-03-06 18:12:49 +01:00
Timm Bäder
7dc4669d01 viewport: Remove priv pointer 2018-03-06 14:37:28 +01:00
Timm Bäder
22457822eb expander: Attach the gesture to the title widget
Instead of tracking whether the click happened inside the title widget
ourselves, just attach the gesture to the title widget.
2018-03-05 17:24:22 +01:00
Rūdolfs Mazurs
564397f391 Update Latvian translation 2018-03-04 19:24:16 +00:00
Rūdolfs Mazurs
4519c6696c Update Latvian translation 2018-03-04 19:18:11 +00:00
Timm Bäder
84b4f85f1a overlay: Make forall() remove-safe
Since this is a GtkContainer, forall will be used to destroy all the
widgets.
2018-03-04 20:04:43 +01:00
Timm Bäder
0bb1e1b1fd overlay: Fix GSlide/g_free mixup
We free the allocated data later using g_free, so don't use GSlice when
allocating it.
2018-03-04 20:04:17 +01:00
Timm Bäder
53410bab0f overlay: Fix remove implementation
Use the child widget list of the overlay, not the passed child.
2018-03-04 20:03:54 +01:00
Timm Bäder
31a0739bf3 imcontextxim: Move initialisation into _init function
We are creating these using g_object_new, so the _new function is never
called, resulting in a NULL mb_charset. Fix this by moving the
initialisation into the _init function.
2018-03-04 19:55:54 +01:00
Benjamin Otte
aa175ec2f5 Merge branch 'set-client-widget-nullable' into 'master'
gtkimcontextxim: fix gtk_im_context_xim_set_client_widget not handling widget=NULL

See merge request GNOME/gtk!46
2018-03-04 18:29:45 +00:00
Timm Bäder
8a062f4f9a gskpango: Don't create text nodes for clipped text
Measure the text here directly and check if the created node bounds will
be clipped away before even creating the text node.
2018-03-04 19:15:03 +01:00
Timm Bäder
2d50d9ebe6 rendernodes: Add gsk_text_node_new_with_bounds
An alternative GskTextNode constructor that does no text measuring. That
way, we can measure the text before and check if the node will be
outside of the current clip anyway.
2018-03-04 19:12:04 +01:00
Timm Bäder
ee8132a439 rendernodes: Add missing nullable annotation 2018-03-04 19:12:04 +01:00
Timm Bäder
0234e8e2c9 gl renderer: Limit texture node size to clip 2018-03-04 19:12:04 +01:00
Timm Bäder
f44642c7cb overlay: Remove child list 2018-03-04 19:12:04 +01:00
Timm Bäder
9beb5490f5 overlay: Remove priv pointer 2018-03-04 19:12:04 +01:00
Timm Bäder
da431b2a43 glglyphcache: Pass lookup key to g_hash_table_lookup directly 2018-03-04 19:12:04 +01:00
Timm Bäder
cfbac153a3 overlay: Fix coordinates in child_update_style_classes
Both main child and all others are in the same coordinate space, so no
need to add the parent position here.
2018-03-04 19:12:04 +01:00
Timm Bäder
ddcc9b9f2f overlay: Don't chain up in size_allocate
The GtkBin size_allocate implementation will allocate a size to the main
child, which GtkOverlay already does.
2018-03-04 19:12:04 +01:00
Timm Bäder
8ebec46db5 entry: Remove priv pointer 2018-03-04 19:12:04 +01:00
Timm Bäder
71ae2fae2e container: Remove unused struct member 2018-03-04 19:12:04 +01:00
Timm Bäder
1596c61003 testsuite: Remove GL text test case
This was just testing that text nodes do alpha correctly, but the test
even breaks if the default font is different from the one that was used
to create the reference image, so drop it for now.
2018-03-04 19:12:04 +01:00
Timm Bäder
891c37a4cb label: Simplify ensure_layout()
use an early return for an already existing layout.
2018-03-04 19:12:04 +01:00
Christoph Reiter
8c2c748c11 gtkimcontextxim: fix gtk_im_context_xim_set_client_widget not handling widget=NULL
gtk_im_context_set_client_widget() allows passing NULL as widget to signal that
the widget no longer exists. The xim implementation didn't handle that
case which led to the test suite on gitlab-ci failing.
2018-03-04 18:40:12 +01:00
Christoph Reiter
235ff253ff Merge branch 'gi-a11y' into 'master'
Include gtk/gtk-a11y.h in introspection file.

See merge request GNOME/gtk!43
2018-03-04 10:10:20 +00:00
Christoph Reiter
331c4b5954 Merge branch 'include-gtkstackaccessible' into 'master'
a11y: Include gtkstackaccessible.h in gtk-a11y.h

See merge request GNOME/gtk!41
2018-03-04 09:43:34 +00:00
Tomasz Miąsko
7ba53de1e8 Include gtk/gtk-a11y.h in introspection file.
The gir XML file contains description of types and functions from
gtk/gtk-a11y.h. Indicate that this header should be included in addition
to gtk/gtk.h in applications written in C. #56
2018-03-03 20:51:30 +01:00
Tomasz Miąsko
c2b4da128a a11y: Include gtkstackaccessible.h in gtk-a11y.h 2018-03-03 20:01:54 +01:00
Bruce Cowan
ec2cdac298 Update British English translation
(cherry picked from commit 3059df0d4d)
2018-03-02 22:09:58 +00:00
Piotr Drąg
ce2b6d9eb7 Update POTFILES.skip 2018-03-02 21:27:43 +01:00
Piotr Drąg
d8956aeff2 Update POTFILES.skip 2018-03-02 21:26:21 +01:00
Benjamin Otte
634717d0b9 gtk: Remove unused header files in gtk/ui/ 2018-03-02 02:00:25 +01:00
Benjamin Otte
88de098711 entry: Remove cursor adjustment APIs 2018-03-02 02:00:25 +01:00