Commit Graph

49648 Commits

Author SHA1 Message Date
Carlos Garnacho
3146f29d3a gdk/wayland: Add GdkDisplay call to query available globals
The internal known_globals hashtable is used to carry accounting for
interfaces that depend on others (as ordering is not guaranteed), extend
its usage so it also keeps track of unimplemented interfaces (here at
least).

The API call will then use this to allow querying the globals offered by
the compositor, it will be useful to determine whether we can use
text-input protocols or should fallback to other IMs.
2018-02-14 14:58:06 +01:00
Daniel van Vugt
c6901a8b95 Fix irregular gdk_frame_clock_get_frame_time
This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

https://bugzilla.gnome.org/show_bug.cgi?id=787665

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs
2018-02-14 08:02:52 -05:00
Gniourf
3274f3a6cc Fix annotation for gtk_tree_view_is_blank_at_pos()
The annotation (allow-none) is wrong. Since
gtk_tree_view_is_blank_at_pos() also calls
gtk_tree_view_get_path_at_pos(), the same fields should have the same
annotations.
2018-02-14 13:51:22 +01:00
Emmanuele Bassi
f82a6421f4 Add missing private header to the build
Closes: #26

        https://bugzilla.gnome.org/show_bug.cgi?id=793442
2018-02-14 10:36:24 +00:00
Mart Raudsepp
97f3a4397a Update Estonian translation 2018-02-13 22:20:41 +00:00
Matthias Clasen
7ea53087ca 3.22.27 2018-02-13 16:30:44 -05:00
Mart Raudsepp
af2d039717 Update Estonian translation 2018-02-13 20:14:22 +00:00
Matthias Clasen
af8b247b45 Merge branch 'gtk-3-22' into 'gtk-3-22'
calendar: Use the new "%OB" format if supported

See merge request GNOME/gtk!2
2018-02-13 13:27:05 +00:00
Rafal Luzynski
cbf118c285 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-12 22:09:28 +01:00
Benjamin Otte
4b1c02560f x11: Don't call XInput API for core events
Fixes emacs crashing with XMing.

https://bugzilla.redhat.com/show_bug.cgi?id=1483942
2018-02-12 21:11:58 +01:00
Mart Raudsepp
8dc234717e Update Estonian translation 2018-02-12 00:38:59 +00:00
Efstathios Iosifidis
79995748e0 Update Greek translation 2018-02-11 23:38:57 +00:00
Emmanuele Bassi
12913d1a35 docs: Use the appropriate deprecation for properties
The GtkFontButton:font-name property has been deprecated, but it's using
a non-standard annotation in its documentation.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
ade22d00f2 gtk: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
c03ce68c38 Do not use deprecated error trap API
Use the X11-specific API instead.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
4e5ef1a377 toolbar: Use gdk_display_flush()
Instead of the deprecated gdk_flush().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
81c0e7af0e selection: Disable deprecation warnings
We are using a lot of deprecated API, and we know it.

Since the selection code is going to be replaced in GTK 4.0, there's no
real point in keeping the warnings enabled in 3.22.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
3067fb8c24 placessidebar: Move declaration inside conditional block
The `sidebar` variable is only used by the conditional block for
libcloudprovider.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
382d6c1bcb Ignore deprecations for gdk_flush()
When terminating the main loop, we're really trying to flush all
GdkDisplay connections, so it's actually a legitimate internal use
case.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
299a91bd46 docs: Properly deprecate gdk_keymap_get_default()
We're using a compiler annotation, but there's no deprecation notice in
the gtk-doc stanza.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
9c6ae95ece accelgroup: Do not use deprecated API
Use gdk_keymap_get_for_display() with the default display, instead of
the deprecated gdk_keymap_get_default().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
855e4cb88e deprecated: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
c229716796 a11y: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
80e5f28ca0 Remove stray format character
We are not using any string in the debug message.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
2de14479b2 broadway: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
d219bd4d5a x11: Balance an error trap
We are pushing an error trap, and never popping it from the stack.
2018-02-11 23:28:50 +00:00
Alban Browaeys
255e2dd704 Fix overzalous method annotations for drag and drop
Functional revert of commit 9c4892f291.

