Commit Graph

55318 Commits

Author SHA1 Message Date
Matthias Clasen
547d63d56a puzzle: Add a reshuffle button 2018-06-07 21:47:30 -04:00
Matthias Clasen
ddad5c3ce9 Keep aspect ratio of the image
Since we don't have a good way to control the window size tightly,
make the content keep aspect ratio.
2018-06-07 21:47:30 -04:00
Benjamin Otte
b6c8943bbf demo: Add the sliding puzzle demo 2018-06-07 21:47:30 -04:00
Matthias Clasen
46d8c84049 Merge branch 'master' into 'master'
Fix reference to user styles in gtkstyleprovider.h

See merge request GNOME/gtk!184
2018-06-07 18:27:25 +00:00
Mohammed Sadiq
59c8fdff29 font-button: Suggest non deprecated function in docs
gtk_font_button_get_font_name() has been deprecated in 3.22 and
its public API is removed from GTK4.
2018-06-07 15:45:32 +05:30
Matijs van Zuijlen
932e5ea34e Fix reference to user styles in gtkstyleprovider.h 2018-06-07 08:54:23 +00:00
Matthias Clasen
d2d4ea6f0a Merge branch 'wip/move-to-rect-public' into 'master'
gdk: Make gdk_surface_move_to_rect public

See merge request GNOME/gtk!179
2018-06-05 21:02:51 +00:00
Daniel Boles
3396c5e983 SizeRequest: Round px values up for min CSS sizes
Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the widget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise. My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088
2018-06-05 18:49:52 +01:00
Jonas Ådahl
c0e1044d5c gdk: Make gdk_surface_move_to_rect public
This is the API used by GtkMenu to properly position menus on the screen
without requiring GTK to query the menu window's position or the work
area of where the window is positioned. It makes it possible to position
popup windows properly when using Wayland.

Make this API available to external users so custom popup windows can be
positioned properly as well.

Related: https://gitlab.gnome.org/GNOME/gtk/issues/997
2018-06-05 17:53:05 +02:00
Timm Bäder
5c24bbf00c popover: Add missing close paren in docs 2018-06-04 21:58:44 +02:00
Timm Bäder
a1e3e9dd17 colorbutton: Remove priv pointer 2018-06-04 21:58:44 +02:00
Timm Bäder
d53c28b07a aspectframe: Remove unused member 2018-06-04 21:58:44 +02:00
Timm Bäder
a3987f3386 bin: Remove public GtkBinPrivate typedef 2018-06-04 21:58:44 +02:00
Timm Bäder
4e9a879de0 statusbar: Remove garbage from header file
Nobody will ever read those comments; documentation belongs into the
soruce file so gtk-doc actually picks it up.
2018-06-04 21:58:44 +02:00
Timm Bäder
9109b0c3f2 statusbar: Remove priv pointer 2018-06-04 21:58:44 +02:00
Timm Bäder
758137b5d9 widget: Add docs for {get,set}_focus_child
With get_ being still private.
2018-06-04 21:58:44 +02:00
Timm Bäder
4ab3aada3f gl renderer: use w axis vector from graphene
Instead of initializing our own one every time.
2018-06-04 21:58:44 +02:00
Matthias Clasen
7a5567bf41 Merge branch 'patch-1' into 'master'
GtkWindow: Handle non-square icons with height > width correctly

Closes #657

See merge request GNOME/gtk!170
2018-06-03 18:10:03 +00:00
Christian Stadelmann
a70f0356e9 GtkWindow: Handle non-square icons with height > width correctly 2018-05-31 17:26:17 +02:00
Mohammed Sadiq
f4c1a40446 widget: Fix example code in doc 2018-05-31 16:24:00 +05:30
Matthias Clasen
8b24d59cde Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169
2018-05-30 02:13:04 +00:00
Matthias Clasen
60aeb15116 x11: Don't set NET_WM_PID when sandboxed
It is not useful, and some window managers misinterpret it and
add some "runs as root" indication to the window decoration.

See https://github.com/mate-desktop/marco/issues/301
2018-05-29 20:19:05 -04:00
Matthias Clasen
c83441ae4a gdk: Add a private api to find sandboxes
This will be used in more places in the future.
2018-05-29 20:17:22 -04:00
Benjamin Otte
83a80ab866 events: Mark static function as such 2018-05-29 21:54:47 +02:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Ernestas Kulik
4d2b39d98c gesturemultipress: Don’t fire ::released after ::cancel
Causing a grab in the handler for ::pressed by, e.g., popping up a
context menu will cause the gesture to be canceled and, subsequently,
::end and ::released to be fired, all while the button is still
physically pressed. That results in no event being available to the
::released handler and garbage coordinates, given that
gtk_gesture_get_point() returns FALSE.

