Commit Graph

53797 Commits

Author SHA1 Message Date
Benjamin Otte
dfc131c7ec toolpalette: Remove
The widget was basically unmaintained since GTK 3.0 and the only known
user was Glade.
2018-02-03 11:52:37 +01:00
Benjamin Otte
55874470ff gtk: Remove GtkRecentChooser
It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.
2018-02-02 23:01:31 +01:00
Benjamin Otte
bb8baa2b76 tests: Unrealize renderer
Renderers must be unrealized these days.
2018-02-02 15:34:34 +01:00
Benjamin Otte
38b25599d8 texture: Add sanity checks to constructors
width, height and GL texture ID may not be 0, so return_if_fail() if
they are.
2018-02-02 14:59:23 +01:00
Benjamin Otte
df0b4d6684 texture: Make the texture id a guint
Texture IDs are unsigned, so treat them like that.
2018-02-02 14:59:23 +01:00
Emmanuele Bassi
fcaa9aa22d Rename GtkActionMuxer's private header
Follow the naming policy for private headers.
2018-02-02 10:28:17 +01:00
Emmanuele Bassi
1ed17df7a0 Rename GtkActionHelper private header
Follow the naming scheme for private headers.
2018-02-02 10:28:17 +01:00
Emmanuele Bassi
0ec744a3a5 Split list of sources
We need to have two lists: one, with the list of sources that need to be
introspected; and one with the list of sources that contain only private
symbols.

This reduces the amount of source files that the introspection scanner
needs to traverse, and thus the build time.
2018-02-02 10:28:17 +01:00
Emmanuele Bassi
b8828023e6 docs: Annotate gdk_keymap_get_display()
Avoid a warning from the introspection scanner.
2018-02-01 16:13:53 +01:00
Emmanuele Bassi
3a2aa2bd80 Remove unnecessary gtk-doc stanza
The places sidebar is not a publicly documented API, so there's no need
to use a gtk-doc stanza — especially if the syntax of the stanza is
wrong.
2018-02-01 16:08:51 +01:00
Emmanuele Bassi
a379ddefc3 Remove leading underscore from private symbols
There's no need to do that any more, as only explicitly annotated
symbols are exported.
2018-02-01 16:05:58 +01:00
Emmanuele Bassi
fe142b10bf Rename gtkiconcachevalidator.h
Follow the same convention for private headers as newer parts of GTK.
2018-02-01 16:01:38 +01:00
Emmanuele Bassi
e090c1f1a9 Rename gtkiconcache.h
The gtkiconcache.h header is private, so rename it to follow the naming
scheme for private headers.
2018-02-01 15:34:57 +01:00
Emmanuele Bassi
a313417879 Replace boilerplate in GtkIcon
Be a good GObject citizen and use G_DECLARE_FINAL_TYPE instead of
writing the usual GObject boilerplate.
2018-02-01 15:30:39 +01:00
Matthias Clasen
8916ff8ffe iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 17:44:26 +01:00
Benjamin Otte
02892c59d1 dnd: Remove unused member variable 2018-01-31 13:21:26 +01:00
Benjamin Otte
bdd2f68ab5 dnd: Move GdkDragProtocol to X11
It's not needed in the generic implementation, so don't have it there.
2018-01-31 13:21:26 +01:00
Benjamin Otte
3e0fab6b93 dnd: Remove 2 vfuncs that aren't needed
They're only used inside the X11 backend, and the backend can just call
its own function.
2018-01-31 13:21:26 +01:00
Timm Bäder
e8986d18c2 icon browser: Remove usage of stock-size property
Does not exist anymore.
2018-01-30 21:51:59 +01:00
Timm Bäder
972c0fa998 Revert "menu: Simplify popup_at_rect"
This reverts commit a29306cb1e.
2018-01-30 21:51:59 +01:00
Timm Bäder
c8a936cdcc range: Always queue an allocate if the adjustment changed
The slider gets its new size in size-allocate, so we have to do this
even if the range has no origin.
2018-01-30 21:51:50 +01:00
Jason Gerecke
6fd6ff2ea1 wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:07 +01:00
Nuclear Sunshine
cb5c739f93 Add AGPL3-only licence to GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=792793
2018-01-28 14:36:28 +00:00
Timm Bäder
228b35c111 gl: Add test case for clipped cross fade nodes 2018-01-27 12:19:22 +01:00
Timm Bäder
6e70079e63 gl renderer: Reset clip when drawing offscreen
Just like we reset the scissor test and the viewport, we also can't use
the current clip anymore in this case.
2018-01-27 12:13:37 +01:00
Timm Bäder
c1882fe44e GskRoundedRect: Fix GSK_ROUNDED_RECT_INIT macro
GskRoundedRect does not have a .rect member, it's 'bounds'. Also,
properly initialize all fields, i.e. all the corners.
2018-01-27 12:11:49 +01:00
Timm Bäder
684624005a gl renderer: Fix hidpi cairo node rendering
We can't just unconditionally create a larger texture here, since the
incoming cairo surface might have a device scale that doesn't fit our
scale_factor. Instead, look up the surface device scale and use that.
2018-01-27 11:06:38 +01:00
Timm Bäder
1fb5d389db gl renderer: Make width/height relation more obvious
In add_offscreen_ops, we use the max_x/min_x values for the texture and
viewport width, and the max_y/min_y for the texture and viewport height.
2018-01-27 11:00:59 +01:00
Timm Bäder
794d9d266e inspector: Actually call the pick() vfunc when picking
Otherwise, overridden pick vfuncs don't work and we e.g. pick widgets
scrolled away in a viewport.
2018-01-26 17:29:30 +01:00
Timm Bäder
60fdeda599 entry: Remove unused struct members 2018-01-26 17:29:30 +01:00
Timm Bäder
a29306cb1e menu: Simplify popup_at_rect
No need to keep a separate current_event variable around, we don't use
it anyway.
2018-01-26 17:29:30 +01:00
Matthias Clasen
f00f5508d4 gdk: Stop referring to ::key-press/release-event
These signals are going away, don't mention them in
the docs.
2018-01-24 12:04:32 +01:00
Matthias Clasen
063592f350 entry completion: Stop using key-press/release-event
We can use the existing ::event handler for this.
2018-01-24 12:04:27 +01:00
Timm Bäder
6806c28b1e gsk: Add test case for last commit 2018-01-23 21:46:31 +01:00
Timm Bäder
e3557f681c gl renderer: Fix outset shadow outline transform
This fixes hidpi blurred outset shadows
2018-01-23 21:46:31 +01:00
Emmanuele Bassi
f83b3c8af2 Enforce UTF-8 encoding when opening C files
We have a couple of Python 3.x scripts that parse C files, and since C
does not have any encoding, we need to force one ourselves, to avoid the
case when we're running the build in a non-UTF-8 locale.

