Commit Graph

67228 Commits

Author SHA1 Message Date
Arnaud Bonatti
08f2990eac Document the GtkBuilder <requires> tag changes. 2020-11-07 16:17:14 +01:00
Arnaud Bonatti
e6d46ec5ad Teach gtk-builder-tool to rewrite <requires>. 2020-11-07 16:17:01 +01:00
Arnaud Bonatti
db6d7dccd8 Drop “gtk+” plus sign in GtkBuilder <requires>. 2020-11-07 16:16:55 +01:00
Piotr Drąg
4e8a5f2ec8 Update POTFILES.skip 2020-11-07 11:45:07 +01:00
Matthias Clasen
63e9414210 Merge branch 'wip/carlosg/for-master' into 'master'
Minor text handle fixes

See merge request GNOME/gtk!2787
2020-11-07 03:10:27 +00:00
Carlos Garnacho
4751ac1ac8 gtk/textview: Improve check for cursor-mode
Check the text handle role, instead of looking for the other handle
visibility. The other handle may be invisible during selection mode
(e.g. pointing to offscreen contents). This fixes both this code
switching to cursor mode out of the blue, and possible crashes later
on as this handle might be hidden in the process, while its own event
controller is handling events on the parent surface.
2020-11-06 14:30:18 +01:00
Carlos Garnacho
9d56c56117 gtk/texthandle: Point handle to the middle of the pointing_to rect
At least vertically, this gives again as much space up and down before
moving the selection the the prev/next line.
2020-11-06 14:28:46 +01:00
Matthias Clasen
0d82faa239 Merge branch 'wip/carlosg/for-master' into 'master'
Text handle fixes

Closes #3176

See merge request GNOME/gtk!2785
2020-11-06 01:23:16 +00:00
Matthias Clasen
fb27724042 Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
macos: tweak opacity, color/alpha size requests

See merge request GNOME/gtk!2786
2020-11-06 01:20:23 +00:00
Christian Hergert
90141ef305 macos: use NSOpenGLContext directly for current tracking
We don't need to interact with GdkGLContext here to keep the
current context active.
2020-11-05 13:57:41 -08:00
Christian Hergert
bc05da8dc0 macos: explicitly request color and alpha sizes 2020-11-05 13:37:25 -08:00
Christian Hergert
bf3e1e5b40 macos: use opaque GL context when possible
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
2020-11-05 13:34:29 -08:00
Carlos Garnacho
0ae93c8cdc gtk/textview: Do not forcibly show text handles
The gtk_text_view_set_handle_position() function called some lines above
takes care of handle visibility already, also accounting for other
conditions (e.g. whether the handle points to contents onscreen).
Forcibly showing handles here misbehaves if the handle should stay hidden,
and somewhat expensively as it involves creating and throwing a native
surface every time.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
f9813019a7 gtk/textview: Defer touchscreen focus placing to drag end
With the scrolledwindow drag gesture not claiming the sequence immediately,
we end up placing the cursor (and undoing the previous selection) each time
we scroll.

There is already handling too short drags in ::drag-end, so let this code
handle touchscreens as well.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
5e907ebd58 gtk/textview: Clean up further if the drag gesture is taken over
If the gesture becomes captured (e.g. from a parent scrolledwindow), we
leave some things in the air. Clean these up properly. This is recurrent
with touch scroll.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
fa5fa3a881 gtk/imcontextwayland: Unset focus when unsetting widget
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.

Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
2020-11-05 21:29:20 +01:00
Carlos Garnacho
9b9cc2f947 gtk/texthandle: Handle events on parent surface's native
In wayland, popup positioning and event handling are doubly async.
This makes it unreliable to figure out parent surface coordinates
out of the popup position and the events received. This results in
jumpy text handles there.

The best way to deal with parent surface coordinates is to handle
the events there. Make the handles transparent to input, and make
the drag gesture be set up on the parent widget's native.

The gesture is set up in the capture phase, setting it on the native
(as opposed to the parent widget) achieves a feeling similar to it
being a distinct surface, as it should take precedence over other
gestures in the emission chain (e.g. scrolledwindows).

As everything is in parent widget's native's coordinates, the drag
handles become smooth again.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
80f5be8b13 gdk/wayland: Ensure to update input area on map
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
2020-11-05 21:29:20 +01:00
Matthias Clasen
ec5b5e8aaa Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3325

See merge request GNOME/gtk!2784
2020-11-05 16:43:08 +00:00
Emmanuele Bassi
95463719ae Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master

See merge request GNOME/gtk!2783
2020-11-05 15:37:38 +00:00
Emmanuele Bassi
041415e9b4 docs: Add a note on the "presentation" role 2020-11-05 14:50:40 +00:00
Emmanuele Bassi
abd5383d40 docs: Add a section on accessible buttons
Anything that behaves like a button should do so at the accessibility
level as well.
2020-11-05 13:57:50 +00:00
Emmanuele Bassi
c5dc0e2e4c a11y: Use proper role and state for tree expander image
The "expander" image is a button, and it controls the expansion of the
row, so it has a state associated to it that we must update.
2020-11-05 13:46:43 +00:00
Emmanuele Bassi
88116712f6 a11y: Use "presentation" role instead of "hidden" state
The intended use case of the "presentation" role is

| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.

One of the examples is, literally:

| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);

Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
2020-11-05 13:25:53 +00:00
Emmanuele Bassi
7dfa41bbc4 a11y: ARIA's "presentation" role maps to ATSPI_ROLE_SECTION
See the mapping role table in the Core-AAM normative document:

https://w3c.github.io/core-aam/#mapping_role_table
2020-11-05 13:14:08 +00:00
Matthias Clasen
c09ff35df4 dragicon: Make a function propertly exported
Mark gtk_drag_icon_create_widget_for_value with
GDK_AVAILABLE_IN_ALL, since it is meant to be public.
Also, clarify the documentation a bit.

Fixes: #3325
2020-11-05 07:23:38 -05:00
Matthias Clasen
d526bcc71b Cosmetics
Fix argument ordering of gdk_cursor_new_from_name.
2020-11-04 23:36:09 -05:00
Matthias Clasen
13d1e497f7 testsuite: Improve GdkCursor coverage 2020-11-04 23:36:09 -05:00
Matthias Clasen
3eaae748d3 3.99.4 2020-11-04 21:46:10 -05:00
Matthias Clasen
7f16067383 Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
macos: gl context improvements and event cleanup

See merge request GNOME/gtk!2780
2020-11-05 02:21:02 +00:00
Matthias Clasen
024e048c26 Merge branch 'wip/chergert/fix-macos-pointer-position-over-surface' into 'master'
macos: fix calculation of mouse position

See merge request GNOME/gtk!2781
2020-11-05 02:19:18 +00:00
Christian Hergert
c31c3848df macos: fix calculation of mouse position
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
2020-11-04 18:03:54 -08:00
Matthias Clasen
b0e0af1838 Merge branch 'patch-5' into 'master'
Update comment annotations of gtk_tree_model_iter_previous and...

See merge request GNOME/gtk!2775
2020-11-05 01:53:34 +00:00
Matthias Clasen
3785bf1f17 Merge branch 'fix-issue-2019-for-master' into 'master'
[master] GdkW32: remove klassTEMPSHADOW

Closes #2019

See merge request GNOME/gtk!2750
2020-11-05 01:53:02 +00:00
Matthias Clasen
79fb5724f9 Merge branch 'mr1063-for-master' into 'master'
Forward port MR !1063 (Win32 IME fixes) to GTK master

See merge request GNOME/gtk!2777
2020-11-05 01:48:37 +00:00
Christian Hergert
65b2ea1888 macos: resize extra GL window/view when surface changes
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
2020-11-04 17:21:21 -08:00
Christian Hergert
6309bd12ac macos: clip damage when swapping buffers
This ensures that we only copy the changed area.
2020-11-04 17:21:17 -08:00
Christian Hergert
7444a151b2 macos: remove synthesize_motion helper
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
2020-11-04 16:58:50 -08:00
Christian Hergert
ce9cc2db86 macos: always create dummy window/view for GL context
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
2020-11-04 16:52:12 -08:00
Christian Hergert
e91b930648 Revert "Simplify gdk_surface_queue_render"
This reverts commit 2120e9df88.
2020-11-04 16:28:13 -08:00
Matthias Clasen
ed78fb1366 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2779
2020-11-04 20:41:09 +00:00
Matthias Clasen
388f12b7d9 Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master

See merge request GNOME/gtk!2778
2020-11-04 20:37:39 +00:00
Matthias Clasen
8ae415acff popovermenu: Fail gracefully if no model
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
2020-11-04 14:59:32 -05:00
Matthias Clasen
d2cc9365fc Cosmetics
Extraneous pair of parens snuck in with 2120e9df88.
2020-11-04 14:59:27 -05:00
Matthias Clasen
dcfb6e5ef5 surface: Be smarter about autohide
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
2020-11-04 14:56:30 -05:00
Matthias Clasen
75f96b83de surface: Be more lenient for autohide
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
2020-11-04 14:56:30 -05:00
Emmanuele Bassi
66bba1493e a11y: Remove stray g_printerr() 2020-11-04 19:39:08 +00:00
Emmanuele Bassi
1dde54b872 a11y: Hide the "indent" in GtkTreeExpander
It's just padding.
2020-11-04 19:38:14 +00:00
Emmanuele Bassi
c48a990778 a11y: Describe window controls
The window controls for client side decorations have only icons, which
means they are not accessible.
2020-11-04 18:59:11 +00:00
Matthias Clasen
23c425618e Merge branch 'a11y/atcontext-realize' into 'master'
A11y/atcontext realize

See merge request GNOME/gtk!2772
2020-11-04 18:10:55 +00:00