Commit graph

22,459 commits

Author SHA1 Message Date
cd6e01acde cups: don't leak the entered password 2026-10-17 23:59:00 +02:00
aaccf7898a widgets: dnd, tooltip and menu fixes from GTK 3
Backported from GTK 3:

- selections to a vanished window and drags without targets are safe
- drag source events no longer leak
- tooltips hide on scroll, their window is freed with the display
- menu paging reads no stale heights
- a paned keeps a position set to its current value
- hidden active radio buttons let focus in
- small pages scroll at most half a page per wheel step
- tool buttons without an icon show their label
- a NULL title clears it

Upstream commits:

- d632474b74 (Matthias Clasen)
- 48770fda30 (Olivier Brunel)
- 057a50d58e (Behdad Esfahbod)
- 92ddf14457 (William Jon McCann)
- a265d8f32d (Philip Withnall)
- df0e5cc8e6 (Philip Chimento)
- c3deff17a6 (John Ralls)
- 276a510b4b (Cosimo Cecchi)
- 01136618b8 (Owen W. Taylor)
- 73e799474a (Matthias Clasen)
- 9a03fc906a (Matthias Clasen)
- c0ba041c73 (Michael Natterer)
- d38bf4825a (Javier Jardón)
2026-10-17 23:47:18 +02:00
7511c8ec00 treeview, combobox: fixes from GTK 3
Backported from GTK 3:

- a custom search entry is released with the view
- deleting a row with a selected child emits changed
- the first pixel of a column belongs to it
- grid lines in right-to-left order
- row deletions reach views that don't ref rows
- autosize columns outside a view are quiet
- combo popups free paths and read no uninitialized cells

Upstream commits:

- 55012318a6 (Vadim Godunko)
- 7faf5ee765 (Claudio Saavedra)
- c4224bf9d0 (Matthias Clasen)
- c15a7877e9 (Guillaume Desmottes)
- 67a00991b7 (Matthias Clasen)
2026-10-17 23:45:28 +02:00
4623eaed8e text: entry, label and text view fixes from GTK 3
Backported from GTK 3:

- setters during the first style of a text view no longer crash
- a text view destroyed during a selection drag keeps its buffer
- tags up to the end relayout
- a link handler that changes the label is safe
- label selections survive setting the same text
- cut, copy and paste with the keypad
- Select All only when there is text
- IM cursor positions in characters
- accelerator labels without XF86
- spin buttons take digits of other scripts

Upstream commits:

- ad1c0f7155 (Matthias Clasen)
- d7696bd25f (Tristan Van Berkom)
- c6a7a0889c (Bastien Nocera)
- 8f6cd8d86d (Sébastien Granjoux)
- f19ecbb850 (Matthias Clasen)
- 0d6cff45c3 (Matthias Clasen)
- b23eabbd64 (Sébastien Wilmet)
- 8da5111edd (Marek Kasik)
- f74a75ae7e (Matthias Clasen)
- 0840f13c15 (Timm Bäder)
- fa69e5f42d (Matthias Clasen)
- b6783933c9 (Matthias Clasen)
- 54c3f05848 (Matthew Barnes)
2026-10-17 23:32:21 +02:00
02596a975f gdk: visibility, RandR and event time fixes from GTK 3
Backported from GTK 3:

- client-side windows get visibility events when they ask
- unplugging a monitor while RandR is read no longer kills the program
- transient-for an offscreen window is ignored
- win32 event times survive 49.7 days of uptime
- win32 modifier keys are marked as such
- quartz moves windows in begin_move_drag
- quartz skips offscreen windows on monitor changes

Upstream commits:

- 7ec927a386 (Alexander Larsson)
- 4cf5ce2e08 (Charles Reiss)
- 394fe4b57e (Ryan Lortie)
- f3f998efd7 (fiddlerwoaroof)
- 0c72ce94ea (Luca Bacci)
- f74f81f06b (Руслан Ижбулатов)
- 0274b2c94e (Руслан Ижбулатов)
2026-10-17 20:34:36 +02:00
25d594e965 widgets: show-hidden, tool palette and -0 fixes from GTK 3
Backported from GTK 3:

- show-hidden set by the program isn't overridden by the settings
- tool palette groups move where asked
- no leaks in tool item group headers and unknown builder actions
- an entry icon replaced during a click keeps its release
- the sort order of the default sort column changes
- scales and spin buttons show 0 instead of -0

Upstream commits:

- e2b9caf26a (Matthias Clasen)
- 9753bea6a4 (Matthias Clasen)
- 18e8842a7e (Matthias Clasen)
- 88e372cd09 (Matthias Clasen)
- 5ca860dcaf (Matthias Clasen)
- f23e99b063 (Matthias Clasen)
- 53bc2566b3 (Matthias Clasen)
- 6a507c0b63 (Tristan Partin)
2026-10-17 19:31:18 +02:00
bb636048f2 gdk: event filter, X11 and quartz fixes from GTK 3
Backported from GTK 3:

