Commit Graph

69697 Commits

Author SHA1 Message Date
Benjamin Otte
5ab6eca84d cellarea: Don't shrink area too much
Do not compute rectangles with negative width/height. This avoids
assertion failures further down when those rectangles were actually
checked.

https://bugzilla.redhat.com/show_bug.cgi?id=1962215


(cherry picked from commit 4ba89f25b8)
2021-06-18 10:18:27 -07:00
Matthias Clasen
024151fe2c treeviewcolumn: Clip header buttons
We don't want to overdraw when dragging a narrow column
around, and we also need the clipping to avoid picking
the wrong column, when a later column button overlaps
an earlier one.

Fixes: #4045
2021-06-18 10:17:49 -07:00
Matthias Clasen
d5bfcdc218 Merge branch 'fix-3793-4-2' into 'gtk-4-2'
gdksurface-win32.c: Fix up popup placement (fix issue #3793 for gtk-4-2)

See merge request GNOME/gtk!3675
2021-06-18 17:17:01 +00:00
Chun-wei Fan
90bd5a04fd gdksurface-win32.c: Fix up popup placement
If we are undergoing a surface move, just apply the next_layout anyways,
even if we are not moving a toplevel surface.

Update the way how we obtain the x and y coordinates of a surface, if it
is a toplevel, apply the x and y coordinates from the results from we
obtained the underlying Win32 HWND, as we did before.  But if it is a
popup, use gdk_win32_surface_get_geometry() to obtain the correct x and
y coordinates to place our popup surface.

Also correct how we compute the shadow dimensions, and the final popup
rectangle as we attempt to layout the popup surface, since GDK-Win32
keeps track of the shadow dimensions in system (unscaled) units, not GDK
units.

Fixes issue #3793.
2021-06-18 10:18:56 +08:00
Chun-wei Fan
16da71f1ce gdksurface-win32.c: Fix formatting for popup functions 2021-06-18 10:18:56 +08:00
Hugo Carvalho
807537dd5d Update Portuguese translation 2021-06-17 14:44:36 +00:00
Daniel Mustieles
b3fa74d1ac Updated Spanish translation 2021-06-15 13:04:34 +02:00
Daniel Mustieles
dcb620e103 Updated Spanish translation 2021-06-15 13:04:26 +02:00
Matthias Clasen
c573732ef1 Merge branch 'alatiera-gtk-4-2-patch-27279' into 'gtk-4-2'
NEWS: use the correct version for the header

See merge request GNOME/gtk!3657
2021-06-11 00:17:40 +00:00
Jordan Petridis
69e72341a2 NEWS: use the correct version for the header 2021-06-10 20:54:06 +00:00
Matthias Clasen
2a0a55ae97 Merge branch 'wip/carlosg/spin-button-swipe-gesture-4-2' into 'gtk-4-2'
spinbutton: Connect swipe gesture to the text entry

See merge request GNOME/gtk!3651
2021-06-08 17:07:53 +00:00
Carlos Garnacho
6df3296211 spinbutton: Mind the step in the swipe gesture
The swipe gesture forces values in the spin button that are
"impossible" according to the adjustment. This can break things
in creative ways.

Ensure the steps provided are always multiples of the adjustment
step value, and keep the remainder for further interaction.
2021-06-08 18:35:39 +02:00
Carlos Garnacho
a00d3b107e spinbutton: Connect swipe gesture to the text entry
In the GTK3 days, the spin button was an entry, with buttons on
top, and the swipe gesture affected the input on the entry bits.
Now the spin button is a container, so this gesture in the capture
phase applies to all contained children (incl. buttons).

Attach this gesture to the entry itself, so the buttons are left
outside this business. The gesture is still in the capture phase
in order to prevent text selection/edition/etc to happen.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4008
2021-06-08 18:35:38 +02:00
Matthias Clasen
4ffcc9aa26 Merge branch 'wip/carlosg/no-early-popup-ungrabs-4-2' into 'gtk-4-2'
gdk/wayland: Break only implicit grabs on wl_pointer.leave w/ pressed buttons (4.2)

See merge request GNOME/gtk!3640
2021-06-06 12:31:59 +00:00
Carlos Garnacho
e7fdb43499 gdk/wayland: Break only implicit grabs on wl_pointer.leave w/ pressed buttons
The releasing of grabs while a button is pressed (e.g. after starting dnd, or
dragging the window, or going to overview with a pressed button, etc...) was
generalized here in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1879.

However we shouldn't break all grabs here. In the case of grabbing popups,
compositors will still emit crossing events between client surfaces (e.g.
popping up and selecting a menu item via press-drag-release), breaking all
grabs here means inconsistent client state, that was
https://gitlab.gnome.org/GNOME/gtk/-/issues/2746.

That was fixed in mutter, by essentially making implicit grabs
owner_events=FALSE, however that breaks the mentioned use pattern entirely.
Mutter is changing this behavior back, so GTK should handle these crossing
events.

The grab that we are interested in breaking here is the implicit pointer
one. Popups will be dismissed via other means if the compositor says their
active grab needs breaking. This still leaves dnd/move/resize drags in
one place, while not allowing #2746 to happen with popups.
2021-06-05 18:29:39 +02:00
Matthias Clasen
03be0994ad Merge branch 'imcontext-ignore-more-4-2' into 'gtk-4-2'
imcontext: Ignore more keysyms

See merge request GNOME/gtk!3635
2021-06-05 02:39:51 +00:00
Matthias Clasen
073c40c738 imcontext: Ignore more keysyms
It finally dawned on my that #3673 is just another
case of unexpected keysyms getting sent our way via
fringe XKB features.

Ignore them all!
2021-06-04 21:29:17 -04:00
Anders Jonsson
b3d6202833 Update Swedish translation 2021-06-04 21:16:04 +00:00
Matthias Clasen
bf09dc47fd docs: Assorted fixes
Fix all the link syntax errors, now that gi-docgen
reports them.
2021-06-01 18:01:14 -04:00
Matthias Clasen
4e031a9542 Merge branch 'notebook-critical-4-2' into 'gtk-4-2'
Fix a critical in notebook code

See merge request GNOME/gtk!3616
2021-06-01 18:08:59 +00:00
Caolán McNamara
8d263eed02 invalid cast from 'GtkButton' to 'GtkBox'
on adding a page to a GtkNotebook

(soffice): Gtk-CRITICAL **: gtk_box_remove: assertion 'GTK_IS_BOX (box)' failed
2021-06-01 12:39:17 -04:00
Matthias Clasen
5047f79218 Merge branch 'fix.vs2013.link.4-2' into 'gtk-4-2'
gtk/meson.build: Fix linking on Visual Studio 2013 (gtk-4-2 branch)

See merge request GNOME/gtk!3576
2021-05-26 14:43:40 +00:00
Matthias Clasen
54885d14bf Merge branch 'ignore-nosymbol-press-4-2' into 'gtk-4-2'
imcontext: Ignore NoSymbol key events

See merge request GNOME/gtk!3592
2021-05-25 18:14:52 +00:00
Matthias Clasen
c231ce6a9f Merge branch 'fix-im-reset-4-2' into 'gtk-4-2'
imcontextsimple: Fix a possible problem

See merge request GNOME/gtk!3585
2021-05-25 17:29:30 +00:00
Matthias Clasen
c12f1ebebb imcontext: Ignore NoSymbol key events
These can happen with some XKB options.

Fixes: #3973
2021-05-25 13:24:41 -04:00
Matthias Clasen
6c1f404e5a imcontextsimple: Fix a possible problem
We were forgetting to handle the compose sequence
case in reset().
2021-05-25 08:05:50 -04:00
Chun-wei Fan
caa5fd0584 gtk/meson.build: Fix linking on Visual Studio 2013
Visual Studio 2013's linker does not suport `/WHOLEARCHIVE:`, just
explicitly extract the objects from the static libraries that will
form the final GTK DLL.
2021-05-24 10:32:48 +08:00
Matthias Clasen
d883b0a383 Merge branch 'cherry-pick-7db87a88' into 'gtk-4-2'
Merge !3565 into gtk-4-2

See merge request GNOME/gtk!3566
2021-05-21 16:19:12 +00:00
Matthias Clasen
ffcbc44c7f Merge branch 'ci-image-4-2' into 'gtk-4-2'
ci: Stop using a separate docs image

See merge request GNOME/gtk!3573
2021-05-21 03:08:19 +00:00
Matthias Clasen
633d59fff9 build: Fix default options for gdk-pixbuf
The gdk-pixbuf subproject api changed (options changed
from boolean to feature). Adapt to that.
2021-05-20 22:05:20 -04:00
Matthias Clasen
939a254e28 ci: Stop using a separate docs image
No longer needed with gi-docgen.
2021-05-20 21:49:26 -04:00
Benjamin Otte
06a0265efa Merge branch 'fix-gst-media-file' into 'master'
gtkgstmediafile: Remove media-info-updated callback

Closes #3913

See merge request GNOME/gtk!3565

(cherry picked from commit 7db87a8889)

12a9a0fa gtkgstmediafile: Remove media-info-updated callback
2021-05-19 16:51:53 +00:00
Matthias Clasen
f639fda994 Merge branch 'pixbuf-fix-for-4-2' into 'gtk-4-2'
Meson: gdk-pixbuf jpeg/png options changed to feature

See merge request GNOME/gtk!3532
2021-05-07 21:14:51 +00:00
Xavier Claessens
26805edcff Meson: gdk-pixbuf jpeg/png options changed to feature 2021-05-07 15:34:52 -04:00
Matthias Clasen
d5db409c44 Merge branch 'wip/carlosg/map-emulated-moveresize-window-4.2' into 'gtk-4-2'
gdk/x11: Ensure to map the non-ewmh moveresize emulation window before use

See merge request GNOME/gtk!3530
2021-05-07 19:32:46 +00:00
Carlos Garnacho
b6a4ffef36 gdk/x11: Ensure to map the non-ewmh moveresize emulation window before use
Otherwise, we don't deem it as able to be grabbed, which we intend to do
immediately after.
2021-05-07 16:28:07 +02:00
Matthias Clasen
ba44668478 4.2.1 2021-05-03 21:37:09 -04:00
Matthias Clasen
2f921ab667 dragsource: Keep the source alive long enough
When a drop causes the event controller to be finalized
(directly or indirectly), we end up segfaulting while
trying to wrap up the drag operation. So, keep a reference
on the GtkDragSource from when the drag begins to when
it is done.

This fixes a crash in gnome-todo when dragging tasks.
2021-05-03 21:20:54 -04:00
Matthias Clasen
d9784df92e inspector: Improve monitor information display
Avoid a nested listbox, show the connector,
don't show information we don't have. Also,
disconnect all signal handlers from the display
when the inspector is going away.
2021-05-03 21:20:08 -04:00
Matthias Clasen
6a5f93ff95 shortcuts: Ignore consumed modifiers for mnemonics
This is necessary to make mnemonics like Alt-1 work in
layouts where numeric keys are shifted, like AZERTY.

Fixes: #3912
2021-05-03 21:19:43 -04:00
Matthias Clasen
7578a18cd6 contentdeserializer: Fix an oversight
The argument passed with string_deserializer must be
a charset name. Passing the mimetype there does not
make sense.
2021-05-03 21:19:28 -04:00
Ivan Molodetskikh
a5895b5995 gtkgstmediafile: Fix callback argument type 2021-05-03 21:19:14 -04:00
Matthias Clasen
37582c6bf9 wayland: Rewrite shm format debug spew
Rewrite this in a way that doesn't depend on kernel
header defines at the time the wayland scanner was run.

This was causing the build to break on Centos 8, where
a bunch of fourcc formats are missing.
2021-05-03 21:19:07 -04:00
Matthias Clasen
84f02c633c Check for root being a GtkWindow in a few places
These things were showing up as crashes during DND,
when the root is a GtkDragIcon. I'm sure there's more.
2021-05-03 21:18:59 -04:00
Bilal Elmoussaoui
fdb2776577 gdk: add zero-terminated annotation to content_formats_get_gtypes 2021-05-03 21:18:48 -04:00
Bilal Elmoussaoui
94539d469c gdk: fix content_formats_get_mime_types annotation 2021-05-03 21:18:42 -04:00
Chun-wei Fan
f6a2d8148b gdkglcontext-win32.c: Fix running with Mesa drivers
Some GL drivers such as Mesa-D3D12 do not allow one to call SetPixelFormat() on
a given HDC if one pixel format has been already set for it, so first check the
HDC with GetPixelFormat() to see whether a pixel format has already been set
with the HDC, and only attempt to acquire the pixel format if one has not been
set.

This will fix running with GL/NGL on Windows using the Mesa drivers.
2021-05-03 21:18:26 -04:00
Geyslan G. Bem
35e3eaf8cb gtkplacessidebar.c: fix coding style
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
2021-05-03 21:18:20 -04:00
Emmanuele Bassi
2bc7b64004 docs: Add missing extra files for gdk4 sub-references
The Wayland and X11 references need the gtk-logo.svg and the urlmap.js
extra files.

Fixes: #3905
2021-05-03 21:18:03 -04:00
David Lechner
2df07f0564 gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available
When building for homebrew/linuxbrew on Ubuntu 16.04, memfd_create() is
not available and causes the build to fail.

This adds a proper check for the function.
2021-05-03 21:17:53 -04:00