Commit Graph

55746 Commits

Author SHA1 Message Date
Matthias Clasen
a7aed5af4b Drop gtk_window_set_use_subsurface
This is no longer used.
2018-08-18 23:24:59 -04:00
Matthias Clasen
220a51e7cb entry completion: stop using subsurfaces
Instead, use a popup and gdk_surface_move_to_rect.
I have not tried to reproduce all details of the old
positioning logic, but moving the popup above/below
the entry works as before.
2018-08-18 23:24:53 -04:00
Jonas Ådahl
6df28420d7 tooltip: Implement positioning using gdk_window_move_to_rect()
In order to make tooltip positioning portable, make use of the
move_to_rect API. Some semantical changes are made, as identical
semantics cannot be implemented using the move-to-rect API.

Primarily the implemented semantics are:

Position the tooltip in the center pixels slightly below (defaults to 4
units below) the tooltipped widget. This is always the case for keyboard
driven tooltips; the case where it tries to avoid the pointer cursor is
not implemented.

For pointer position triggered tooltips, implement the following
additional semantics:

Use the current cursor size to determine the padding used to enlarge the
anchor rectangle. This is to try to avoid the cursor overlapping the
tooltip.

If the anchor rectangle is too tall (meaning if we'd be constrained
and flip on the Y axis, it'd flip too far away from the originally
intended position), rely only on the pointer position to position the
tooltip. The approximate pointer cursor rectangle is used as a anchor
rectangle. Ideally we should use the actual pointer cursor rectangle
(image used as well as hotspot coordinate), but we don't have API to
get that information.

If the anchor rectangle isn't to tall, just make sure the tooltip isn't
too far away from the pointer position on the X axis.

Closes: #134
Closes: #432
Closes: #574
Closes: #579
Closes: #878
2018-08-19 01:26:20 +00:00
Matthias Clasen
081b45399f gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
https://gitlab.gnome.org/GNOME/gtk/issues/844

Closes: #844
2018-08-19 01:26:20 +00:00
Matthias Clasen
0874a54708 gdk/wayland: Always map windows 'moved-to-rect' as popups
Only popups can make use of the move-to-rect semantics so it makes no
sense to try anything other surface type.
2018-08-19 01:26:20 +00:00
Matthias Clasen
cd40ec2200 gdk/wayland: Don't remap non-subsurface as subsurface
Let's just use the fact that a window was mapped as a subsurface to
remap it above another transient parent instead of relying on the more
complicated 'should-map-as-subsurface' helper function.
2018-08-19 01:26:20 +00:00
Matthias Clasen
62b887e064 Merge branch 'win32-smooth-scrolling-gtk4' into 'master'
GDK W32: Support smooth scrolling (GTK4)

See merge request GNOME/gtk!298
2018-08-18 20:39:56 +00:00
Timm Bäder
ce9ce8a5bc menu: Remove key_controller member
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
2322f38bf9 menu: Remove initially_pushed_in flag
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
dcb6c9b4cf menu: Remove seen_item_enter flag
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
afdeffd820 menu: Remove have_position flag
It's always FALSE.
2018-08-18 20:54:29 +02:00
Timm Bäder
10439aaefe menu: Remove an unnecessary gtk_widget_destroy() call
The unref will already properly free the menu item's resources.
2018-08-18 20:54:29 +02:00
Руслан Ижбулатов
d64467b334 GDK W32: Support smooth scrolling
Set delta_x or delta_y for GdkScrollEvent.
HIWORD (wParam) in WM_MOUSE(H)WHEEL is the scroll delta.
A delta value of WHEEL_DELTA (which is 120) means scrolling
one full unit of something (for example, a line).

The delta should also be multiplied by the value that the
SystemParametersInfo (SPI_GETWHEELSCROLL(LINES|CHARS), 0, &value, 0)
call gives back, unless it gives back 0xffffffff, in which case
it indicates that scrolling is page- or screen-based, not line-based
(GDK doesn't support that at the moment).

Also, all deltas should be inverted, since MS sends negative deltas
when scrolling down (rotating the wheel back, in the direction of
the user).

With deltas set the mode should be set to GDK_SCROLL_SMOOTH.

Fixes issue 1263.
2018-08-18 17:02:39 +00:00
Matthias Clasen
099b967885 Don't fail the build if c++ isn't found
The intention of this check was to skip the keyword
test if no c++ compiler is found. But the meson
docs say that add_languages() will abort unless we
pass required: false.
2018-08-18 02:14:56 +00:00
Matthias Clasen
d13cd9cb67 Merge branch 'fix-shell-colorpicker' into 'master'
colorpickershell: Unpack the tuple returned from PickColor()

See merge request GNOME/gtk!296
2018-08-17 12:35:46 +00:00
Matthias Clasen
79b87cc543 print portal: don't leak window handles
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1274
2018-08-15 23:21:15 +00:00
Matthias Clasen
3c2aceba63 print portal: Plug a memory leak
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1271
2018-08-15 23:13:15 +00:00
Matthias Clasen
a01feae15b Use defines for bus names
This helps eradicate typos (we had some here).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1267
2018-08-15 15:54:34 -07:00
Matthias Clasen
b4d4f73d9f Merge branch 'sort' into 'master'
updateiconcache: Sort list of entries

See merge request GNOME/gtk!297
2018-08-15 22:00:13 +00:00
Matthias Clasen
c1de6219ed font chooser: Remove an unneeded ifdef
We can just always create the axes hashtable.
2018-08-15 14:52:37 -07:00
Bernhard M. Wiedemann
b364827a5b updateiconcache: Sort list of entries
because filesystem readdir order is indeterministic.

Without this patch, building openSUSE's balsa package
had variations between builds in /usr/share/balsa/icon-theme.cache
2018-08-15 03:15:14 +02:00
Matthias Clasen
bbe362d015 Merge branch 'master' into 'master'
window: Fix memory leak

See merge request GNOME/gtk!295
2018-08-13 19:33:56 +00:00
Iain Lane
08f32c6560 colorpickershell: Unpack the tuple returned from PickColor()
When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which
GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with
messages like:

  GLib-CRITICAL **: 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o*}"))' failed

  Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.