https://bugzilla.gnome.org/show_bug.cgi?id=792497
2018-01-23 14:04:49 +01:00
Daniel Boles
b91fc17a19 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:10:58 +00:00
GNOME Translation Robot
37482c81c7 Update Esperanto translation
(cherry picked from commit 814c55d473)
2018-01-22 18:35:04 +00:00
Juan Pablo Ugarte
f2019e61db GtkGestureMultiPress: check event state before emiting released signal
Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
2018-01-22 15:52:58 +01:00
Timm Bäder
fbd79d8fea widget: Only initialize bounds rect if necessary
We only use the graphene_rect_t version of the offset_clip for the
fallback cairo nodes.
2018-01-21 20:37:46 +01:00
Timm Bäder
fb81686a89 vulkan: Fix release builds 2018-01-21 15:23:17 +01:00
Timm Bäder
d6c2ef3b71 combobox: Remove some unneeded includes 2018-01-21 11:01:32 +01:00
Simon McVittie
e22990302a Set GDK_WINDOW_STATE_TILED if any edge is tiled
This state flag is used in several places in GTK+, for example to
ignore RESIZE_INC hints if tiled. Setting it is also necessary for
backwards compatibility with applications that changed their behaviour
when tiled, such as GNOME Terminal and its MATE fork.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2018-01-20 13:10:49 +01:00
Georges Basile Stavracas Neto
42ff22f222 display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516
2018-01-20 13:10:42 +01:00
Timm Bäder
4d36a0bf35 entrycompletion: Realize toplevel before attempting a grab
Otherwise, gtk_widget_get_window returns NULL and we can't successfully
perform a grab via the later gdk_set_grab call. This fixes the entry
completion in the file chooser not working.
2018-01-19 22:39:23 +01:00
Matthias Clasen
af0d876bb7 tests: Remove some unneeded gtk_widget_show calls
Widgets are visible by default now.
2018-01-19 23:29:13 +03:00
Matthias Clasen
ffef28a7e8 iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 23:29:13 +03:00
Matthias Clasen
f942d6f53c Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 23:29:13 +03:00
Carlos Garnacho
7d9af6d700 gtkwindow: Disconnect GdkSeat::device-removed callback on finalize
Otherwise dangling callbacks may lead to crashes.
2018-01-19 18:47:21 +01:00
Timm Bäder
8f4e0705dc gl renderer: Fix shadow node child offset
We shouldn't apply the shadow offset when drawing the child offscreen,
instead apply it afterwards when we draw it to the current render
target.
2018-01-19 15:00:22 +01:00