Commit Graph

51268 Commits

Author SHA1 Message Date
Benjamin Otte
212c46e20a a11y: Remove check for GtkEventBox 2017-08-02 16:58:05 +01:00
Benjamin Otte
cdba1b8ac8 docs: Don't use GtkEventBox 2017-08-02 16:55:25 +01:00
Benjamin Otte
b6efd89225 testsuite: Remove GtkEventBox from a11y test 2017-08-02 16:47:39 +01:00
Benjamin Otte
b555638600 iconbrowser: Remove GtkEventBox usage 2017-08-02 14:50:19 +01:00
Benjamin Otte
5be94c1fd7 gtk-demo: Get rid of GtkEventBox 2017-08-02 14:05:02 +01:00
Benjamin Otte
711bf38d90 cellaccel: Get rid of GtkEventBox
Can't test the code atm because treeview editing is broken, let's hope
it works once that's fixed.
2017-08-02 14:05:02 +01:00
Benjamin Otte
6b7503b83e placessidebar: Remove EventBox usage 2017-08-02 14:05:02 +01:00
Benjamin Otte
464ffad23e placesview: Remove event box usage 2017-08-02 14:05:02 +01:00
Emmanuele Bassi
b4b2fa4a98 meson: Add missing Wayland protocol
GDK depends on a new Wayland protocol.
2017-08-02 12:31:30 +01:00
Olivier Fourdan
ac61aedae9 wayland: add shortcut inhibitor support
This adds support for the shortcut inhibitor protocol in gdk/wayland
backend.

A shortcut inhibitor request is issued from the gdk wayland backend for
both the older, deprecated API gdk_device_grab() and the new gdk seat
API gdk_seat_grab(), but only if the requested capability is for the
keyboard only.

https://bugzilla.gnome.org/show_bug.cgi?id=783343
2017-08-02 12:37:23 +02:00
Benjamin Otte
9ec22d6652 reftests: Always wait for rendering to settle
We wait for a few 100ms for rendering to settle in various WMs. So far
we only did that for windows that were controlled by the WM (aka
toplevels).

With modern compositing gnome-shell however, this now also applies to
override-redirect windows, so we now wait there, too.

This makes the reftests a lot slower, but they now actually work when
running make check in gnome-shell.
2017-08-02 11:34:57 +01:00
Benjamin Otte
64b7308328 reftests: Remove event box usage 2017-08-02 11:34:57 +01:00
Benjamin Otte
bb238894dc testuite: Remove EventBox from builder test 2017-08-02 11:34:57 +01:00
Matej Urbančič
88cd0886bd Updated Slovenian translation 2017-08-02 10:42:45 +02:00
Timm Bäder
e70a3fab0d widget: Constify state parameter of propagate_state
Makes sense.
2017-08-02 08:58:30 +02:00
Timm Bäder
8c08a33220 widget: Don't try to propagate 0 state flags
This happens quite often and has no effect anyway.
2017-08-02 08:58:30 +02:00
Timm Bäder
9a3049009e widget: Fix size_allocate's out_clip annotation 2017-08-02 08:58:30 +02:00
Benjamin Otte
29b0954c45 testgtk: Actually expand the scrolled window 2017-08-02 00:23:43 +01:00
Benjamin Otte
7297aeb54c testgtk: Get rid of GtkEventBox 2017-08-02 00:23:30 +01:00
Benjamin Otte
69da7836f9 tests: Get rid of GtkEventBox 2017-08-02 00:15:10 +01:00
Daniel Boles
2b7db2376c bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.

CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
2017-08-01 20:45:07 +01:00
Daniel Boles
79bbd4aca5 cssselector: Ensure we do not index out of bounds
This would only happen if the last element was deprecated, but it should
be avoided anyway.

