Commit graph gtk2-ng/modules
Author SHA1 Message Date
bd3df5bec1 win32: window, IME and monitor fixes from GTK 3
Backported from GTK 3:

- frameless windows maximize without covering the taskbar
- IME windows follow the scale
- monitor info and selection names without overflow or leak
- opacity on child windows is ignored quietly

Upstream commits:

- c61764b0f9 (Руслан Ижбулатов)
- c073a062b6 (Chun-wei Fan)
- ba6522d3f2 (Vasiliy Nuzha)
- 41026987be (Руслан Ижбулатов)
- 6dede1a0b7 (Руслан Ижбулатов)
2026-10-18 10:41:33 +02:00
b413703921 ms-windows: draw theme parts at the native resolution 2026-10-18 10:41:33 +02:00
de123d8ed5 print: PPD translations and print-to-file fixes from GTK 3
Backported from GTK 3:

- PPD options in the language of the user
- Print to File writes to Documents and adds to recent files
- the scale is applied after rotation and margins
- cancel stops a preview
- conflicts are checked for a new printer
- option widgets let go of their option
- radio options take their mnemonic

Upstream commits:

- 97ee5efb4b (Matthias Clasen)
- c85c3510e7 (Leo Wolf)
- 2c1839ae5f (Marek Kasik)
- d80953666e (Morten Welinder)
- ad764c8a58 (Alban Browaeys)
- f682aabf74 (Siegfried Gevatter (RainCT))
- 0fe9e481dd (Marek Kasik)
- da85312097 (Marek Kasik)
2026-10-18 10:18:40 +02:00
6eedf81e1e print: callback, title and driver fixes from GTK 3
Backported from GTK 3:

- a printer list callback stops when a handler destroys the backend
- CUPS job titles are cut to 255 bytes at a character boundary
- a second source file no longer leaks the first
- Windows driver settings stay with their printer

Upstream commits:

- 255225584e (Carlos Garcia Campos)
- 446659e80f (Rick Yorgason)
- 0387486407 (Marek Kasik)
- 90950b2d3d (Marek Kasik)
2026-10-18 10:18:40 +02:00
a1dec5205d cups: fix connection and request leaks
A connection and a request leaked with every job, a borrowed connection
was closed twice, and the TXT records of network printers weren't
freed. Avahi requests close their own connections now.

Upstream commits:

- 118b09c68c (Marek Kasik)
- 083f834dd7 (Marek Kasik)
- 9513d3b2a4 (Marek Kasik)
2026-10-18 10:18:40 +02:00
9caeed54ad cups: option, Kerberos and leak fixes from GTK 3
Backported from GTK 3:

- custom option values are checked before use
- Kerberos printers no longer ask for a password
- options of printer instances stay with the instance
- a resolution from the settings wins
- printer references no longer leak

Upstream commits:

- b9e91b9419 (Till Kamppeter)
- 9a0700e20c (Marek Kasik)
- e99e282b5a (Andre Heinecke)
- 315bb30220 (Matthias Clasen)
- 36effbb307 (Timothy Arceri)
2026-10-18 10:18:40 +02:00
11b04da889 cups: store job passwords in the keyring like GTK 3
Based on GTK 3 commit 382d68ff8e by Andre Heinecke.
2026-10-18 10:18:40 +02:00
cd6e01acde cups: don't leak the entered password 2026-10-17 23:59:00 +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
b31c0210e0 cups: get the document size without fstat() 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
22e603ee99 cups: compute the UTC print time without time()
This also fixes zones with quarter hours like Nepal, which came out an
hour wrong.
2026-10-17 12:17:32 +02:00
a47206e0a6 pixbuf engine: keep theme image pieces in the X server 2026-10-17 11:12:39 +02:00
92c6e6abf8 pixbuf engine: clip image parts only around themselves 2026-10-16 22:58:51 +02:00
86aee38b99 pixbuf engine: cache stretched theme image pieces 2026-10-16 19:35:36 +02:00
8deebb25ac print: end the job with an error when writing fails
All backends used to loop forever on a failed write.

Backported from GTK 3 commit 2adacca119 by Carlos Garcia Campos.
2026-10-15 17:06:32 +02:00
c5f7672ee1 gail, iconview: use atk_component_get_extents()
From the warning-cleanups branch.
2026-10-15 11:30:51 +02:00
d1ad63a098 headers: don't mark _get_type and _quark functions const
They register types as a side effect, and newer compilers drop calls
whose result isn't used.