- an event filter removed and re-added while running runs again
- an untrusted X client no longer dies on a beep
- no pid in a Flatpak sandbox that the window manager could kill
- quartz drops the pointers of a destroyed window
- win32 centers on a fully set rectangle

Upstream commits:

- 5ac848d229 (Руслан Ижбулатов)
- a73fa04e92 (Matthias Clasen)
- 9c84f7645e (Matthias Clasen)
- 749c863073 (John Ralls)
2026-10-17 19:31:18 +02:00
8b50a92bbd widgets: more fixes from GTK 3
Backported from GTK 3:

- mnemonics of markup labels with hidden underlines
- selecting in a label without a screen
- notebook action widgets get their requested size
- a window presented while hidden keeps the timestamp
- drag destinations start zeroed
- about dialog cursors belong to its display
- radio menu items accept a NULL group

Upstream commits:

- b5d678dab0 (Dan Winship)
- c2d1e3eeb0 (Matthias Clasen)
- 8e65fa1b43 (Sébastien Wilmet)
- f2279d5e51 (Tristan Van Berkom)
- bc6a3f8cd8 (Matthias Clasen)
- 5fa4a05ccc (Philip Withnall)
- e916568781 (jjacky)
- 8aecf2c06a (Matthias Clasen)
- ad05d84897 (Matthias Clasen)
2026-10-17 19:31:18 +02:00
1ee8565630 treeview, stores: transform and column drag fixes from GTK 3
Backported from GTK 3:

- stores convert values of a transformable type
- dragging a column header shows a window of that column's size

Upstream commits:

- a24f7564b5 (Cosimo Cecchi)
- e92e767246 (Cosimo Cecchi)
- 3c7a6581dc (Stefano Facchini)
2026-10-17 18:50:32 +02:00
8ea216978b x11: caps lock and translate queue fixes from GTK 3
Backported from GTK 3:

- the caps lock state is known before the first key event
- the translate queue is freed with its display

Upstream commits:

- 2226996b80 (Matthias Clasen)
- fbf1093d5c (Matthias Clasen)
2026-10-17 18:50:32 +02:00
0ff855d560 widgets: assorted fixes from GTK 3
Backported from GTK 3:

- about dialog links
- assistant pages changed in prepare
- radio menu items joining a group with an active item
- scale marks, tool palettes, notebook tab drags
- menu scrolling, tooltips
- startup notification of popups
- window group lists

Upstream commits:

- 2cabfcc801 (Matthias Clasen)
- 8e1878bc32 (Matthias Clasen)
- eeb9de80e1 (Xan Lopez)
- 04e727709d (Jasper St. Pierre)
- 00be62546f (Matthias Clasen)
- c298c7acce (Philip Chimento)
- 38dc4733c0 (Tristan Van Berkom)
- a37976dae0 (Tristan Van Berkom)
2026-10-17 18:50:25 +02:00
fafda6f9bf treeview, iconview, combobox: fixes from GTK 3
Backported from GTK 3:

- drags from empty views
- extra mouse buttons
- keys that only close the search
- cursor changes during destruction
- filter reordering
- expander clicks in combo popups
- combo box text items split by markup

Upstream commits:

- e8157126d8 (Tristan Van Berkom)
- 295ed0033e (Cosimo Cecchi)
- 510d84f682 (Kristian Rietveld)
- 1dcd209cdd (Matthias Clasen)
- a20ff44b09 (Daniel Boles)
- 2934482aee (Emmanuele Bassi)
- e60fa49fa7 (Rui Matos)
- 44a064fe30 (Kristian Rietveld)
- e35378ba37 (Thomas Holder)
- 63fe6de94d (Benjamin Otte)
- d3c427a767 (Matthias Clasen)
2026-10-17 18:13:35 +02:00
ff6019ff8d entry, textview: fixes from GTK 3
Backported from GTK 3:

- activatable defaults of entry icons
- display text ranges
- primary selection ownership
- empty inserts
- tag toggles at the end
- line width of justified text
- control characters in input methods

Upstream commits:

- 67efefde49 (Carlos Garnacho)
- 5fe9ebfe11 (Carlos Garnacho)
- 056acf92ec (Matthias Clasen)
- 73c8f30928 (Sebastien Lafargue)
- ff9eb56c6e (Jasper St. Pierre)
- 3511215730 (Paolo Borelli)
2026-10-17 18:13:35 +02:00
aa1a304fe9 gdk: event, shape, grab and focus fixes from GTK 3
Backported from GTK 3:

