Commit Graph

67139 Commits

Author SHA1 Message Date
Emmanuele Bassi
4e1191550c Merge branch 'patch-4' into 'master'
gtk/gtkversion: fix doc comment references

See merge request GNOME/gtk!2798
2020-11-08 00:50:40 +00:00
David Lechner
3b1363d31a gtk/gtkversion: fix doc comment references
Cross-references for constants use the "%" prefix rather than the "#" prefix.
2020-11-07 23:57:13 +00:00
Emmanuele Bassi
b9adad304e Merge branch 'patch-6' into 'master'
gtk/enums: remove GtkPopoverConstraint

See merge request GNOME/gtk!2796
2020-11-07 22:19:33 +00:00
Emmanuele Bassi
ef17d716d7 Merge branch 'patch-4' into 'master'
doc: fix missing GtkNotebookTab

See merge request GNOME/gtk!2794
2020-11-07 22:01:33 +00:00
Emmanuele Bassi
8ec01772be Merge branch 'patch-5' into 'master'
gtk/enums: remove GtkMenuDirectionType

Closes #3336

See merge request GNOME/gtk!2795
2020-11-07 21:59:04 +00:00
David Lechner
4084b4c6c6 gtk/enums: remove GtkPopoverConstraint
GtkPopoverConstraint is no longer used anywhere and can be removed.
2020-11-07 21:47:32 +00:00
David Lechner
c3cb8e0a79 gtk/enums: remove GtkMenuDirectionType
This was used by GtkMenu and can safely be removed.

Closes #3336
2020-11-07 21:39:34 +00:00
Emmanuele Bassi
19b5e5349e Merge branch 'gles-no-queries' into 'master'
gl renderer: Generate queries only on desktop GL

See merge request GNOME/gtk!2792
2020-11-07 21:33:09 +00:00
Emmanuele Bassi
f87923e09e Merge branch 'patch-3' into 'master'
docs: include GtkFilterMatch

See merge request GNOME/gtk!2793
2020-11-07 21:32:40 +00:00
David Lechner
05684f6c3c doc: fix missing GtkNotebookTab
GtkNotebookTab was listed under private, but it is used by the "focus-tab" signal, so it needs to be public.
2020-11-07 21:17:09 +00:00
Emmanuel Gil Peyrot
08193ecf1c gl renderer: Generate queries only on desktop GL
On desktop GL, GL 1.5 or GL_ARB_occlusion_query is required to get the
glGenQueries() etc. symbols.  This isn’t the case on GLES, where they
are provided by GL_EXT_occlusion_query_boolean, and more importantly
have never been made core.

This patch allows gtk4-demo to start when GDK_DEBUG=gl-gles is set, on
my Mali 400 MP running the Lima driver from Mesa.
2020-11-07 21:49:42 +01:00
David Lechner
8c9a827516 docs: include GtkFilterMatch
The GtkFilterMatch enum type was missing from the documentation.
2020-11-07 20:45:41 +00:00
Timm Bäder
638987f359 Merge branch 'dlech-master-patch-13962' into 'master'
gtk/enums: fix doc comment references

See merge request GNOME/gtk!2791
2020-11-07 18:47:55 +00:00
David Lechner
8190f0c420 gtk/enums: fix doc comment references
Enum members need a "%" prefix rather than "@" or "%@" in order to
automatically create links in the documentation.
2020-11-07 17:46:26 +00: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