The same change as GTK 3 commit f30efa7759 by Matthias Clasen.
2026-10-15 09:53:23 +02:00
8c1c905be0 build: drop fallbacks for unsupported dependency versions
The minimum versions are listed in INSTALL now.
2026-10-15 09:07:46 +02:00
4851a82452 ms-windows: don't use a deprecated size call 2026-10-15 09:07:31 +02:00
782a2948b8 gail: update AtkValue test modules
Use a shared private compatibility helper in the GAIL test modules.

Exercise the modern AtkValue API when ATK 2.12 or newer is available while retaining the legacy test path for older ATK versions.

Initialize temporary GValues explicitly and keep the helper symbols private to the test modules.
2026-08-07 08:53:00 +02:00
a116a5d13b gail: implement modern AtkValue interface
Add compile-time support for the modern AtkValue API available since ATK 2.12 while retaining compatibility with older ATK versions.

Implement direct modern value, range, increment and setter methods for adjustments, paned widgets, progress bars, ranges, scale buttons and spin buttons.

Keep the implementation private, avoid per-instance memory overhead and preserve the existing exported ABI.
2026-08-07 08:53:00 +02:00
d0c4346396 cups: use modern HTTP connection helpers when available
Detect httpConnect2 and httpReconnect2 at configure time.

Preserve blocking, encryption, timeout and reconnect semantics while retaining the legacy CUPS APIs as compile-time fallbacks.
2026-08-07 08:53:00 +02:00
7e9fb7ce53 gail: drop volatile from once-init type IDs 2026-05-07 18:12:16 +02:00
42a31c8576 Clean up trailing whitespace 2026-05-03 15:16:52 +02:00
a1ab76063d lpr: mark backend printer as accepting PDF and PostScript
Construct the LPR printer with explicit is-virtual, accepts-pdf and
accepts-ps properties so the backend advertises the formats it can
handle.

This follows the GTK2 LPR backend fix referenced by OpenBSD ports and
GNOME, using GTK2's GtkPrinter:is-virtual property name and keeping the
printer non-virtual as in the referenced patch.

Make sure to enable the LPR print backend when using this feature, for
example by setting gtk-print-backends in the user's GTK2 rc file:

    gtk-print-backends = "file,cups,lpr"

For normal application startup, put this setting in ~/.gtkrc-2.0 so GTK2
applications pick it up automatically.

Ported-from: OpenBSD ports x11/gtk+2 patch-modules_printbackends_lpr_gtkprintbackendlpr_c
2026-04-30 11:28:48 +02:00
81b9e0200f build: replace deprecated INCLUDES with AM_CPPFLAGS 2026-04-28 21:14:00 +02:00
e9a6be6956 Replace deprecated GCache in pixbuf theme engine
Replace the deprecated GCache-based pixbuf cache with two GHashTables
and explicit reference counting.

Keep filename-based pixbuf sharing while preserving release semantics
through a reverse pixbuf-to-entry lookup. This avoids deprecated GCache
without removing the GTK2 pixbuf theme engine.
2026-04-28 09:03:33 +02:00
744ce7c22f Fix assorted non-deprecation compiler warnings 2026-04-24 20:58:49 +02:00
ef8c6add6a Fix compiler warnings across tests and modules 2026-04-24 19:10:41 +02:00
932bc82675 Fix compiler warnings and deprecated API usage 2026-04-24 15:29:59 +02:00
d77875c0af Y2038 safety: internal timestamp modernization 2026-04-23 10:18:55 +02:00
71b1ab5e77 Fix build issues on modern compilers
Resolve multiple compiler errors and warnings found on current toolchains.

Changes include:
- explicit type casts for subtype/base assignments
- legacy prototype cleanup
- test source fixes
- gail and CUPS backend build fixes

Restores successful compilation on current Linux systems.
2026-04-20 18:08:34 +02:00
Nam Nguyen
d1b21ff159 Resolve GIMP segfault from accessing memory past end of pixbuf
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2684

