Commit Graph

21827 Commits

Author SHA1 Message Date
Matthias Clasen
b9a39bf986 Merge branch 'control-enter-2' into 'gtk-2-24'
atk key: Always convert control character events into key names

See merge request GNOME/gtk!631
2019-03-12 18:12:14 +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 728f6869cb)
2019-03-12 18:27:46 +01:00
Matthias Clasen
32c51eabc1 Merge branch 'gtk-2-24' into 'gtk-2-24'
icontheme: Fix annotations on array arguments

See merge request GNOME/gtk!620
2019-03-06 19:30:52 +00:00
Marco Trevisan (Treviño)
072d8546b0 icontheme: Fix annotations on array arguments
The extra ':' makes gir not to handle properly all the rest.
2019-03-06 19:54:49 +01:00
Chun-wei Fan
6b55898162 MSVC introspection: Make more robust and avoid confusion
This updates the introspection build process that we also check on
changes in the Makefiles when we generate the NMake Makefile snippets
and file lists, so that any changes to the source file list can be
reflected.  Also ensure that we build against the freshly-built
libraries.

Make the NMake Makefiles also output the built introspection items to
the output directories of the various Visual Studio versions, according
to the build configuration and architecture, so that we avoid confusion
for different Visual Studio build configs.
2019-01-21 12:53:37 +08:00
Emmanuele Bassi
d681b538e3 Merge branch 'gtk-2-24' into 'gtk-2-24'
Revert "gdk: deactivation/activate window on keyboard grabs"

See merge request GNOME/gtk!483
2019-01-09 16:30:28 +00:00
Samuel Thibault
75a4eeb2f8 Revert "gdk: deactivation/activate window on keyboard grabs"
This reverts commits 853f786727 and
00b17063ac.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-01-04 17:06:17 +01:00
Chun-wei Fan
8042e07879 Merge branch 'gtk-2-24.win.fixes' into 'gtk-2-24'
gtk/gtkiconcache.c: Fix running on GLib-2.57.3 or later on Windows

See merge request GNOME/gtk!469
2018-12-21 09:56:25 +00:00
Chun-wei Fan
4612f0b3fe gtk/gtkiconcache.c: Fix running on GLib-2.57.3 or later on Windows
In GLib-2.57.3 and later, GStatBuf may not be a struct stat on Windows,
depending on the architecture and the compiler used, so we can't just
call fstat() on the GStatBuf.

Instead, we need to use the correct CRT function to call on the
GStatBuf, which is as follows:

-_fstat32() for Windows 32-bit builds on mingw-w64 and MSVC
-_fstat64() for Windows 64-bit builds on mingw-w64
-stat() for Windows 64-bit builds on MSVC, and on all other platforms.
2018-12-21 13:40:05 +08:00
Chun-wei Fan
16682dd237 MSVC builds: Fix pkg-config file generation
We are not passing in the correct architecture to the script that we use
to generate the pkg-config files for Release/x86 builds and Debug/x64
builds.  Fix this.
2018-12-21 13:25:14 +08:00
Chun-wei Fan
0b7ee9880a MSVC builds: Improve pkg-config files generation
Just link to Cairo instead of looking for the Cairo .pc file as the
Cairo build system for Visual Studio currently does not generate a
pkg-config file for us.  This will eliminate the need to hand-craft a
pkg-config file for Cairo to be able to use the pkg-config files that we
generate here.
2018-12-21 13:22:19 +08:00
Chun-wei Fan
639688d37e [gdk|gtk]/Makefile.am: Fix CFlags passed to introspecion on MSVC
Don't pass in G_LOG_DOMAIN=\"...\" to the CFlags that is passed into the
generation the NMake Makefiles.  This will avoid the introspection scanner
from choking because the resulting NMake Makefiles may not have that
CFlag escaped properly, and it is not really needed for building the
introspection binary.
2018-12-21 13:02:05 +08:00
Chun-wei Fan
417c4f9a5f MSVC projects: "Install" libwimp.pdb
Also "install" the libwimp's (Win32 theme engine) PDB file, for
completeness' sake, and to aid in debugging the item, if necessary.
2018-12-21 12:21:42 +08:00
John Ralls
aca9558c6d Fix two mistakes in previous commit.
Failed to re-commit before pushing.
2018-11-01 15:36:19 -07:00
John Ralls
0388a321b4 Protect CGContext calls from null CGContextRefs.
To prevent invalid CGContext warnings.
2018-11-01 13:17:27 -07:00
John Ralls
e6cfbb24b8 Return a default surface if the view has no currentContext.
Note that the resultind surface will not display on the screen.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1411 for Gtk2.
2018-11-01 12:56:20 -07:00
John Ralls
ac3ec98029 Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite. 2018-10-29 15:42:22 -07:00
John Ralls
74d7148089 Update GDK_OSX versions to current MacOS release. 2018-10-29 15:41:27 -07:00
Matthias Clasen
664537d618 Merge branch 'lrn/gtk224-w32-monitor-enum' into 'gtk-2-24'
GDK W32: ensure that monitor enumeration matches up

