Commit Graph

70839 Commits

Author SHA1 Message Date
Matthias Clasen
81e5d4c327 Merge branch 'master' into 'master'
gtkbuilderparser: Fix duplicate object id detection

See merge request GNOME/gtk!3848
2021-08-18 12:00:41 +00:00
Ye Moran
f8111125ef gtkbuilderparser: Fix duplicate object id detection 2021-08-18 12:00:40 +00:00
Matthias Clasen
c020e83890 Merge branch 'matthiasc/for-master' into 'master'
Add a custom input test

See merge request GNOME/gtk!3851
2021-08-18 03:24:41 +00:00
Matthias Clasen
f6659fea8d imcontext: Improve docs
Add some more docs around GtkIMContext.
2021-08-17 22:33:26 -04:00
Matthias Clasen
a06858ccd9 Add a custom input test
This shows the minimal work required to hook up an
im context to a custom widget.
2021-08-17 22:33:26 -04:00
Emmanuele Bassi
c6c48d327c Merge branch 'wip/exalm/query-action-transfer' into 'master'
widget: Fix gtk_widget_class_query_action() annotations

See merge request GNOME/gtk!3843
2021-08-17 17:56:40 +00:00
Chun-wei Fan
5d0f188615 GDK-Win32: Reject WGL context if shaders aren't supported
When we initialize OpenGL, check whether we have OpenGL  2.0 or later; if not,
check whether we have the 'GL_ARB_shader_objects' extension, since we must be
able to support shaders if using OpenGL for GTK.

If we don't support shaders, as some Windows graphics drivers do not support
OpenGL adequately, notably older Intel drivers, reject and destroy the GL
context that we created, and so fallback to the Cairo GSK renderer, so that
things continue to run, albeit with an expected warning message that the GL
context cannot be realized.

Also, when we could not make the created dummy WGL context current during
initialization, make sure that we destroy the dummy WGL context as well.

Fixes issue #4165.
2021-08-17 16:25:09 +08:00
Benjamin Otte
78fcc8feb8 Merge branch 'wip/otte/for-master' into 'master'
gdk: Include Vulkan error code in vulkan_strerror()

See merge request GNOME/gtk!3844
2021-08-12 12:36:28 +00:00
Benjamin Otte
27cad85247 gdk: Include Vulkan error code in vulkan_strerror() 2021-08-12 14:19:30 +02:00
Simon Ser
ad0c1d4dbe gdk/wayland: add support for wl_seat version 7
Version 7 requires wl_keyboard keymaps to be mapped with
MAP_PRIVATE, so that the compositor can share the same keymap
file between multiple clients.
2021-08-11 16:37:03 +02:00
Simon Ser
00abaed89a gdk/wayland: add support for wl_seat version 6
Version 6 adds two new wl_touch events, which can be ignored.
2021-08-11 16:36:57 +02:00
Alexander Mikhaylenko
342f02711b widget: Fix gtk_widget_class_query_action() annotations
Add transfer none on all out values as they aren't being copied.
2021-08-11 14:33:38 +05:00
Matthias Clasen
d9c48a8d01 Merge branch 'matthiasc/for-master' into 'master'
Handle the new line height pango attribute

See merge request GNOME/gtk!3840
2021-08-10 15:08:20 +00:00
Matthias Clasen
d757696116 ci: Add libjpeg-turbo-devel to the Fedora image
This was getting downloaded from sourceforge every
time for the docs build, and that started failing.
2021-08-10 08:22:52 -04:00
Matthias Clasen
528ebfabf0 Handle the new line height pango attribute
Update all the places where we switch over PangoAttributeType
to handle (and ignore, for now) the new line height attribute.
2021-08-10 08:22:52 -04:00
Vincent Bernat
2ebde276d1 x11: ensure WM class is not null even if display is initialized early
With gtkmm, when using `Application()`, the display is initialized
before we know the application name and therefore, the program class
associated to the display is NULL.

Instead of providing a default value, we set it equal to program name
when NULL. Moreover, we give up on capitalizing the class name to keep
the code super simple. Also, not using a capitalized name is
consistent with `gdk_x11_display_open()`. If someone has a good reason
to use a capitalized name, here is how to do it.