- event freeing
- child window shapes
- root coordinates of destroyed windows
- implicit grabs
- windows that don't take focus no longer offer WM_TAKE_FOCUS

Upstream commits:

- 809aab2c8e (Jasper St. Pierre)
- f96437317b (Carlos Garnacho)
- 651410fa2a (Carlos Garcia Campos)
- 3f78b251b9 (Carlos Garnacho)
- 41f4fd94df (Tomeu Vizoso)
2026-10-17 18:13:35 +02:00
62cba3edca entry, textview: add the emoji chooser from GTK 3.22
Opens with Ctrl+. or Ctrl+; or from the context menu. The search uses
the desktop language and recently used ones come first. The emoji data
from GTK 3 is only loaded when the chooser first opens.

Backported from GTK 3:

- 45b2e162ae (Matthias Clasen)
- a584bcb88e (Matthias Clasen)
- d56505f74d (Matthias Clasen)
- f922aee5e2 (Matthias Clasen)
- 90faa49a70 (Jeremy Bícha)

The emoji data comes from emojibase (MIT) and the Unicode CLDR
(Unicode License V3); both notices are in gtk/emoji/COPYING.
2026-10-17 18:04:50 +02:00
ac42292095 entry, textview: add placeholder text and input hints
Placeholder text from GTK 3.2, input purpose and hints from 3.6.
Password entries and spin buttons set them on their own.

Backported from GTK 3:

- ef061c4e96 (Carlos Garcia Campos)
- c27ddc66c5 (Jonh Wendell)
- 8a8c434737 (Krzesimir Nowak)
- 3cb4aa44b3 (Matthias Clasen)
- eaaee081b1 (Matthias Clasen)
- 7d1c1a8d20 (Matthias Clasen)
2026-10-17 18:04:50 +02:00
94bf53e488 gtk: add GtkFileChooserNative and GtkNativeDialog
Same API as GTK 3.20. Uses IFileDialog on Windows (the old common
dialogs on XP and ReactOS), NSOpenPanel/NSSavePanel on Mac OS X 10.4
and later, and the portal under Flatpak or with GTK_USE_PORTAL=1.
Otherwise it falls back to the GTK dialog. Also adds
gtk_file_filter_to_gvariant() and _new_from_gvariant() from 3.22.

Backported from GTK 3:

- 5094900180 (Alexander Larsson)
- 81cef0091e (Alexander Larsson)
- 01d0bac83e (Alexander Larsson)
- 693db082a1 (Alexander Larsson)
- 35181e793d (Matthias Clasen)
- 15e361e793 (Matthias Clasen)
- 0acb6a0e98 (Matthias Clasen)
- ce4c9a9ad6 (Tom Schoonjans)
- 32d87ac907 (Emilio Cobos Álvarez)
2026-10-17 18:04:49 +02:00
fdf1b58816 x11: per-monitor HiDPI
Each window takes the scale of the monitor it's on and switches when
it's moved, keeping its size in GDK pixels. Scales come from the
per-output resolution on Xlibre or GDK_MONITOR_SCALES. Changes apply
right away.
2026-10-17 18:04:49 +02:00
c475fe052f icons: high-resolution pictures on scaled screens 2026-10-17 17:22:24 +02:00
c717e77123 x11: add HiDPI support like GTK 3
With a scale of 2 or more (GDK_SCALE, Gdk/WindowScalingFactor, the
per-output resolution on Xlibre, Xft.dpi) everything is drawn in device
pixels while programs keep their sizes. Adds
gdk_window_get_scale_factor() and gdk_screen_get_monitor_scale_factor().

The scale factor API is the one of GTK 3 (8ad851f725 by
Michael Natterer).
2026-10-17 17:22:24 +02:00
57b1fcdede scrolledwindow: kinetic scrolling with a finger
Works in old programs too. Taps and a resting finger still go to the
widgets as before.

Modelled on the kinetic scrolling of GTK 3 (f6393199be by
Carlos Garcia Campos).
2026-10-17 17:22:23 +02:00
58a9c7bf63 gtk: add the touch-event signal
Backported from GTK 3 commit 680872815b by Matthias Clasen.
2026-10-17 17:22:23 +02:00
743c7a7e33 gdk: add touch events like GTK 3
GDK_TOUCH_MASK and the touch event types, using XInput 2.2 on X11.
Windows without the mask get the first finger as pointer events,
marked as emulated.

The touch API is the one of GTK 3 (commits 7f35708cee and bc8401d1ed by
Carlos Garnacho). The pointer emulation for windows without the
mask follows Ardour's YTK (952ec57a by Robin Gareus).
2026-10-17 17:22:23 +02:00
fd7f7b780f gdk: add GDK_SMOOTH_SCROLL_MASK
Same as in GTK 3.4: windows that ask for it get smooth scroll deltas,
all others keep the plain steps.

