gtk4.git
10 years agofile chooser dialog: Put save entry into header
Matthias Clasen [Sat, 27 Jun 2015 04:08:57 +0000 (00:08 -0400)]
file chooser dialog: Put save entry into header

When we have a header bar, put a save entry there and
make the file chooser use it.

10 years agofile chooser widget: Allow external save entry
Matthias Clasen [Sat, 27 Jun 2015 04:07:59 +0000 (00:07 -0400)]
file chooser widget: Allow external save entry

Prepare the file chooser to use an external entry in
save mode, instead of the builtin one.

10 years agofile chooser: Update sidsebar when entry goes away
Matthias Clasen [Sat, 27 Jun 2015 02:13:33 +0000 (22:13 -0400)]
file chooser: Update sidsebar when entry goes away

10 years agofile chooser: Use icon for create folder button
Matthias Clasen [Sat, 27 Jun 2015 01:50:00 +0000 (21:50 -0400)]
file chooser: Use icon for create folder button

This follows the latest mockups.

10 years agofile chooser dialog: Show a subtitle
Matthias Clasen [Sat, 27 Jun 2015 01:15:55 +0000 (21:15 -0400)]
file chooser dialog: Show a subtitle

Use the new "subtitle" property of the file chooser widget
to display a subtitle in the headerbar, if we have one.

10 years agofile chooser widget: Expose a "subtitle" property
Matthias Clasen [Sat, 27 Jun 2015 01:14:37 +0000 (21:14 -0400)]
file chooser widget: Expose a "subtitle" property

Give the file chooser widget a "subtitle" property, which
contains a short string that explains the current mode.

10 years agoplaces sidebar: Add private api to get title
Matthias Clasen [Sat, 27 Jun 2015 01:13:00 +0000 (21:13 -0400)]
places sidebar: Add private api to get title

The places sidebar already does all the work to determine the
right label to use for the current location of the filechooser.
We want to use the same label in the headerbar subtitle, so
add some private API to get it.

10 years agofile chooser: More search rework
Matthias Clasen [Sat, 27 Jun 2015 00:02:31 +0000 (20:02 -0400)]
file chooser: More search rework

Drop the radio buttons for current location vs everywhere, and
always search in the current location.

10 years agoentrycompletion: no need to return boolean
Georges Basile Stavracas Neto [Fri, 3 Jul 2015 18:48:48 +0000 (15:48 -0300)]
entrycompletion: no need to return boolean

The boolean _gtk_entry_completion_resize_popup's return
value is not used anywhere, and only adds more complexity
for the method.

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

10 years agomir: fix mir pointer event to gdk translation
William Hua [Fri, 3 Jul 2015 16:11:19 +0000 (12:11 -0400)]
mir: fix mir pointer event to gdk translation

10 years agomir: ensure parent surface before creating child surface
William Hua [Thu, 2 Jul 2015 20:38:57 +0000 (16:38 -0400)]
mir: ensure parent surface before creating child surface

10 years agoignore size inc when maximized/fullscreen
Olivier Fourdan [Tue, 23 Jun 2015 09:54:48 +0000 (11:54 +0200)]
ignore size inc when maximized/fullscreen

Under Wayland, fullscreen/maximized windows may not cover the entire
area when a size increment is specified.

Ignore size increments for fullscreen/maximized windows just like most
window managers do under X11 so that windows with size increments can
still be fullscreen or fully maximized under Wayland as well.

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

10 years agodrawingarea: checks parent's draw() before call it
Víctor Manuel Jáquez Leal [Fri, 3 Jul 2015 07:54:34 +0000 (09:54 +0200)]
drawingarea: checks parent's draw() before call it

commit 6786c9d7 introduced a bug when a drawing area is used for
rendering videos, since GtkWidgetClass doesn't set a draw()
method by itself.

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

10 years agoFix warnings in the font options code
Matthias Clasen [Thu, 2 Jul 2015 06:36:29 +0000 (23:36 -0700)]
Fix warnings in the font options code

This code gets called before a screen is set.

