Commit Graph

50223 Commits

Author SHA1 Message Date
Adrien Plazas
f0e5b5bf88 Adwaita: Propagate bg color to titlebar separator descendants
Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231
2018-11-09 08:51:43 +01:00
Matej Urbančič
f74154d5a1 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Matej Urbančič
333f496ad5 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Pieter Schalk Schoeman
4c348e5486 Update Afrikaans translation 2018-11-09 08:47:33 +01:00
Jakub Steiner
7034ab269f Merge branch 'wip/jimmac/hig-colors' into 'gtk-3-24'
Adwaita: use new HIG colors (gtk3)

See merge request GNOME/gtk!408
2018-11-09 07:23:46 +00:00
Timm Bäder
f972ab8818 Merge branch 'plug_race' into 'gtk-3-24'
Fix race in GtkPlug window creation

See merge request GNOME/gtk!387
2018-11-08 04:49:25 +00:00
Daniel Boles
ec1786fdbc Popover: Minimally document the ::closed signal
This is better than nothing at all. The wording is taken from Carlos's
commit message when he added this shortly before 3.12, so add Since too.
Skip the bit from his commit message explaining what this replaced; we
don't need to say all the less good things our convenience API replaces.
2018-11-07 20:32:34 +00:00
Daniel Boles
08bafb4a52 TreeMenu: Don't manually reinvent g_list_index()
g_list_index() "Gets the position of the element containing the given
data (starting from 0)." That is exactly what we were manually doing.
2018-11-07 20:31:45 +00:00
Timm Bäder
009c256991 Merge branch 'cherry-pick-9946dd2a' into 'gtk-3-24'
gtk-autocleanups: add cleanup function for GtkRecentInfo

See merge request GNOME/gtk!410
2018-11-06 09:52:23 +00:00
Matthias Clasen
8ef21cb32f wayland: Fix a thinko in settings portal support
When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere.
2018-11-05 18:34:57 -05:00
Marco Trevisan
4048a1965a gtk-autocleanups: add cleanup function for GtkRecentInfo
(cherry picked from commit 9946dd2ab7)
2018-11-05 21:39:35 +00:00
Jakub Steiner
39645ab6f0 Adwaita: use new HIG colors
- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443
2018-11-05 16:10:50 +01:00
Jakub Steiner
a8a545510d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-05 15:03:11 +01:00
Matthias Clasen
64427e9878 Merge branch 'settings-portal-for-3' into 'gtk-3-24'
Settings portal for 3

See merge request GNOME/gtk!404
2018-11-04 21:13:33 +00:00
Matthias Clasen
41562ab2c6 wayland: Support the settings portal
Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.
2018-11-04 15:50:16 -05:00
Matthias Clasen
4073d0217b Add a gdk_should_use_portal helper
We are going to use this in the following commits.
2018-11-04 08:20:52 -05:00
Matthias Clasen
fb709e96f1 Use a simpler sandbox check
No need to use the runtime dir and allocate a string.
We can just check in /.
2018-11-04 08:20:11 -05:00
Dušan Kazik
d6dedf5270 Update Slovak translation 2018-11-02 08:54:03 +00:00
Dušan Kazik
40400373e1 Update Slovak translation 2018-11-02 08:51:12 +00:00
Dušan Kazik
1837ae88f7 Update Slovak translation 2018-11-01 17:51:10 +00:00
Daniel Mustieles
8c5158a54e Updated Spanish translation 2018-10-31 13:50:01 +01:00
LRN
d45537a743 Merge branch 'win32-honest-clipboard' into 'gtk-3-24'
GDK W32: be more honest about clipboard format support