The API is the one of GTK 3.4 (commits 7b48a3c0bd by Carlos Garnacho
and 0efbbc6435 by Michael Natterer).
2026-10-17 17:22:23 +02:00
d4c2a29d9e scrolledwindow: drop leftover steps of an unused direction 2026-10-17 17:22:23 +02:00
3ac60bfbcf scrolledwindow: keep the wheel while scrolling
A child that scrolls too no longer takes the wheel away in the middle
of scrolling the outer window.
2026-10-17 17:22:23 +02:00
63aeeb1e37 scrolledwindow: animate wheel steps, scroll sideways with Shift 2026-10-17 17:22:23 +02:00
c33a268060 gdk: smooth scrolling on Windows and macOS 2026-10-17 17:11:15 +02:00
d298391bc9 gdk: smooth scrolling for high-resolution wheels and touchpads 2026-10-17 17:04:03 +02:00
6acf191fb0 filesystemmodel: free large folder models in idle slices 2026-10-17 16:59:09 +02:00
a518603f75 recentmanager: load lazily, don't reread our own writes 2026-10-17 16:36:26 +02:00
7e94e1c08e gdk: create the expose pixmap only when needed
Windows that draw themselves (video players, GL, Pale Moon) no longer
get a pixmap of the exposed size made and freed in the X server every
time.
2026-10-17 15:49:34 +02:00
77f8b18155 x11: don't read the X connection needlessly before polling
An empty main loop iteration, of which Pale Moon does tens of thousands
a second, now costs about a third of what it did.
2026-10-17 15:33:14 +02:00
467338d01b x11: cache window origins
gdk_window_get_origin() doesn't ask the X server every time anymore.
The position is kept until something can move the window, or for half
a second. Pale Moon called it thousands of times a second while the
mouse moved.
2026-10-17 15:26:19 +02:00
8c3130add7 icontheme: use GIcon pixbufs directly, detect SVG by suffix
Like GTK 3. The content type query used before also leaked its result.

Upstream commits:

- 03147b0e72 (Ryan Lortie)
- f929a61399 (Jasper St. Pierre)
2026-10-17 15:02:53 +02:00
eb7eee49be icontheme: scale missing sizes like Mac OS X
SVGs are rendered at twice the size and bitmaps taken from one at least
twice as big, then scaled down with Lanczos instead of bilinear.
2026-10-17 15:02:53 +02:00
35b734b1a5 stock icons: render all sizes from the SVGs
16, 18, 20, 24, 32 and 48 are rendered at twice the size and scaled
down with Lanczos, like Mac OS X does. An icon of the exact size now
wins over one within the threshold.
2026-10-17 15:02:53 +02:00
661814faf0 icontheme: even pixel blocks for fractional upscaling 2026-10-17 15:02:52 +02:00
fa5c4defa2 configure: add --enable-win32-time64
Builds 32-bit Windows with a 64-bit time_t, which msvcrt.dll has had
since Windows 2000, so XP and ReactOS work too. gtk+-2.0.pc passes the
flag on, since programs need the same time_t.
2026-10-17 13:51:51 +02:00
9cdebc8291 recentmanager: add 64-bit _unix() time getters 2026-10-17 13:51:51 +02:00
8c3081232b directfb: take event times from the 64-bit clock 2026-10-17 13:51:50 +02:00
b31c0210e0 cups: get the document size without fstat() 2026-10-17 13:51:50 +02:00
f04fe55bac thumbnails: use the 64-bit stat for FUSE mounts 2026-10-17 13:51:50 +02:00
ce7f86f05e recentmanager: check if a file exists without its times 2026-10-17 13:51:50 +02:00
8e91be460f search: walk folders ourselves instead of using nftw()
nftw() skipped folders changed after 2038 with a 32-bit time_t, and
Windows doesn't have it, so the search found nothing there.
2026-10-17 13:51:50 +02:00
8a1c1fe8bf fileselection: use 64-bit folder times 2026-10-17 13:51:50 +02:00
e349c1b111 gtk, gdk: use the monotonic clock for polling intervals 2026-10-17 13:51:50 +02:00
d86aabf1f6 gtk: correct current time after 2038 with 32-bit time_t
Recent item ages, Today/Yesterday in the file chooser, the calendar
and the CUPS print time. Uses clock_gettime64 on Linux.
2026-10-17 13:51:50 +02:00
46e9e4d823 gtk: 64-bit file times for rc files and icon caches
Adds gtktimeprivate.h (statx on Linux, FILETIME on Windows, unsigned
32 bit elsewhere). After 2038 changes went unnoticed and the icon
cache was given up.
2026-10-17 13:36:11 +02:00
76e2e9392d gtk: time submenus and app launches with the monotonic clock 2026-10-17 13:36:03 +02:00