10 years agoImprove the font options support
Matthias Clasen [Thu, 2 Jul 2015 02:15:56 +0000 (19:15 -0700)]
Improve the font options support

Instead of just overwriting the default options, merge the per-widget
font options with the defaults.

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

10 years agoAdd a testcase for font options
Matthias Clasen [Thu, 2 Jul 2015 02:14:58 +0000 (19:14 -0700)]
Add a testcase for font options

10 years agoGtkSwitch: fix a reentry issue
Matthias Clasen [Thu, 2 Jul 2015 01:02:57 +0000 (18:02 -0700)]
GtkSwitch: fix a reentry issue

The introduction of state broke some users which relied on
being able to set active in a notify::active handler.

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

10 years agogtkwindow: Reset maximize / fullscreen_initially on state changes
Jasper St. Pierre [Thu, 2 Jul 2015 00:25:23 +0000 (17:25 -0700)]
gtkwindow: Reset maximize / fullscreen_initially on state changes

Since 740bcf5, we use these properties to properly compute shadow widths
for unmapped windows. If a client calls gtk_window_maximize and a window
manager unmaximizes a window, we should draw borders, so we need to
reset these when we get the property notification.

10 years agowindow: don't override background every style_updated()
Cosimo Cecchi [Wed, 1 Jul 2015 21:01:07 +0000 (14:01 -0700)]
window: don't override background every style_updated()

This queues an unnecessary resize on the toplevel, and is not needed
anymore, now that GtkWidget does not call
gtk_style_context_set_background() on the window's GdkWindow anymore.

10 years agostylecontext: deprecate gtk_style_context_set_background()
Cosimo Cecchi [Sun, 28 Jun 2015 18:23:16 +0000 (11:23 -0700)]
stylecontext: deprecate gtk_style_context_set_background()

Nothing in GTK calls it anymore.

10 years agowidget: don't call gtk_style_context_set_background()
Cosimo Cecchi [Wed, 1 Jul 2015 20:05:45 +0000 (13:05 -0700)]
widget: don't call gtk_style_context_set_background()

We don't need to do this here anymore, since widgets typically render
their backgrounds now.

10 years agolayout: add a comment for gtk_style_context_set_background()
Cosimo Cecchi [Wed, 1 Jul 2015 21:32:12 +0000 (14:32 -0700)]
layout: add a comment for gtk_style_context_set_background()

And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, refactor some common code in a single function.

10 years agofixed: add a comment for gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:02:34 +0000 (18:02 -0700)]
fixed: add a comment for gtk_style_context_set_background()

And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, gtk_style_context_set_background() should really be called every
time the style is updated. Fix that.

10 years agowindow: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sun, 28 Jun 2015 05:54:42 +0000 (22:54 -0700)]
window: don't call gtk_style_context_set_background()

10 years agosocket: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 20:15:41 +0000 (13:15 -0700)]
socket: don't call gtk_style_context_set_background()

10 years agotoolitemgroup: don't use gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:59:59 +0000 (12:59 -0700)]
toolitemgroup: don't use gtk_style_context_set_background()

10 years agotextview: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:58:04 +0000 (12:58 -0700)]
textview: don't call gtk_style_context_set_background()

10 years agorevealer: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:54:50 +0000 (12:54 -0700)]
revealer: don't call gtk_style_context_set_background()

10 years agotoolpalette: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:52:58 +0000 (12:52 -0700)]
toolpalette: don't call gtk_style_context_set_background()

10 years agoviewport: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:50:50 +0000 (12:50 -0700)]
viewport: don't call gtk_style_context_set_background()

10 years agotreeview: don't call gtk_style_context_set_background()
Cosimo Cecchi [Sat, 27 Jun 2015 19:48:57 +0000 (12:48 -0700)]
treeview: don't call gtk_style_context_set_background()

10 years agoplug: don't call gtk_style_context_set_background()
Cosimo Cecchi [Fri, 5 Jun 2015 22:37:34 +0000 (15:37 -0700)]
plug: don't call gtk_style_context_set_background()

10 years agopaned: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:27:34 +0000 (18:27 -0700)]
paned: don't call gtk_style_context_set_background()