See merge request GNOME/gtk!182
2018-08-30 17:20:06 +00:00
Christoph Reiter
eec3ce0b4e Merge branch 'g_stat-and-GStatBuf' into 'gtk-2-24'
Consistently use g_stat and GStatBuf

See merge request GNOME/gtk!300
2018-08-19 14:30:26 +00:00
Eduard Braun
303858fa76 Consistently use g_stat and GStatBuf
Replace "stat struct" with "GStatBuf" and "stat" with "g_stat" where
appropriate to fix cross-platform issues, specifically on Windows.

Code should be identical on *nix but fixes some serious issues
on Windows:
- Field widths of "struct stat" are not constant on Windows.
  If the stat function does not match the stat struct used
  it will cause overwrites and undefined behavior
- The Windows stat function needs a properly encoded filename.
  In many places we pass an UTF-8 encoded value which breaks as soon
  as non-ASCII characters are involved.

https://bugzilla.gnome.org/show_bug.cgi?id=787772
2018-08-19 14:53:15 +02:00
Matthias Clasen
184b2cce72 Merge branch 'gtk-2-24' into 'gtk-2-24'
Fix some compiler warnings in modules/other/gail/gailtreeview.c

See merge request GNOME/gtk!239
2018-07-20 14:23:29 +00: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
Matthias Clasen
0d8ba4cbf9 Merge branch 'window-activate-grab-2-again' into 'gtk-2-24'
gdk: activate window on keyboard grabs

See merge request GNOME/gtk!177
2018-07-02 17:19:27 +00:00
Matthias Clasen
ad3d2218bf Merge branch 'dboles/gtk2-filechooser-bookmark-null-name' into 'gtk-2-24'
FileChooserDefault: Avoid printf()ing a NULL char*

See merge request GNOME/gtk!213
2018-06-23 20:44:18 +00:00
Daniel Boles
168434c4a1 FileChooserDefault: Avoid printf()ing a NULL char*
If the name of the bookmark is NULL, using it with the printf %s format
specifier is undefined behaviour per the C Standard. Besides, it would
result in a completely unhelpful tooltip even if it were well-defined.

We already have an else case for when nothing is selected, which avoids
trying to use the name, so ensure we go there if it's NULL or empty too.

https://gitlab.gnome.org/GNOME/gtk/issues/1169
2018-06-22 15:10:56 +01:00
Matthias Clasen
3c92c216a0 Merge branch 'window-activate-grab-2-again' into 'gtk-2-24'
gdk: activate window on keyboard grabs

See merge request GNOME/gtk!177
2018-06-18 12:20:51 +00:00
Samuel Thibault
853f786727 gdk: activate window on keyboard grabs
In 01455399e8 ("gdk: do not deactivate surface on keyboard grabs"), we
made gdk avoid deactivating surfaces when another application takes a
keyboard grab, by using has_focus_window instead of has_focus. That however
broke activating surfaces when the gdk application acquired a grab itself,
in which case has_focus_window is false but has_focus is true.

We thus actually need to use both: surfaces should be activated either
because we have normal keyboard focus, or because we grabbed the keyboard.

This also renames HAS_FOCUS to APPEARS_FOCUSED to better reflect its
role.

Fixes #85

(cherry picked from commit 3287ac96e02ff236d74db10164c5b0c1e7b2b0bf)
(cherry picked from commit 039285deb92b6baf6ef594b0d718e8f7a7e1d0ac)
2018-06-18 10:34:56 +02:00
Руслан Ижбулатов
2c13b00bc1 GDK W32: ensure that monitor enumeration matches up
In case something happens between monitor counting and monitor
enumeration, repeat until the count matches up.
enum_monitor is changed to ignore any monitors past _gdk_num_monitors
and just keep increasing the count past that number.
2018-06-06 19:15:32 +00:00
Benjamin Otte
48821a76c6 Merge branch 'gtk2-icon-fix' into 'gtk-2-24'
Fix incorrect optimization in find_builtin_icon().

See merge request GNOME/gtk!154
2018-05-16 12:54:32 +00:00
Benjamin Otte
9b218aff66 Merge branch 'gtk2-gcc-warning-fix' into 'gtk-2-24'
Fix compiler warnings with GCC 8.1.

See merge request GNOME/gtk!155
2018-05-16 12:45:44 +00:00
John Lindgren
889a63dffc Fix compiler warnings with GCC 8.1.
GCC 8.1 added some new warnings, including warning about parentheses
with no effect in variable declarations.  GTK2 headers have a few of
these, which produce a lot of warnings in projects using GTK2.

The warnings look like:
/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h:59:8: warning:
unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^

Removing the parentheses is harmless and fixes the warnings.
2018-05-15 21:52:15 -04:00
John Lindgren
9ce6f8086e Fix incorrect optimization in find_builtin_icon().
When we found an icon with exactly the requested size, we'd stop
searching immediately (good), but we'd neglect to set the returned
min_difference to 0 (bad).  This caused theme_lookup_icon() to
prefer other, potentially much worse, matches over the exact one.

Cherry-picked from 5aa939dc (gtk-3-22)