```c
  class_hint = XAllocClassHint ();
  class_hint->res_name = (char *) g_get_prgname ();
  if (display_x11->program_class)
    {
      class_hint->res_class = (char *) g_strdup (display_x11->program_class);
    }
  else if (class_hint->res_name && class_hint->res_name[0])
    {
      class_hint->res_class = (char *) g_strdup (class_hint->res_name);
      class_hint->res_class[0] = g_ascii_toupper (class_hint->res_class[0]);
    }
  XSetClassHint (xdisplay, impl->xid, class_hint);
  g_free (class_hint->res_class);
  XFree (class_hint);
```

Fix eff53c023a ("x11: set a default value for program_class")
2021-08-10 09:14:36 +02:00
Matthias Clasen
04f3c8054b Merge branch 'callback-annotation-again' into 'master'
widget: Change callback scope

See merge request GNOME/gtk!3796
2021-08-10 01:16:56 +00:00
Benjamin Otte
ea07bf7536 Merge branch 'wip/otte/for-master' into 'master'
ngl: Make current when unrealizing

See merge request GNOME/gtk!3835
2021-08-08 01:09:31 +00:00
Benjamin Otte
80e6f1ca8c ngl: Make current when unrealizing
The profiler (at least) discards GL objects and we want to discard them
on the right context.
2021-08-08 02:17:08 +02:00
Matthias Clasen
54d29568ec Merge branch 'matthiasc/for-master' into 'master'
Cosmetics: Tweak css parser error messages

See merge request GNOME/gtk!3834
2021-08-07 22:48:32 +00:00
Matthias Clasen
4e1ea58503 Cosmetics: Tweak css parser error messages
These show up in tooltips, so they should a) be capitalized
and b) not end with a period.
2021-08-07 18:18:10 -04:00
Andre Klapper
90c429a91c Belarusian translation: Remove broken translation string 2021-08-07 19:10:23 +02:00
Andre Klapper
4b28e038e0 Khmer translation: Strip some invisible bytes from setting translations 2021-08-07 19:10:22 +02:00
Matthias Clasen
8df694a358 Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Spruce up the hypertext demo

See merge request GNOME/gtk!3832
2021-08-07 16:56:56 +00:00
Yaron Shahrabani
eb8778e1cd Update Hebrew translation
(cherry picked from commit 11e6ce1751)
2021-08-07 16:51:55 +00:00
Matthias Clasen
256f3a0d60 gtk-demo: Spruce up the hypertext demo
Use the newish allow-breaks pango attribute
to make the text break better.
2021-08-07 12:35:17 -04:00
Danial Behzadi
54c087e7ec Update Persian translation 2021-08-07 14:48:55 +00:00
Danial Behzadi
69a99b89f9 Update Persian translation
(cherry picked from commit b467881274)
2021-08-07 14:45:02 +00:00
Matthias Clasen
f328ab9d83 Merge branch 'wip/chergert/revert-top-margin' into 'master'
Revert "textview: fix yoffset position when top_margin is set"

See merge request GNOME/gtk!3828
2021-08-06 13:13:21 +00:00
Chun-wei Fan
8acce5f294 gdk/win32: Drop local DnD protocol
It is basically not used by default and is pretty much broken at this point, so
it's about time to drop it.

Let's focus on fixing the OLE2 DnD protocol.
2021-08-06 17:16:27 +08:00
Matthias Clasen
bdbe0acd1f Merge branch 'matthiasc/for-master' into 'master'
settings: Default gtk-split-cursor to FALSE

See merge request GNOME/gtk!3827
2021-08-05 19:17:54 +00:00
Christian Hergert
fc701baef8 Revert "textview: fix yoffset position when top_margin is set"
This reverts commit 908b1e5e12.

This commit broke top-margin altogether.
2021-08-05 11:52:45 -07:00
Matthias Clasen
a457a81fd9 Merge branch 'matthiasc/for-master' into 'master'
text: Move setup code out of a loop