See merge request GNOME/gtk!382
2018-10-31 05:13:18 +00:00
Carlos Garnacho
336f382728 imwayland: Plug leaks
The various strings (pending/current preedit, surrounding, and commit
buffer) are being leaked in the case of GtkIMContext destruction.
2018-10-30 22:00:07 +01:00
John Ralls
9c6cf4acab Fix indentation. 2018-10-29 14:25:31 -07:00
John Ralls
60dafa38c7 Merge branch '1411-handle-null-from-nsgraphicscontex' into gtk-3-24. 2018-10-29 11:32:10 -07:00
Matej Urbančič
d483c0a05b Updated Slovenian translation 2018-10-25 22:07:50 +02:00
Carmen Bianca BAKKER
041ac5b45a Update Esperanto translation 2018-10-24 08:12:34 +00:00
Jakub Steiner
c1dbf96413 Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

    - removed teh last-child() selector for it doesn't work anymore.
      Better style all section of the headerbar than none. Proper fix pending.
2018-10-22 10:41:41 +02:00
John Ralls
7e4cda6c1c GdkQuartz: Handle NULL from [NSGraphicsContext currentContext].
By returning a default surface. The situation where there's no
currentContext arises when GtkCSS is trying to determine the
layout sizes so no actual display is necessary.

Closes: #1411
2018-10-20 12:31:25 -07:00
John Ralls
7600c4e3f7 Modify Quartz gtk_drag_begin_internal to match 4172138. 2018-10-20 12:26:13 -07:00
John Ralls
35d798dd31 Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite. 2018-10-19 16:49:00 -07:00
John Ralls
0e831b774c Update GDK_OSX versions to current MacOS release. 2018-10-19 16:48:59 -07:00
Ignacio Casal Quinteiro
615fa7cfb6 Merge branch '379-fix-quartz-offscreen-window-crash' into 'gtk-3-24'
Resolve "gtkdnd-quartz crash when realizing a GtkOffscreenWindow"

See merge request GNOME/gtk!145
2018-10-19 06:11:51 +00:00
Philip Chimento
df0e5cc8e6 quartz: Fix crash when realizing GtkOffscreenWindow
GtkOffscreenWindow doesn't have a NSView or NSWindow, so return NULL if
passed one of those.

Closes: #379
2018-10-19 05:38:28 +01:00
Matthias Clasen
00034c00be Merge branch '1371-flickering-tooltips-if-no-mouse-cursor-theme-loaded-gtk3' into 'gtk-3-24'
Tooltip: Fix the used cursor size if 0 in Settings

See merge request GNOME/gtk!374
2018-10-16 23:20:25 +00:00
Matthias Clasen
c0b5d66069 Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab' into 'gtk-3-24'
Notebook: Ensure menu label updates with tab_label

See merge request GNOME/gtk!385
2018-10-16 20:52:04 +00:00
Benjamin Otte
2453e71fd3 Merge branch 'win32-fix-dnd-info-disposal' into 'gtk-3-24'
Fix DND info disposal

See merge request GNOME/gtk!390
2018-10-16 19:41:03 +00:00
Руслан Ижбулатов
4172138154 DnD: fix setting icon in drag-begin
Commit 1c96b703 changed the way icon
information is given to DnD. Previously an icon helper was kept at
the drag source site. Now an image definition is stored there.
The difference is that icon helper is an object that changes its
state in response to an icon being set, thus the object survived
multiple icon changes. Whereas image definition is destroyed and
re-created from scratch every time a drag icon is changed.
This created a problem where gtk_drag_begin_internal() would receive
the value of site->image_def when a drag just began, then it emits
"drag-begin" signal, in response to which an application can
set drag icon, changing the value of site->image_def. However,
gtk_drag_begin_internal() is unable to know about that change and
continues to use the old value it received from up the stack.

Not only does it prevent drag icon from being set from "drag-begin",
it also can induce a crash, since the old image_def value used
by gtk_drag_begin_internal() points to a freed memory region.

Fix this by only setting a default icon (which is created in-place)
in gtk_drag_begin_internal() if the caller does not care about icons.
Otherwise gtk_drag_begin_internal() will return a boolean that indicates
whether an icon needs to be set. Then the caller can invoke
gtk_drag_set_icon_definition() to set the icon, if needed.