https://bugzilla.gnome.org/show_bug.cgi?id=792738
2018-05-15 21:35:21 -04:00
Benjamin Otte
5edb37444b Merge branch 'window-activate-grab-2-3' into 'gtk-2-24'
gdk: do not deactivate window on keyboard grabs

See merge request GNOME/gtk!128
2018-04-30 09:36:11 +00:00
Samuel Thibault
00b17063ac gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab.  Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.

And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.

This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.

Fixes #85

(cherry picked from commit 01455399e8)
2018-04-30 11:20:57 +02:00
Emmanuele Bassi
c0ea27505c Merge branch 'fix/gtk-symbols-for-glib-2.54.3' into 'gtk-2-24'
Make gtk+-2.24.31 compatible with the changed API of glib-2.54.3

See merge request GNOME/gtk!67
2018-04-24 08:45:59 +00:00
Emmanuele Bassi
e5c3b62ddd Merge branch 'm4macros-gtk2' into 'gtk-2-24'
[gtk2] m4macros: Set a serial number

See merge request GNOME/gtk!104
2018-04-17 15:19:18 +00:00
Simon McVittie
acb78c9c60 m4macros: Set a serial number
When a project has a bundled copy of our macro included in tarball
source releases, typically in a m4/ or aclocal/ directory, aclocal
uses the serial number to determine whether the system copy in
/usr/share/aclocal is newer or older than the bundled copy. Without
a serial number, the bundled copy will always be used and will not
be overwritten, even if it is outdated.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-04-06 11:37:07 +01:00
Matthias Clasen
84a665f7f7 Merge branch 'gtk2-am116' into 'gtk-2-24'
build: support automake 1.16

See merge request GNOME/gtk!88
2018-03-30 20:43:17 +00:00
Dominique Leuenberger
2dbf31c0ea build: support automake 1.16 2018-03-27 16:43:23 +02:00
Dennis Schridde
88bb7ecc47 Make gtk+-2.24.31 compatible with the changed API of glib-2.54.3
glib-2.54.3 changed API, compared to glib-2.52.3 and gtk+-2.24.31's
 expectations.  This commit fixes the resulting issue in a backwards
 compatible way.

See-Also: https://bugs.gentoo.org/650536
2018-03-18 19:55:37 +01:00
Matthias Clasen
98687be562 Merge branch 'gtk-2-24' into 'gtk-2-24'
gtkprintbackendcups.c: fix \n at end of a debugging note

See merge request GNOME/gtk!23
2018-02-19 17:58:19 +00:00
Jeremy Tan
61162225f7 GDK W32: Ignore autorepeated key presses on modifier keys
The X11 backend does not send autorepeated messages for modifier keys,
and doing so prevents motion compression from working.

https://bugzilla.gnome.org/show_bug.cgi?id=771568
2018-02-17 17:55:22 +00:00
Jeremy Tan
bfdac2f70e GDK W32: Always process all available messages
The GLib main loop blocks on MsgWaitForMultipleObjectsEx to
determine if there are any incoming messages while also allowing
for background tasks to run. If all available messages are not
processed after MsgWaitForMultipleObjectsEx has signaled that
there are available, CPU usage will skyrocket.

From my limited understanding (by inspection of profiling
under Visual Studio):
Key is pressed - MsgWaitForMultipleObjectsEx unblocks, and
sends message to GDK's event handler. Some event is now queued.

g_poll unblocks, calls the g_event_dispatch which finally
resolves to gdk_event_dispatch. This then calls
_gdk_win32_display_queue_events, but since a message is already
queued, it fails to call PeekMessage and returns immediately.

At the next iteration, g_poll again calls MsgWaitForMultipleObjectsEx
which queues yet another event and returns almost immediately, since
there are events available which haven't been processed by PeekMessage.

The dispatch function is then called and the process repeats.

https://bugzilla.gnome.org/show_bug.cgi?id=771568
2018-02-17 17:55:14 +00:00
Ivan Zakharyaschev
7461ceebe3 gtkprintbackendcups.c: fix \n at end of a debugging note 2018-02-17 20:19:33 +03:00
Matthias Clasen
61751e0e37 Merge branch 'gtk-2-24' into 'gtk-2-24'
calendar: Use the new "%OB" format if supported

See merge request GNOME/gtk!9
2018-02-15 03:06:58 +00:00
Rafal Luzynski
2ea743ab46 calendar: Use the new "%OB" format if supported
Due to the recent changes introduced in glibc 2.27 "%OB" is the
correct format to obtain a month name as used in the calendar
header.  The same rule has been working in BSD family (including
OS X) since 1990s.  This simple hack checks whether "%OB" is supported
at runtime and uses it if it is, falls back to the old "%B" otherwise.

Closes: #9
2018-02-13 23:02:28 +01:00
Emmanuele Bassi
f14fbca645 Revert "Fix abicheck"
This reverts commit 331877fe36.

The newly visible symbols were the result of a bug in the Python port of
glib-genmarshal, which was fixed in GLib 2.54.

https://bugzilla.gnome.org/show_bug.cgi?id=793057
2018-02-10 18:55:59 +00:00