10 years agooverlay: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:22:28 +0000 (18:22 -0700)]
overlay: don't call gtk_style_context_set_background()

10 years agooffscreenwindow: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:21:56 +0000 (18:21 -0700)]
offscreenwindow: don't call gtk_style_context_set_background()

10 years agomenushell: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:21:16 +0000 (18:21 -0700)]
menushell: don't call gtk_style_context_set_background()

10 years agomenu: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:18:56 +0000 (18:18 -0700)]
menu: don't call gtk_style_context_set_background()

10 years agolistbox: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:17:27 +0000 (18:17 -0700)]
listbox: don't call gtk_style_context_set_background()

10 years agoiconview: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:14:06 +0000 (18:14 -0700)]
iconview: don't call gtk_style_context_set_background()

10 years agoflowbox: don't set gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:04:15 +0000 (18:04 -0700)]
flowbox: don't set gtk_style_context_set_background()

10 years agoeventbox: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 01:03:35 +0000 (18:03 -0700)]
eventbox: don't call gtk_style_context_set_background()

10 years agodrawingarea: don't call gtk_style_context_set_background()
Cosimo Cecchi [Thu, 4 Jun 2015 00:59:45 +0000 (17:59 -0700)]
drawingarea: don't call gtk_style_context_set_background()

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Wed, 1 Jul 2015 21:58:15 +0000 (21:58 +0000)]
Updated Portuguese translation

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Wed, 1 Jul 2015 21:57:37 +0000 (21:57 +0000)]
Updated Portuguese translation

10 years agobroadway: Implement maximization
Alexander Larsson [Fri, 26 Jun 2015 11:49:23 +0000 (13:49 +0200)]
broadway: Implement maximization

10 years agox11: Query pointer devices' scroll valuators on toplevel enter events
Carlos Garnacho [Tue, 23 Jun 2015 16:11:07 +0000 (18:11 +0200)]
x11: Query pointer devices' scroll valuators on toplevel enter events

We used to "invalidate" scroll valuators, so the next scroll event could
be used as the base for the next scroll deltas. This has the inconvenience
that it invariably consumes the first event received after enter and,
due to interactions with WM overeager passive button grabs, there's a
possibility we don't scroll at all if we receive interleaved "smooth
scroll" XI_Motion events and XI_Enter events (Normally triggered by regular
scroll wheels in mice).

In order to fix this, and at the expense of some sync-call overhead on
XI_Enter events (one XIQueryDevice call per slave device), query the
current scroll valuator state for all the slaves of the entered pointer,
so we do know beforehand the right base values. If new devices are plugged
while the pointer is on top of the client, the initialized scroll values
will match the valuators'.

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

10 years agoplacessidebar: Do not set as a "track motion" DnD site
Carlos Garnacho [Wed, 1 Jul 2015 16:50:22 +0000 (18:50 +0200)]
placessidebar: Do not set as a "track motion" DnD site

It has the unintended effect of picking the suggested action from the
context, which conflicts with the (possibly 0) status we set on our
::drag-motion handler.

Given this widget is not interested in listening to DnD from every
possible target, it is safe to just disable it.

10 years agoGtkWindow: don't increase the preferred size for empty windows if there is a size...
Christoph Reiter [Mon, 29 Jun 2015 11:46:36 +0000 (13:46 +0200)]
GtkWindow: don't increase the preferred size for empty windows if there is a size request set.

This fixes a reftest broken by commit 84e99b20ac806ee5f

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

10 years agox11: Avoid X error traps within server grabs
Carlos Garnacho [Tue, 30 Jun 2015 17:04:13 +0000 (19:04 +0200)]
x11: Avoid X error traps within server grabs

gdk_x11_device_xi2_window_at_position() may attempt to push/pop
a few error trap pairs while traversing the window tree. Move it
outside the server grab, and around the multiple XIQueryPointer
calls we may do here.

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

10 years agobroadway: Fix memleak in error case
Krzesimir Nowak [Tue, 30 Jun 2015 20:55:59 +0000 (22:55 +0200)]
broadway: Fix memleak in error case

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