CID 1388852 (#1 of 1): Out-of-bounds read (OVERRUN)
12. overrun-local: Overrunning array pseudo_classes of 16 32-byte
elements at element index 16 (byte offset 512) using index i + 1U (which
evaluates to 16).
2017-08-01 20:17:02 +01:00
Daniel Boles
fc619706b7 Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.

CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
2017-08-01 20:15:14 +01:00
Daniel Boles
881d7c6442 Calendar: Add default case to appease Coverity
CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value rect.x when calling
calendar_arrow_rectangle.

Add a default case to the switch which will bail out with
g_assert_not_reached(), which should reassure Coverity that the method
is always called with a valid value that is handled in the switch.
2017-08-01 20:15:14 +01:00
Daniel Boles
eddbfc65a9 cssbordervalue: Fix possible use of uninitialised
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].

CID 1432029 (#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
2017-08-01 20:14:50 +01:00
Daniel Boles
37b23927c4 Stack: Fix copy-paste error
This fixes Coverity CID 1452217.
2017-08-01 19:18:39 +01:00
Daniel Boles
44c4faeed0 Entry: Fix unset icon tooltip hiding Entry tooltip
Our ::query-tooltip handler first checks whether the pointer is over any
of the icons, returning their tooltip if so, and if not chains up to
Widget::query-tooltip in order to show the text for the widget overall.

But ensure_has_tooltip(), which exists to update :has-tooltip based on
whether ::query-tooltip is needed, only set :has-tooltip to TRUE if any
icon had a tooltip, without caring whether the widget as a whole does.

That is asymmetrical and meant that if the Entry had a tooltip, but
subsequently all icons had their tooltips unset, :has-tooltip would be
set to FALSE, and hence the tooltip for the widget would become lost.

The fix is to set :has-tooltip to TRUE if the widget has a tooltip of
its own, and we only need to check the icons if that is not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=785672
2017-08-01 18:13:11 +01:00
Daniel Boles
b3a6067541 Entry: Warn about corner case hiding icon tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=785672#c4
2017-08-01 18:13:11 +01:00
Timm Bäder
f7bb6a7aa8 widget: Unset PRELIGHT and ACTIVE state in _set_sensitive
They both depend on input, which an insensitive widget does not receive.
2017-08-01 18:43:42 +02:00
Timm Bäder
36c4582086 button: Stop fiddling with PRELIGHT state
This is done automatically now and it's wrong here since it gets
executed after gesture release.
2017-08-01 18:16:40 +02:00
Timm Bäder
30d6b08271 scale: Allocate the value next to the slider
... when vertical. Also fixes usage of the uninitialized value_alloc.y.
2017-08-01 11:36:03 +02:00
Chun-wei Fan
ffc15bf922 Visual Studio builds: Adapt to new glib-mkenums
glib-mkenums is now done in Python, but since the Visual Studio build
environment (cmd.exe) does not support shebang lines, we need to call
the interpretor explicitly to run the script.

This means that we need to update on how we generate
gsk/gskenumtypes.[c|h] in our projects, as at this point GTK+-3.91.x
does not require a GLib installation that ships with the Python-fied
glib-mkenums.  As a result, we adapt to this by first using Python
to call glib-mkenums.  If this fails (where the output file becomes 0
in size), then we use PERL to call the glib-mkenums script.  Note that
during the build this will cause a warning message to be displayed,
stating that '&' cannot be found, but due to the way Windows .bat script
are done, we need to live with that until a solution can be found on
this.

This is likely a problem that does not exist in the Meson builds, as
Meson will take care of calling the interpretor for us by looking at
the shebang lines for our case.

Also, clean up the .batin Windows batch script that is used to call
glib-mkenums by using a for loop in there.
2017-08-01 16:26:43 +08:00
Daniel Boles
e74be1728e testentryicons: Set tooltips on all icons
Just to test tooltips in all cases; what was already here
should have been sufficient, but this doesn't hurt.

While here, also add some instructive placeholder text.

https://bugzilla.gnome.org/show_bug.cgi?id=780938
2017-07-31 20:01:30 +01:00
Chun-wei Fan
1eb8d2ad09 MSVC builds: Allow different Python versions per toolset
Use conditionals to select the Python installation, so that we can stick
closer to the default Visual Studio versions used to compile each official
Python releases.

This means by default:
-2013 builds use Python 3.4.x, which is built with 2010
-2015 and 2017 builds use Python 3.6.x, which is built with 2015.

Also rename PythonPath/PythonPathX64 in the property sheets to
PythonDir/PythonDirX64 repsectively, as PythonPath is the envvar name
where additional Python modules is searched for, so we don't want to get
confused with it.

Last but not least, distinguish between the Python interpretors that are
used on x64 and x86/32-bit builds for generating the libgtk4.manifest
file and the gdbus-generated sources, for consistency reasons.
2017-07-31 17:39:56 +08:00
Daniel Boles
0eb7e71a89 entry: Remove unused/duplicate widget in IconInfo 2017-07-30 14:20:59 +01:00
Timm Bäder
2cbcee8549 widget: Don't access highlight_resize in non-debug builds
The GtkWidgetPrivate struct only contains that member if G_ENABLE_DEBUG
is defined.
2017-07-28 21:28:32 +02:00
Timm Bäder
b71f644cf5 eventbox: Remove visible-window property
The GdkWindow that was supposed to back it is gone.
2017-07-27 21:53:42 +02:00
Matej Urbančič
5e7894feb9 Updated Slovenian translation 2017-07-27 15:46:34 +02:00
Matej Urbančič
df55dc0fe3 Updated Slovenian translation 2017-07-27 15:46:22 +02:00
Matej Urbančič
d6dc72ccc9 Updated Slovenian translation 2017-07-27 15:46:07 +02:00
Carlos Garnacho
2d3882c7eb gtklabel: Fix touch link handling under wayland
Refactor the code updating the active link under the current coordinates
into a separate function, and call it on GtkGestureMultiPress::pressed
so the link is updated on GDK_TOUCH_BEGIN. Based on a patch by
Jan-Michael Brummer <jan.brummer@tabos.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=776903
2017-07-26 13:20:56 +02:00
Carlos Garnacho
21062fab02 gtklinkbutton: Set cursor on button's event window
It is not necessary to (re)set the cursor on every crossing
event, and can probably yield the wrong results if there are
multiple master devices involved. Just set it on init(), and
let the inner machinery update the cursor whenever necessary.

This patch is an adaption of commit 0daf79676 in gtk-3-22, the
side effects are not as bad here because the cursor was already
being set on the widget specifically instead of the parent
widget's, but there's still some nonetheless (plus, it's simpler)

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-26 13:11:43 +02:00
Carlos Garnacho
8f33385d62 wayland: Clear tablet tool cursor on proximity out
This ensures that the tablet tool will get the cursor updated even if it
happens to fall within the same window again on the next proximity in.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-26 13:09:04 +02:00
Carlos Garnacho
312773a927 gdkwindow: Update cursor for tablet tools in the window
This check must be done explicitly on Wayland as the master device for
tablet tools differ from the Core Pointer. This ensures that whenever a
tablet tool is inside a window and the cursor is programmatically changed,
it will be visually updated too.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-26 13:08:50 +02:00
Carlos Garnacho
5b9adfba46 wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()
This flag wasn't being honored so far...
2017-07-26 13:08:36 +02:00
Daniel Mustieles
8305465440 Updated Spanish translation 2017-07-25 20:16:59 +02:00
gogo
15c70a1fbb Update Croatian translation 2017-07-25 17:43:59 +00:00
Kjell Ahlstedt
e2744aa74f actionbar: Call g_object_class_install_properties()
https://bugzilla.gnome.org/show_bug.cgi?id=785318
2017-07-25 10:35:29 +02:00
Matthias Clasen
ce801641a7 Avoid the use of g_autofree
We can't use this in code that may be built on win32,
so lets just not use it at all.
2017-07-24 13:27:29 -04:00
Timm Bäder
3f9bcf3b31 widget: Stop invalidating recursively 2017-07-24 14:32:06 +02:00