See merge request GNOME/gtk!3826
2021-08-05 18:45:39 +00:00
Matthias Clasen
4cc7977d36 settings: Default gtk-split-cursor to FALSE
According to Owen, this was the intention when the setting
was added in 2001. It only took us 20 years to fix the
default value.
2021-08-05 14:05:28 -04:00
Matthias Clasen
e5e7f5dd88 ci: Disable treeview-headers-hidden reftest
Somebody needs to figure out why it fails in ci so
frequently.
2021-08-05 12:41:04 -04:00
Matthias Clasen
916886312a Merge branch 'wip/exalm/shadow-extents' into 'master'
Shrink shadow extents

See merge request GNOME/gtk!3825
2021-08-05 16:39:52 +00:00
Matthias Clasen
8ff94ea1f2 text: Move setup code out of a loop
Just a cleanup, no functional change.
2021-08-05 12:31:18 -04:00
Matthias Clasen
053bd0cd31 Merge branch 'fix-tab-not-captured-in-popover' into 'master'
popovermenu: Cycle around focus also with (Shift+)Tab

Closes #3915

See merge request GNOME/gtk!3732
2021-08-05 02:07:43 +00:00
vanadiae
a3ce574193 popover: Cycle around focus with (Shift+)Tab
Same thing as the previous popovermenu commit, except for the base popover
because the popovermenu needs special behaviour with e.g. sides arrow so
we need to have the "cycle around" for regular popovers here too.
2021-08-04 12:11:44 +02:00
vanadiae
ef92adc87d popovermenu: Cycle around focus also with (Shift+)Tab
Currently when moving the focus with (Shift+)Tab, it also traverses the window's
widgets, although it would be expected that the focus stays within the popover,
as it's (almost) like it's a separate window. This would be consistent with
the behaviour of the Up/down arrows, which do cycle around the focus once it
reaches the end.

So this commit makes the popovermenu cycle around focus in any direction, apart
from left/right because they are used to open and close submenus and it wouldn't
make sense anyway to cycle horizontally as there's usually only one widget per
line.
2021-08-04 12:11:44 +02:00
Alexander Mikhaylenko
46a9538b6a Shrink shadow extents
Long time ago, Cairo shadows in both GTK3 and 4 were drawn at a size about
twice their radius. Eventually this was fixed but the shadow extents are
still calculated for the previous size and appear unreasonably large: for
example, 141px for a 50px radius shadow. This can get very noticeable in
places such as invisible window frame which gets included into screenshots.

https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3419 just divides the
radius by 2 when drawing a shadow with Cairo, do the same when calculating
extents.

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3841
2021-08-04 14:47:17 +05:00
Matthias Clasen
ca547b8716 Merge branch 'combobox-keynav' into 'master'
treepopover: Add keynav

See merge request GNOME/gtk!3822
2021-08-03 11:20:56 +00:00
Matthias Clasen
04ea51e843 treepopover: Start adding keynav
Arrange for the items to be focusable, and add keyboard
activation. Still missing: cycling focus inside the
popover.
2021-08-02 23:49:05 -04:00
Matthias Clasen
f7dc0dda4e Merge branch 'big-keysyms' into 'master'
imcontext: Treat keysyms as 32bit values

Closes #4149

See merge request GNOME/gtk!3819
2021-08-03 01:05:16 +00:00
Matthias Clasen
8713843022 Merge branch 'surround-test' into 'master'
Remove an unimplemented function

Closes #4151

See merge request GNOME/gtk!3820
2021-08-03 01:00:13 +00:00
Matthias Clasen
6563b05d60 Add some GtkIMContext tests
For now, these check that the surrounding handling
in GtkText and GtkTextView is sane.

Fixes: #4151
2021-08-02 20:44:40 -04:00
Matthias Clasen
d119c55b72 textview: Fix the get_surrounding implementation
This was, sadly, returning garbage.
2021-08-02 20:44:40 -04:00
Matthias Clasen
253e25a73c Add a private getter for the textview key controller
This will be used in tests.
2021-08-02 20:44:40 -04:00
Matthias Clasen
c63774967f Remove an unimplemented function
_gtk_entry_get_im_context does not exist.
2021-08-02 20:44:40 -04:00
Matthias Clasen
bbc36448fb imcontext: Treat keysyms as 32bit values
Our compose table format is still limited to 16bit
values for keysyms, but what we see in key events
can be 32bit values, and we treat them as such now.

Fixes: #4149
2021-08-02 19:16:18 -04:00