10 years agoAdd gtk_widget_set_font_options and gtk_widget_get_font_options
Arc Riley [Tue, 30 Jun 2015 17:57:49 +0000 (10:57 -0700)]
Add gtk_widget_set_font_options and gtk_widget_get_font_options

This allows a widget to override global font_options, such as hinting and
subpixel order. The widget's PangoContext is updated when this is set.

Some update code from gtk_widget_update_pango_context was moved to
update_pango_context so that gtk_widget_update_pango_context runs it.

http://bugzilla.gnome.org/show_bug.cgi?id=751677

10 years agoswitch: add a style property for the switch height
Cosimo Cecchi [Mon, 29 Jun 2015 22:25:44 +0000 (15:25 -0700)]
switch: add a style property for the switch height

Instead of hardcoding an aspect ratio.
This will be replaced by min-height/max-height when we have them.

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

10 years agoUpdated Slovak translation
Dušan Kazik [Tue, 30 Jun 2015 10:20:51 +0000 (10:20 +0000)]
Updated Slovak translation

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Mon, 29 Jun 2015 22:46:43 +0000 (22:46 +0000)]
Updated Portuguese translation

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Mon, 29 Jun 2015 22:46:04 +0000 (22:46 +0000)]
Updated Portuguese translation

10 years agowindow: Don't send startup notifications for offscreen / popup windows
Jasper St. Pierre [Mon, 29 Jun 2015 21:16:49 +0000 (14:16 -0700)]
window: Don't send startup notifications for offscreen / popup windows

The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.

10 years agoUpdated POTFILES.skip
Piotr Drąg [Mon, 29 Jun 2015 21:07:40 +0000 (23:07 +0200)]
Updated POTFILES.skip

10 years agosettings: Include pangofc-fontmap.h header on Wayland
nick [Mon, 29 Jun 2015 19:37:26 +0000 (20:37 +0100)]
settings: Include pangofc-fontmap.h header on Wayland

In case the X11 backend is not enabled, we still need to include the
pangofc-fontmap.h header file, as we use the Pango/FontConfig API in
both the X11 and Wayland case.

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

10 years agowayland: Return the right type atom on gdk_selection_property_get()
Carlos Garnacho [Mon, 29 Jun 2015 15:54:57 +0000 (17:54 +0200)]
wayland: Return the right type atom on gdk_selection_property_get()

We mistakenly forced the "STRING" type, which was able to confuse higher
layer helpers like gtk_selection_data_get_uris(). This fixes a crash
happening anytime a drop is attempted on a GtkPlacesSidebar.

10 years agowayland: Prepare against NULL selection owners on data_source requests
Carlos Garnacho [Mon, 29 Jun 2015 14:32:01 +0000 (16:32 +0200)]
wayland: Prepare against NULL selection owners on data_source requests