Emitting ::released can be avoided by checking the return value
gtk_gesture_get_point().
2018-05-29 19:09:28 +03:00
Ernestas Kulik
e9765c0405 gesture: Fix code snippet
GTK_EVENT_SEQUENCE_ACCEPTED seems to never have been a valid enumeration
value. GTK_EVENT_SEQUENCE_CLAIMED is the closest in meaning.
2018-05-29 18:27:59 +03:00
Ernestas Kulik
334c7911c1 gesture: Fix get_last_event() docs
Querying the event sequence of a gesture will always yield NULL for
non-touch events, but passing NULL in to calls to
gtk_gesture_get_last_event() is a perfectly valid use case.
2018-05-29 18:15:20 +03:00
Victor Toso
d424837496 gdkseatdefault: Don't hide GdkSurface on grab failure
Application is not expecting that.

Bug found due gdk_seat_grab() failure on Lock Screen. When user
Unlock the screen, the application is visible but does not receive
enter-event any more on X11/GNOME.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422

Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2018-05-29 14:05:14 +02:00
Carlos Garnacho
694d9aa9f9 gtkpopover: Fix thinko in key press event type check
That code branch is meant to check for key events, seems obvious we want
GDK_KEY_PRESS, not GDK_BUTTON_PRESS (which also broke the branch right
below).

Makes us all able to dismiss popovers again.
2018-05-29 14:05:14 +02:00
Carlos Garnacho
317abed78e Revert "popover: Fix setting priv->button_pressed in ::event handler"
This reverts commit d638ff3afa.

Doesn't look like the right fix. Another one coming that fixes dismissing
through both pointer and keyboard.
2018-05-29 14:03:27 +02:00
Matthias Clasen
979a7e8afa Remove an unused struct
Positive side-effect: visual c no longer has an empty struct
to complain about.
2018-05-27 11:57:49 -04:00
Timm Bäder
d638ff3afa popover: Fix setting priv->button_pressed in ::event handler
There were two cases in that if/else cascade handling the
event_type == GDK_BUTTON_PRESS case, so priv->button_pressed never got
set.
2018-05-27 17:51:51 +02:00
Timm Bäder
c8decbaad0 gdkscreen-x11: Remove redundant typedef
Causes warnings with clang.
2018-05-27 17:51:51 +02:00
Timm Bäder
719b2b0525 gl renderer: Remove an outdated comment 2018-05-27 17:51:51 +02:00
Matthias Clasen
f9875040c6 Merge branch 'master' into 'master'
icontheme: Keep dir_mtimes in order

Closes #1115

See merge request GNOME/gtk!161
2018-05-27 15:50:17 +00:00
Timm Bäder
7f9cd9f9d9 filechooserwidget: Don't chain up in ::event
GtkWidgetClass.event is NULL.
2018-05-27 16:20:55 +02:00
Timm Bäder
251913c80e gl renderer: Use offsets for more node types 2018-05-27 16:20:55 +02:00
Piotr Drąg
d8aa8fc6ce Update Polish translation 2018-05-27 07:58:25 +02:00
Matthias Clasen
d561e52cde a11y: Stop using ::event
We can just as well use notify::has-focus for the purpose of
focus tracking, and we can at the same time avoid emitting the
deprecated AtkObject::focus-event signal.
2018-05-26 08:46:06 -04:00
Christoph Reiter
e610c02a9e ci/msys2: force disable vulkan
A recent dependency change in MSYS2 made it pull in vulkan, which made
meson think it's available but it somehow links against the system vulkan dll
instead.

Disable vulkan for now.
2018-05-26 14:23:58 +02:00
Daniel Boles
e7809f43ec SpinButton: Fix an obviously wrong arg description
:climb-rate is not about what you get when you single-click on a button,
as this implied: it's what happens if you hold down a button or a key.
Fix the description of @climb_rate to new(), and while here, mention the
key in the blurb of :climb-rate itself.
2018-05-26 01:06:00 +01:00
Jan Alexander Steffens (heftig)
1e06838c1c
icontheme: Keep dir_mtimes in order
Don't reverse the order each time we insert a theme. Reverse it only
once, after all themes have been loaded.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1115
2018-05-23 20:06:01 +02:00
Matthias Clasen
4bb3ac3e81 Merge branch 'kill-key-events' into 'master'
Kill key events

See merge request GNOME/gtk!160
2018-05-23 01:55:05 +00:00
Carlos Garnacho
d94ac2ed61 Merge branch 'issue792' into 'master'
wayland: check native surface for crossing events

Closes #792

See merge request GNOME/gtk!148
2018-05-22 11:10:26 +00:00
Matthias Clasen
8746322d53 Drop the ::key-press/release-event signals
These are the last event-type specific signals,
we are just relying on the generic ::event signal now.
2018-05-21 20:20:55 -04:00
Matthias Clasen
85922f6090 treeview: Stop using ::key-press-event
Use a generic ::event handler instead.
2018-05-21 20:20:49 -04:00
Matthias Clasen
ec2d0edd79 spin button: Stop using ::key-release-event
Just use the generic ::event signal.
2018-05-21 20:20:43 -04:00
Matthias Clasen
b63def0865 font chooser dialog: Stop using ::key-press-event
Use the generic ::event instead.
2018-05-21 20:20:33 -04:00
Matthias Clasen
6084a7ea89 button: Stop using ::key-release-event
Use the generic ::event signal instead.
2018-05-21 20:20:24 -04:00