Fixes #1407.
2018-10-16 19:04:54 +00:00
Руслан Ижбулатов
5e00fd25da Fix GtkDragSourceInfo disposal
gtk_drag_clear_source_info() immediately unrefs the info attached
to the context (the very same info we're in the process of destroying
in gtk_drag_source_info_free()). If that reference was the last one,
then accessing the info object after that is a use-after-free error.
Also, change the order a bit to first free the event, and only then
unref the context.

Fix this by copying all the fields of the info that we need, and
then working with these copies.
2018-10-16 03:07:13 +00:00
LRN
05b11e9a5b Merge branch 'lrn/zorder-324' into 'gtk-3-24'
Don't let the OS maintain relative Z-order for windows

See merge request GNOME/gtk!196
2018-10-15 22:36:30 +00:00
Uli Schlachter
9ca38c4647 Fix race in GtkPlug window creation
According to the XEmbed specification, a window should be created
"elsewhere" and then reparented into the target parent window. Instead,
GTK+ creates the window directly in desired target parent window. This
allows some races to occur.

Another program that does not follow XEmbed is tabbed. XEmbed requires
an _XEMBED_INFO property on the to-be-embedded window, but tabbed does
not check for this property. Thus, as soon as GTK+ creates its window,
tabbed starts managing this window and now GTK+ setting up the window
races with tabbed starting to manage the window.

If tabbed is fast enough to map the window, GTK+ never sees a MapNotify
event, because it did not yet select StructureNotifyMask on its window.
This results in a black window inside of tabbed.

Note that this cannot really be fixed in tabbed, since XEmbed says that
the _XEMBED_INFO property must be already present when the window
appears. Thus, patching tabbed to wait for _XEMBED_INFO to appear is not
something that the spec requires/allows.

Instead, this commit changes GTK+ so that it directly sets the right
event mask when the window is created. This means that there is no more
race between tabbed mapping the window and GTK+ selecting
StructureNotifyMask.

Note that the proper fix would be to do as XEmbed requires: Create the
window elsewhere and then reparent it into the target window. However,
that would require a more invasive patch, so this commit only takes the
"easy approach" of fixing this one race. Hopefully, all the other races
that can occur during window setup are harmless, because the
embedder/socket will hopefully watch for PropertyNotify events as
needed.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/757
See-also: https://github.com/awesomeWM/awesome/issues/2385
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-14 14:01:25 +02:00
Timm Bäder
dbbc7b3859 emojichooser: Pass chooser to add_emoji
https://gitlab.gnome.org/GNOME/gtk/issues/1398
2018-10-13 14:01:08 +01:00
Daniel Boles
2856fb86a9 Adwaita: Regenerate CSS for new window.devel style
Commit 955aa8d54b forgot this, again.
2018-10-12 23:55:02 +01:00
Daniel Boles
80a3d7090a Notebook: Ensure menu_label updates with tab_label
This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397
2018-10-12 23:49:29 +01:00
Daniel Boles
82c5308947 Notebook: Don't notify 2x from set_tab_label_text
It calls set_tab_label(), which already does that.
2018-10-12 23:38:52 +01:00
Daniel Boles
d9f08c85f4 gtk-demo/main: Suppress implicit fallthru warning
Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
2018-10-12 22:09:42 +01:00
Ignacio Casal Quinteiro
247b38eb42 Merge branch 'fix-crash-osx' into 'gtk-3-24'
quartz: do not cache the screen in the gdkmonitor

See merge request GNOME/gtk!375
2018-10-11 20:45:49 +00:00
Ignacio Casal Quinteiro
2a392c220d quartz: do not cache the screen in the gdkmonitor
Instead we just cache the monitor number and get
out of it the nsscreen when it is needed. This is
a requirement since it nsscreen it is not supposed
to be cached.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
2018-10-10 12:44:29 +02:00
Jakub Steiner
955aa8d54b Adwaita: backport nightly styling
- nightly apps get a headerbar styling
2018-10-10 09:38:50 +02:00
LRN
caa5ba46ad Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
gtkimcontextime.c: Fix Korean input

See merge request GNOME/gtk!356
2018-10-08 20:04:08 +00:00