Currently, due to the lack of progress information in the Wayland DnD
protocol, we assume a DnD operation is finished after the first
data_source.send is finished (It's either that or leaving stuck grabs).

This however breaks previous assumptions that dest widgets can request
the data multiple times, even in response to GtkWidget::drag-motion.
This leaves us with a NULL owner for the DnD atom when we aren't
finished receiving wl_data_source events yet, causing a crash.

This commit fixes the crash, the behavior left is still far from
desirable though...

10 years agogtk3-demo: Group pango demos together
Matthias Clasen [Mon, 29 Jun 2015 05:46:53 +0000 (22:46 -0700)]
gtk3-demo: Group pango demos together

10 years agogtk3-demo: Add a fancy text demo
Matthias Clasen [Mon, 29 Jun 2015 05:43:27 +0000 (22:43 -0700)]
gtk3-demo: Add a fancy text demo

This demonstrates rendering text with a pattern instead of a
single color.

10 years agogtk-demo: Make the info bar example wrap
Matthias Clasen [Sun, 28 Jun 2015 14:21:45 +0000 (10:21 -0400)]
gtk-demo: Make the info bar example wrap

10 years agogtk-demo: Cosmetic changes
Matthias Clasen [Sun, 28 Jun 2015 13:23:28 +0000 (09:23 -0400)]
gtk-demo: Cosmetic changes

Clean up the code of many examples in minor ways, fix some memory
leaks, and avoid the use of dialogs where a regular toplevel works
just as well.

10 years agogtk-demo: Add a spin button example
Matthias Clasen [Sun, 28 Jun 2015 14:11:54 +0000 (10:11 -0400)]
gtk-demo: Add a spin button example

More or less copied from the spin button example in testgtk.

10 years agocssvalue: Change color transitions to run premultiplied
Benjamin Otte [Fri, 26 Jun 2015 19:08:04 +0000 (21:08 +0200)]
cssvalue: Change color transitions to run premultiplied

Previously, the unpremultiplied values from the GdkRGBA were taken. Now
we premultiply the color values as specified by the CSS specs.
This is only relevant when transitioning with translucent colors.

An example is the halfway transition between transparent (0, 0, 0, 0)
and white (1, 1, 1, 1). Previously, all 4 values where transitioned
separately and the result was semi-transparent gray (0.5, 0.5, 0.5,
0.5).
By depending on the alpha value, the result is now semi-transparent
white (1, 1, 1, 0.5) which is what one would naively expect.

New reftest: color-transition

10 years agocssvalue: Special case resulting color for transparency
Benjamin Otte [Fri, 26 Jun 2015 18:53:39 +0000 (20:53 +0200)]
cssvalue: Special case resulting color for transparency

Again, preparation for using premultiplied color transitions.

10 years agocssvalue: Restructure RGBA transitions
Benjamin Otte [Fri, 26 Jun 2015 17:06:02 +0000 (19:06 +0200)]
cssvalue: Restructure RGBA transitions

Split out a function to make the code clearer for the changes ahead.

10 years agowayland: Set the master device on the drop-side GdkDragContext
Carlos Garnacho [Fri, 26 Jun 2015 12:23:16 +0000 (14:23 +0200)]
wayland: Set the master device on the drop-side GdkDragContext

And force the ungrab on it, instead of the slave, in the case of
local DnD drop. This avoids confusions on the pointer events spawn
from DnD, as GDK doesn't think anymore those are from a slave device.
Most namely, it fixes the stuck grab when finishing DnD on the
same app it was started from.

10 years agowayland: Split handling of clipboard/DnD data offers
Carlos Garnacho [Tue, 7 Apr 2015 14:40:57 +0000 (16:40 +0200)]
wayland: Split handling of clipboard/DnD data offers

We currently only hold the last offer received, which is wrong, as both
are independent and have different life cycles.

This means we have to store per-selection wl_data_offer and targets, and
maintain these as appropriate from the clipboard/DnD specific entry points.

10 years agobroadway: Handle shm_open failing by falling back on tmp files
Alexander Larsson [Thu, 25 Jun 2015 19:15:46 +0000 (21:15 +0200)]
broadway: Handle shm_open failing by falling back on tmp files

This is required if /dev/shm is not mounted on your system, which can
happen for instance in certain container configurations.

10 years agoAdwaita: entry linking fixes
Lapo Calamandrei [Thu, 25 Jun 2015 18:04:32 +0000 (20:04 +0200)]
Adwaita: entry linking fixes

Set the right border color on the linked entry after the focused
one.

10 years agoAdwaita: rubberbands!
Lapo Calamandrei [Thu, 25 Jun 2015 17:55:51 +0000 (19:55 +0200)]
Adwaita: rubberbands!

Darken the rubberband a bit to make it visible on the selected
color background, fix treeview rubberband border issue.

10 years agowayland: Fix compile warning in DnD/selection code
Carlos Garnacho [Thu, 25 Jun 2015 16:44:49 +0000 (18:44 +0200)]
wayland: Fix compile warning in DnD/selection code

Introduced in my recent commits

10 years agogtkdnd: Plug a leak
Carlos Garnacho [Thu, 25 Jun 2015 12:58:00 +0000 (14:58 +0200)]
gtkdnd: Plug a leak

We create a cairo_t in order to find out the surface extents, but it
was being leaked, dragging the whole drag surface with it through
extra refs.

10 years agogtkmodelbutton: Plug a leak
Carlos Garnacho [Thu, 25 Jun 2015 12:56:59 +0000 (14:56 +0200)]
gtkmodelbutton: Plug a leak

The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.

10 years agogtkmenusectionbox: plug a leak
Carlos Garnacho [Thu, 25 Jun 2015 12:55:56 +0000 (14:55 +0200)]
gtkmenusectionbox: plug a leak

The list returned by gtk_container_get_children() wasn't being freed.

10 years agowayland: Plug some memleaks in DnD/clipboard code
Carlos Garnacho [Thu, 25 Jun 2015 12:52:47 +0000 (14:52 +0200)]
wayland: Plug some memleaks in DnD/clipboard code

gdk_atom_name() return value must be freed, this code was consistently
not doing so...

10 years agobuilder-tool: Don't strip h/vexpand
Matthias Clasen [Thu, 25 Jun 2015 11:01:26 +0000 (07:01 -0400)]
builder-tool: Don't strip h/vexpand

Setting these properties has the side-effect of setting the
corresponding -set properties, which makes GTK+ behave subtly
different. So don't mess with these.

10 years agoGtkSearchBar: Don't vexpand
Matthias Clasen [Thu, 25 Jun 2015 10:59:18 +0000 (06:59 -0400)]
GtkSearchBar: Don't vexpand

It turns out that setting vexpand to its default value has
side-effects that we need.

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

10 years agoGtkImage: Make resource property work properly
cedlemo [Wed, 24 Jun 2015 13:59:00 +0000 (13:59 +0000)]
GtkImage: Make resource property work properly

gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

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

10 years agowayland: protect against unknown mimetype requests
Carlos Garnacho [Wed, 24 Jun 2015 20:10:55 +0000 (22:10 +0200)]
wayland: protect against unknown mimetype requests

This oddly can be reproduced with weston+weston-dnd, when dragging
anything from GTK+ into weston-dnd, it will insist on picking its
custom application/x-wayland-dnd-flower mimetype, and this request
forwarded by the compositor, even if GTK+ didn't announce it on
its wl_data_source mimetype list. (What should probably happen here
is that the request is silenced, and/or weston-dnd picks (null))

This should be harmless, we are leaking though the fd in that case,
because the emission of GdkEventSelection on an unhandled mimetype
results in NOP. In order to avoid this, we should check whether the
mimetype is supported at all on the backend code and possibly close
the fd, this involves storing these in the first place.

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

10 years agowayland: Ensure we close the fd on all error paths in data_source.send
Carlos Garnacho [Wed, 24 Jun 2015 19:55:12 +0000 (21:55 +0200)]
wayland: Ensure we close the fd on all error paths in data_source.send

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

10 years agowayland: close() the selection fd if we didn't start writing yet
Carlos Garnacho [Wed, 24 Jun 2015 19:52:23 +0000 (21:52 +0200)]
wayland: close() the selection fd if we didn't start writing yet

If the other peer requests data too fast (too rare/unlikely though),
we might receive multiple gdk_wayland_selection_request_target() calls
with no ending gdk_wayland_selection_check_write(), in which case the
fd is leaked as no GOutputStream was created to take over it.

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

10 years agowayland: Ensure we cancel previous selection writes before starting one
Carlos Garnacho [Wed, 24 Jun 2015 17:57:40 +0000 (19:57 +0200)]
wayland: Ensure we cancel previous selection writes before starting one

We weren't catching all the places where the AsyncWriteData operation
should be cancelled, which could happen if we repeatedly request the
same target on different fds.

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

10 years agowayland: Do not close the descriptor on async_write_data_free()
Carlos Garnacho [Wed, 24 Jun 2015 17:53:39 +0000 (19:53 +0200)]
wayland: Do not close the descriptor on async_write_data_free()

At the moment we create the AsyncWriteData, the ownership of the
fd is granted to the GOutputStream, and the fd set to -1, so at
this moment we're just silently getting EBADFD.

This partially reverts 25885ca600fff, the initialization of .fd
to -1 is valid and stays though.

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

10 years agoUpdated Hungarian translation
Balázs Úr [Wed, 24 Jun 2015 17:45:33 +0000 (17:45 +0000)]
Updated Hungarian translation

10 years agowayland: Ensure device grabs generate crossing/focus events
Carlos Garnacho [Wed, 24 Jun 2015 15:48:18 +0000 (17:48 +0200)]
wayland: Ensure device grabs generate crossing/focus events

On X11 this is something the windowing system does for us, which the
wayland backend should emulate, being grabs completely client-side.

So, if the grab and current focus windows differ, make sure we emit
focus/crossing events as it corresponds to the grab device.

10 years agowayland: Update grab serial when ungrabbing keyboards
Carlos Garnacho [Wed, 24 Jun 2015 13:41:23 +0000 (15:41 +0200)]
wayland: Update grab serial when ungrabbing keyboards

This was being done so only on pointers. Internally, a GdkDeviceGrabInfo
is kept for each of the master pointer/keyboard, failing to do this for
keyboards results in a stuck keyboard grab.

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

10 years agowayland: Properly initialize/finalize where we store the data_source.send fd
Carlos Garnacho [Wed, 24 Jun 2015 09:27:20 +0000 (11:27 +0200)]
wayland: Properly initialize/finalize where we store the data_source.send fd

The fd must be closed on async_write_data_free(), but we should also
initialize it to -1 so gdk_wayland_selection_check_write() doesn't wrongly
pick the stdin fd.

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

10 years agoGtkWindow: some min/nat size corrections.
Christoph Reiter [Mon, 22 Jun 2015 17:22:10 +0000 (19:22 +0200)]
GtkWindow: some min/nat size corrections.

Don't add the container border to the title request size; it
is only used for the child widget.

Don't call gtk_widget_get_preferred_width_for_height() for
the title bar with an unrelated height and subtract the title
bar height before querying the child widget width.

Guard against negative size requests after substracting the
borders/shadows and the title bar.

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

10 years ago3.17.4
Matthias Clasen [Tue, 23 Jun 2015 17:11:26 +0000 (13:11 -0400)]
3.17.4

10 years agoFix up doc comments
Matthias Clasen [Tue, 23 Jun 2015 21:27:09 +0000 (17:27 -0400)]
Fix up doc comments

10 years agoFix up expected results of a11y tests
Matthias Clasen [Tue, 23 Jun 2015 21:07:38 +0000 (17:07 -0400)]
Fix up expected results of a11y tests

These changed due to th extra box that GtkAssistant now
inserts for each page.

10 years agoFix an oversight
Matthias Clasen [Tue, 23 Jun 2015 20:46:07 +0000 (16:46 -0400)]
Fix an oversight

10 years agoGtkPlacesSidebar: Simplify sidebar code
Matthias Clasen [Tue, 23 Jun 2015 20:28:18 +0000 (16:28 -0400)]
GtkPlacesSidebar: Simplify sidebar code

Make this code follow GTK+ styles and conventions better.

10 years agoGktPlacesSidebar: Plug a ton of leaks
Matthias Clasen [Tue, 23 Jun 2015 20:06:30 +0000 (16:06 -0400)]
GktPlacesSidebar: Plug a ton of leaks

If you don't keep in mind that g_object_get() returns references to
objects and copies fo strings, things leak all over the place.

10 years agosidebarrow: Avoid object-valued properties
Matthias Clasen [Tue, 23 Jun 2015 18:42:57 +0000 (14:42 -0400)]
sidebarrow: Avoid object-valued properties

They tend to leak...as these do.

10 years agorender: Fix ridge/groove border rendering
Benjamin Otte [Tue, 23 Jun 2015 19:45:33 +0000 (21:45 +0200)]
render: Fix ridge/groove border rendering

The typo strikes again!

10 years agoGtkHeaderBar: reduce minimum title width
Christoph Reiter [Tue, 23 Jun 2015 08:54:39 +0000 (10:54 +0200)]
GtkHeaderBar: reduce minimum title width

The minimum title width affects the minimum window width
for CSD windows. To allow smaller windows like without
CSD reduce it a bit (276px vs 156px min width)

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