2018-08-13 13:52:41 +01:00
Yi-Soo An
b3c8c8e592 window: Fix memory leak
https://gitlab.gnome.org/GNOME/gtk/issues/1268
2018-08-13 17:21:42 +09:00
Emin Tufan Çetin
ed36933232 Update Turkish translation 2018-08-12 10:47:44 +00:00
Piotr Drąg
a90fc088f2 Update Polish translation 2018-08-12 00:01:28 +02:00
Matthias Clasen
ff6c4ed07e Merge branch 'gtk-4-improve-error-message' into 'master'
gtkplacessidebar: Improve error message when unlocking volume fails

See merge request GNOME/gtk!267
2018-08-07 10:01:09 +00:00
Piotr Drąg
201f635559 Update Polish translation 2018-08-06 19:01:40 +02:00
Matthias Clasen
59077e4843 migration guide: Mention GtkEventBox
Its gone.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1243
2018-08-05 19:53:02 -04:00
Carlos Soriano
3e6a473082 README: Fix Gdk doc website link 2018-08-05 21:59:27 +00:00
Carlos Soriano
580d96620e README: Document nightly docs location
Useful for exposing the documentation early.
2018-08-05 20:41:29 +00:00
segfault
61f50f2410 gtkplacessidebar: Improve error message when unlocking volume fails 2018-08-05 18:59:40 +02:00
Aurimas Černius
61b2f3c996 Updated Lithuanian translation 2018-08-05 16:06:33 +03:00
Timm Bäder
ab30850aad widget: Rename width and height member to {width,height}_request
Because that's much closer to the meaning of those values.
2018-08-05 10:22:11 +02:00
Timm Bäder
f5e04b59e9 main: Pass toplevel_widget directly to GtkWidget API
We already have the toplevel as GtkWidget: toplevel_widget.
2018-08-05 10:22:10 +02:00
Timm Bäder
c67bcf09b9 sizerequestcache: Inline out-var assignments
The additional assignment to the old result variable just adds an
indirection even though we know the point where we assign it in all
cases. Just pass the values out and return in those cases instead.
2018-08-05 10:22:10 +02:00
Timm Bäder
5eba0bc932 widgetprivate: Remove useless prototype
We implement that function lower down in that header file.
2018-08-05 10:22:10 +02:00
Timm Bäder
ff2ba52bc6 pathbar: Remove priv pointer 2018-08-05 10:22:10 +02:00
Timm Bäder
a822d6fce9 menuitem: Don't redraw unnecessarily
The gtk_widget_(un)set_state_flags calls before will do this if
necessary.
2018-08-05 10:22:10 +02:00
Timm Bäder
b749fe4270 menu: Use correct content height 2018-08-05 10:22:10 +02:00
Timm Bäder
933cb857cf menu: Allocate children according to scroll_offset
This was done by simply moving the bin_window before but now we have to
do it ourselves.
2018-08-05 10:22:10 +02:00
Timm Bäder
dde535bbdf levelbar: Don't return a double value from a gboolean function 2018-08-05 10:22:10 +02:00
Timm Bäder
71b36db88d acitonbar: Remove snapshot implementation 2018-08-05 10:22:10 +02:00
Timm Bäder
b5576397f7 modelbutton: Remove snapshot implementation
Previously, GtkBin was only snapshot'ing its one and only child, but
nowadays it doesn't implement snapshot at all and the default
implementation in GtkWidget just snapshots all child widgets, which is
exactly what the implementation in gtkmodelbutton.c was doing.
2018-08-05 10:22:10 +02:00
Matthias Clasen
4e86858405 Make color picker circular
The need for center alignment was pointed out by Timm Baeder.
2018-08-04 21:42:28 -04:00
Sebastian Keller
14b21d78db gtkscrolledwindow: Consider shift key presses when decelerating
Otherwise horizontal scrolling using the shift key would decelerate
vertically.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/770
2018-08-04 16:24:33 +02:00
Mario Blättermann
35829a7272 Update German translation 2018-08-04 11:25:21 +00:00
Ernestas Kulik
0eb60fb03e Merge branch 'sidebar-spinner-visibility' into 'master'
sidebarrow: Hide busy_spinner by default

See merge request GNOME/gtk!285
2018-08-03 10:45:04 +00:00
Ernestas Kulik
94162197a1 sidebarrow: Hide busy_spinner by default
Since the original implementation was likely based on GTK+ 3, the change
in default visibility might have not been considered, which results in
all rows suddenly sporting a visible spinner when opening a fresh file
chooser.
2018-08-03 13:29:07 +03:00
Matthias Clasen
877fffdd5e Merge branch 'fix-app-id' into 'master'
Make xdg-shell's app_id match GApplication's application-id property

Closes #653

See merge request GNOME/gtk!284
2018-08-03 02:09:09 +00:00