Fixes introspection scanner warnings like:

  Warning: Gtk: gtk_drag_finish: Methods must belong to the same
  namespace as the class they belong to

That is, the gtk_drag_* functions cannot be methods as they have a
"GdkDragContext" as the instance parameter, and that is not a valid
type for the Gtk namespace.

This is not an introspected ABI change, as the generated introspection
data ignores the annotation.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692152
2018-02-11 23:28:50 +00:00
Anders Jonsson
10d2e44ae2 Update Swedish translation 2018-02-11 19:17:29 +00:00
Piotr Drąg
25afe278e3 Update Polish translation 2018-02-11 16:25:35 +01:00
Emmanuele Bassi
4f962c6dbf Add AGPL3-only licence to GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=792793
2018-02-11 14:22:09 +00:00
Fabio Tomat
6e4c6ce6c3 Update Friulian translation 2018-02-11 09:43:48 +00:00
Fabio Tomat
7130656d37 Update Friulian translation 2018-02-11 08:29:56 +00:00
Fran Dieguez
5c85f2cccc Update Galician translation 2018-02-10 18:43:45 +00:00
Fran Dieguez
0e5964ce27 Update Galician translation 2018-02-10 18:41:38 +00:00
Cheng-Chia Tseng
ff43627167 Update Chinese (Taiwan) translation 2018-02-10 07:08:45 +00:00
Cheng-Chia Tseng
6c36eaea98 Update Chinese (Taiwan) translation 2018-02-10 06:54:24 +00:00
Carlos Garnacho
cacd8e6254 Merge branch 'wip/carlosg/fix-issue-1' into 'gtk-3-22'
wayland: Improve EOF detection when reading selections

See merge request GNOME/gtk!1
2018-02-09 10:23:31 +00:00
Carlos Garnacho
08f60dbcf6 wayland: Improve EOF detection when reading selections
g_input_stream_read_bytes() roughly provides the same guarantees
than g_input_stream_read() wrt the number of bytes being possibly
read (i.e. it being a best effort, but no real guarantees).

Instead, rely on the 0-len read that we'd get at the end of the
transfer.

Fixes clipboard/DnD transfers possibly being cut short, resulting
on "Broken pipe" errors on the other side.

https://gitlab.gnome.org/GNOME/gtk/issues/1

Closes: #1
2018-02-08 16:29:18 +01:00
Benjamin Otte
63f534f4b3 cssprovider: Only free bytes when they exist 2018-02-05 18:58:54 +01:00
Benjamin Otte
6ff326a82f css: Add a workaround for gtk_widget_override_font()
The problem here is that the CSS machinery expects font sizes to be in
pixels, but gtk_widget_override_font() provides a value in point and the
CSS machinery has no ability to query the DPI and convert.

This patch changes the dconversion DPI we use from a hardcoded 96 to the
default screen's DPI, which should work better than before.
This will of course not listen to changes in the default screen's DPI,
but that shouldn't be a problem.

People who want to workaround this should use gtk_widget_override_font()
with a font that has an absolute size set via
pango_font_description_set_absolute_size (size * PANGO_SCALE *
                                          gdk_screen_get_resolution (screen));

https://bugzilla.gnome.org/show_bug.cgi?id=774248
2018-02-05 18:49:10 +01:00
Jiri Grönroos
8af082f3c7 Update Finnish translation 2018-02-04 09:14:54 +00:00
Jordi Mas
07324131b3 Update Catalan translation 2018-02-03 21:31:58 +01:00
Jordi Mas
67274f7d9d Update Catalan translation 2018-02-03 21:31:08 +01:00
Matthias Clasen
9b69fe7a7e iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 18:37:19 +01:00
Jason Gerecke
c94993e29b wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:24 +01:00
Kalev Lember
60750b3ffd tests: Don't add testswitch twice in Makefile.am 2018-01-27 14:49:34 +01:00
Timm Bäder
136b88534c menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-01-26 11:37:31 +01:00
Pieter Schalk Schoeman
4c8f7c4aca Update Afrikaans translation 2018-01-24 11:40:40 +00:00
Pieter Schalk Schoeman
0cbf45a663 Update Afrikaans translation 2018-01-24 11:36:50 +00:00
Daniel Boles
b8e2430486 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:09:50 +00:00