GIMP segfaults while switching themes between dark and gray and inputting Ctrl-O
to open a file. This is because p advances past end of pixbuf in pixbuf-render.c
compute_hint() with num_channels = 3 (no alpha). This is resolved by fixing the
if statement to only check for alpha, thereby advancing p, if there is an alpha
channel.
2020-05-01 21:55:49 +00:00
Ming Hua
88ac9188a3 Do not use VIQR input method for vi locale by default
In the Vietnamese Quoted-Readable input method, punctuation following a
base letter is converted into diacritical marks, for example a( → ă.
(See <https://en.wikipedia.org/wiki/Vietnamese_Quoted-Readable>.)
A 2008 bug report in Ubuntu argued that this is a problematic default,
particularly when typing passwords, where the effect of the punctuation
is non-obvious.

According to the bug reporter, VIQR is popular with Vietnamese users
living elsewhere in the world, where Vietnamese keyboards are unlikely
to be readily available, but is not a popular choice within Vietnam,
where the Telex or VNI input modes are preferred.

Closes: #183

Bug-Debian: https://bugs.debian.org/895043
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/191451

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2019-11-16 20:19:23 +00:00
Samuel Thibault
cf15c11429 atk key: Always convert control character events into key names
including when the control modifier is present, i.e. when one is typing
control-I for instance.

Orca would convert them back to the corresponding ASCII letter anyway, and
when pressing control-tab, we do want to pass "tab", not pass "\t" that Orca
would erroneously convert to "control-I".

Fixes #1743

(cherry picked from commit 728f6869cba6360b843a83fe5b525404accb1433)
2019-03-12 18:27:46 +01:00
Brady Minardi
8f8336cd94 modules/other/gail/gailtreeview.c: Incorporate review suggestions
Incorporate review suggestions by Emmanuele Bassi.
2018-07-14 14:45:28 +00:00
Brady Minardi
4d37ee2e79 modules/other/gail/gailtreeview.c: Fix -Wunused-but-set-variable warning 2018-07-14 08:00:56 +00:00
Brady Minardi
8715570f45 modules/other/gail/gailtreeview.c: Fix -Waddress warning 2018-07-14 07:56:39 +00:00
Ivan Zakharyaschev
7461ceebe3 gtkprintbackendcups.c: fix \n at end of a debugging note 2018-02-17 20:19:33 +03:00
Colomban Wendling
61d5c82f5c Fix updating the widget accessible description when using its tooltip
We need to notify ATK the description changed when the tooltip text
associated with the widget changes and gail_widget_get_description()
would use it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009
2017-12-09 21:42:36 -05:00
Daniel Boles
bc555cd64f imcontextxim: Fix showing glyph in status window
This custom drawing code was broken, which meant the current mode
indicator/character did not show, severely hindering XIM users.

Fix by simply removing the custom drawing and just being a GtkWindow, by
cherry-picking these two from GTK+ 3:
  commit 211ccb5c73a444683d493588c3eb29b457a5586b
  commit c750cea4e57ed3bcb5ba7eada95d0be380aa2fe5t

https://bugzilla.gnome.org/show_bug.cgi?id=696624
2017-10-21 19:08:03 +01:00
Kristian Rietveld
899147d6d0 imquartz: fix regression introduced by commit 4ba1fb
In the preceding fix, the checks involving GDK_IS_QUARTZ_WINDOW macros
were left out. These checks are in fact crucial, because these functions
are sometimes called with non-quartz functions as the original comments
in the code do indicate. Therefore, reintroduce these checks. This
fixes a crash in GIMP.
2016-08-07 16:53:57 +02:00
Chun-wei Fan
339fd3d3f6 Clean Up MSVC Project Generation
Use the common autotools module that was added in the last commit so that
we can clean up the various Makefile.am's in gdk/ and gtk/, and also
make more Visual Studio projects completed during 'make dist', by adding
minimal items to those other Makefile.am's.  This also allows us to make
the property sheets that does the copying of headers and built items
completed at 'make dist', so that we won't have to worry too much about
headers being added (although it would be unlikely for GTK+-2.x).
2015-12-15 16:44:47 +08:00
David Lechner
4ba1fbfdb1 Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-08 21:36:11 -04:00
Ting-Wei Lan
46c28bd54d Makefiles: Fix parallel installation for MinGW
Make sure that the destination exists before installing files.

https://bugzilla.gnome.org/show_bug.cgi?id=753691
2015-08-19 10:38:39 +08:00
Matthias Clasen
f3a34856c5 multipress: Only emit preedit signals if needed
When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644
2015-08-18 15:46:21 -04:00
Marek Kasik
d63bee09e0 printing: Check connection to remote CUPS server on correct port
Add parameter for specification of port to gtk_cups_connection_cups_new().
Use default port returned by ippPort() if the given port is lower than 0.

https://bugzilla.gnome.org/show_bug.cgi?id=693738
2015-05-13 12:27:44 +02:00
Matthias Clasen
5364ede826 gailbutton: Avoid a possible NULL dereference
We were using widget->window before checking widget for being NULL.

Pointed out by Sami Farin,
https://bugzilla.redhat.com/show_bug.cgi?id=1140414
2015-02-13 13:40:46 -05:00
Matthias Clasen
1d0e2d5838 pixbuf engine: Avoid a crash if widget is NULL
Commit 85f2a721cf introduced an unconditional call to
gtk_widget_get_direction(). This does not work for 'foreign'
uses of the theme engine, e.g. in Qt, where widget is NULL.

This was reported as a crash in Fedora here:
https://bugzilla.redhat.com/show_bug.cgi?id=924683
2014-09-29 16:05:57 -04:00