gtk+3.0.git
8 years agoGDK W32: Apply HiDPI scale properly to monitors
Руслан Ижбулатов [Fri, 17 Feb 2017 15:59:32 +0000 (15:59 +0000)]
GDK W32: Apply HiDPI scale properly to monitors

Previously HiDPI scale was retrieved and applied too late in the initialization
process to affect monitor size and monitor workarea size, but the code that
initializes these sizes *did* try to use the scale, even though it was always
getting scale=1.

To fix this, move the too-late code into monitor enumeration routine.
This also fixes a probable semantic bug where width and height were divided
by scale, again.

Now monitor and workarea should be in application pixels (i.e. divided by scale),
as intended.

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

8 years agoCssSelector: Fix warning for bad pseudo-class name
Daniel Boles [Sat, 18 Feb 2017 21:01:38 +0000 (21:01 +0000)]
CssSelector: Fix warning for bad pseudo-class name

It was "Missing name of pseudo-class", but the real problem is exactly
the opposite: we /have/ been given a name, but it is not a valid one.
Change it to "Invalid name of pseudo-class" to minimise confusion.

8 years agotestsuite/gtk/textiter: Add missing assertion
Daniel Boles [Sat, 18 Feb 2017 20:18:05 +0000 (20:18 +0000)]
testsuite/gtk/textiter: Add missing assertion

gboolean ret for whether gtk_text_iter_backward_line() moved the iter
was declared but not used anywhere. I presume it was meant to be
checked, and it passes now, so let’s do it.

8 years agotextiter: fix bug in gtk_text_iter_backward_line()
Nelson Benítez León [Fri, 10 Feb 2017 18:29:41 +0000 (23:29 +0500)]
textiter: fix bug in gtk_text_iter_backward_line()

gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.

As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.

Fixed by adding the ensure_char_offsets() call.

A test case for this bug is added to the textiter gtk testsuite.

8 years agoImage—Add some more missing (nullable) annotations
Daniel Boles [Fri, 17 Feb 2017 22:01:32 +0000 (22:01 +0000)]
Image—Add some more missing (nullable) annotations

8 years agofilechooserentry: Avoid an uninitialized value
Timm Bäder [Thu, 16 Feb 2017 11:23:47 +0000 (12:23 +0100)]
filechooserentry: Avoid an uninitialized value

|= with a garbage value on the left side results in a still-garbage
value.

8 years agofilechooserwidget: Fix profiling code compilation
Timm Bäder [Thu, 16 Feb 2017 11:22:58 +0000 (12:22 +0100)]
filechooserwidget: Fix profiling code compilation

8 years agoAdd a few missing (nullable) annotations
Timm Bäder [Thu, 16 Feb 2017 11:22:33 +0000 (12:22 +0100)]
Add a few missing (nullable) annotations

8 years agobuilder: avoid an uninitialized value
Timm Bäder [Thu, 16 Feb 2017 11:21:23 +0000 (12:21 +0100)]
builder: avoid an uninitialized value

When g_module_supported() returns FALSE, args.module is garbage
otherwise.

8 years agofilechooserwidget: Fix rename popover position calculation
Timm Bäder [Thu, 16 Feb 2017 09:32:31 +0000 (10:32 +0100)]
filechooserwidget: Fix rename popover position calculation

Since the browse_file_popover is positioned correctly, just convert the
coordinates in the same way we do there.

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

8 years agogdk: Ensure GdkDragContext instantly updates drag window position
Carlos Garnacho [Tue, 7 Feb 2017 15:35:55 +0000 (16:35 +0100)]
gdk: Ensure GdkDragContext instantly updates drag window position

Otherwise we wait for the next gdk_drag_motion() call, which will
happen on the next motion event, making the drag window briefly visible
on the 0,0 root coordinates.

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

8 years agodocs/css-properties: Fix info on 3value properties
Daniel Boles [Fri, 17 Feb 2017 15:18:16 +0000 (15:18 +0000)]
docs/css-properties: Fix info on 3value properties

https://developer.mozilla.org/en/docs/Web/CSS/margin#Values

8 years agoVisual Studio builds: Support Visual Studio 2017
Chun-wei Fan [Fri, 17 Feb 2017 07:06:25 +0000 (15:06 +0800)]
Visual Studio builds: Support Visual Studio 2017

Update the autotools scripts so that we can support Visual Studio 2017
by copying the 2010 projects and updating items as needed to obtain
the 2017 projects.

Note that since the toolset version string changed for Visual Studio
2017, so allow the use of a custom toolset version string, otherwise
just generate the toolset version string as we did before.

Also, note that Visual Studio 2017 aims to be compatible with 2015
on the CRT level, so there should not be any problems using 2017-compiled
binaries with 2015-compiled ones.

8 years agodocs: Advise to use gtk_show_uri_on_window()
Bastien Nocera [Thu, 16 Feb 2017 03:51:23 +0000 (04:51 +0100)]
docs: Advise to use gtk_show_uri_on_window()

Instead of gtk_show_uri() which is now deprecated, and mention an
additional benefit of doing so.

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

8 years agoUse gtk_show_uri_on_window() in GtkLabel
Emmanuele Bassi [Thu, 16 Feb 2017 00:24:57 +0000 (00:24 +0000)]
Use gtk_show_uri_on_window() in GtkLabel

Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

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

8 years agoGtkMountOperation: We use gtk_show_uri_on_window() by default
Bastien Nocera [Thu, 16 Feb 2017 03:53:55 +0000 (04:53 +0100)]
GtkMountOperation: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().

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

8 years agogtk: Ignore gtk_show_uri() deprecation warnings
Bastien Nocera [Thu, 16 Feb 2017 03:53:29 +0000 (04:53 +0100)]
gtk: Ignore gtk_show_uri() deprecation warnings

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

8 years agoGtkLinkButton: We use gtk_show_uri_on_window() by default
Bastien Nocera [Thu, 16 Feb 2017 03:52:53 +0000 (04:52 +0100)]
GtkLinkButton: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().

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

8 years agoGtkAboutDialog: We use gtk_show_uri_on_window() by default
Bastien Nocera [Thu, 16 Feb 2017 03:52:02 +0000 (04:52 +0100)]
GtkAboutDialog: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().

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

8 years agodocs: Fix reference to non-existent gtk_show_uri_on_parent()
Bastien Nocera [Thu, 16 Feb 2017 03:50:48 +0000 (04:50 +0100)]
docs: Fix reference to non-existent gtk_show_uri_on_parent()

It's called gtk_show_uri_on_window().

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

8 years agowidget: propagate scale factor upon reparenting a widget
Lionel Landwerlin [Mon, 9 Jan 2017 00:11:29 +0000 (00:11 +0000)]
widget: propagate scale factor upon reparenting a widget

When a widget is created, its default scale is the scale of the
primary screen (for instance 2). But once parented to another widget
its scale factor should be the one of its parent (if parented to a
widget on a screen at scale factor 1, it should be 1).

The problem is that we don't emit the notify::scale-factor signal when
reparenting happens.

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

8 years agowidget: Document signal mnemonic-activate
Daniel Boles [Sun, 12 Feb 2017 15:52:02 +0000 (15:52 +0000)]
widget: Document signal mnemonic-activate

Name the extra bool argument, and move the explanatory paragraph from
the emitting method to the signal, with some minor tweaks to wording.

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

8 years agogtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
Bastien Nocera [Wed, 15 Feb 2017 12:35:13 +0000 (13:35 +0100)]
gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps

gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.

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

8 years agoUpdate zh_CN translation
Tong Hui [Wed, 15 Feb 2017 12:11:27 +0000 (20:11 +0800)]
Update zh_CN translation

8 years ago3.22.8
Matthias Clasen [Mon, 13 Feb 2017 18:28:00 +0000 (13:28 -0500)]
3.22.8

8 years agoGDK W32: Different maximized window position for non-CSD windows
Руслан Ижбулатов [Thu, 26 Jan 2017 17:44:01 +0000 (17:44 +0000)]
GDK W32: Different maximized window position for non-CSD windows

It seems that WM interprets the same MINMAXINFO contents differently
depending on which styles the window has. Play along.

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

8 years agoHC: insensitive styling for views.
Lapo Calamandrei [Wed, 8 Feb 2017 15:53:10 +0000 (16:53 +0100)]
HC: insensitive styling for views.

8 years agoadwaita: insensitive styling for views
Lapo Calamandrei [Wed, 8 Feb 2017 15:45:51 +0000 (16:45 +0100)]
adwaita: insensitive styling for views

Add an insensitive style to views, somehow we didn't ship one, so
for example, disabled textviews looked the same as sensitive ones.

8 years agowayland: do not clamp anchor values
Olivier Fourdan [Wed, 1 Feb 2017 08:41:07 +0000 (09:41 +0100)]
wayland: do not clamp anchor values

Clamping the anchor values as introduced in commit 9a5ffcd to fix bug
777176 breaks menu positioning.

By keeping the anchors rectangle size greater than zero, we end up
deducting some positive value from the original position, so there is no
need to clamp() actually, keeping the values positive is enough and
avoids the issue with menu positioning on the menubar.

An additional benefit is to make the code a lot simpler.

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

8 years agoquartz: Implement gtk_clipboard_get_selection
Philip Chimento [Thu, 3 Nov 2016 06:37:29 +0000 (23:37 -0700)]
quartz: Implement gtk_clipboard_get_selection

This function is trivial and can be copied from the X11 implementation.

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

8 years agogetting-started: typo tie->the
Chris Martin [Fri, 9 Dec 2016 03:13:29 +0000 (22:13 -0500)]
getting-started: typo tie->the

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

8 years agonotebook: redraw arrows after closing a tab
Michael Catanzaro [Sat, 21 Jan 2017 02:19:56 +0000 (20:19 -0600)]
notebook: redraw arrows after closing a tab

Thanks to Daniel Boles for helping with a crash in an earlier version of
this patch.

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

8 years agoUpdate Icelandic translation
Sveinn í Felli [Sat, 4 Feb 2017 15:32:13 +0000 (15:32 +0000)]
Update Icelandic translation

8 years agorange: Add a queue_resize call
Matthias Clasen [Mon, 6 Jun 2016 16:31:41 +0000 (12:31 -0400)]
range: Add a queue_resize call

This is a workaround for a regression in updating scrollbars in
some applications; notably eog. We haven't fully tracked down yet
why a queue_allocation is not sufficient here, it should.

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

8 years agosearchentry: Fix typo in documentation
Daniel Boles [Tue, 31 Jan 2017 09:39:39 +0000 (09:39 +0000)]
searchentry: Fix typo in documentation

8 years agomir: handle surface placement events
William Hua [Sun, 29 Jan 2017 16:24:43 +0000 (11:24 -0500)]
mir: handle surface placement events

This allows the Mir backend to properly emit "moved-to-rect."

8 years agomir: use mir_surface_spec_set_placement for menus
William Hua [Fri, 27 Jan 2017 19:46:10 +0000 (14:46 -0500)]
mir: use mir_surface_spec_set_placement for menus

This API was added to Mir for GTK menus, combo boxes, etc.

8 years agoRevert "notebook: redraw arrows after closing a tab"
Michael Catanzaro [Fri, 27 Jan 2017 14:53:42 +0000 (08:53 -0600)]
Revert "notebook: redraw arrows after closing a tab"

This reverts commit 8caaba82cc84f1f9ad6bf30415688728c894210c.

8 years agowayland: Ensure to set gtk_surface dbus properties after hide()
Carlos Garnacho [Wed, 25 Jan 2017 14:53:55 +0000 (15:53 +0100)]
wayland: Ensure to set gtk_surface dbus properties after hide()

Currently hiding destroys the wl_surface and all related interfaces,
(including the gtk_surface1) so the next time the GdkWindow is mapped,
we don't bother to set the DBus properties. Toggle the check off so
it's actually issued again after the GdkWindow gets a gtk_surface1.

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

8 years agonotebook: redraw arrows after closing a tab
Michael Catanzaro [Sat, 21 Jan 2017 02:19:56 +0000 (20:19 -0600)]
notebook: redraw arrows after closing a tab

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

8 years agomir: use modal window hint
William Hua [Thu, 12 Jan 2017 22:16:27 +0000 (17:16 -0500)]
mir: use modal window hint

8 years agomir: fix compile-time warnings
William Hua [Mon, 9 Jan 2017 22:54:37 +0000 (17:54 -0500)]
mir: fix compile-time warnings

8 years agocombobox: Fix documentation typo bx => box
Daniel Boles [Sat, 21 Jan 2017 16:10:32 +0000 (16:10 +0000)]
combobox: Fix documentation typo bx => box

8 years agomenushell: Don’t dereference before typechecking
Daniel Boles [Fri, 20 Jan 2017 22:15:42 +0000 (22:15 +0000)]
menushell: Don’t dereference before typechecking

8 years agocombobox: If typechecking, don’t reference before
Daniel Boles [Fri, 20 Jan 2017 21:07:26 +0000 (21:07 +0000)]
combobox: If typechecking, don’t reference before

8 years agocombobox: popdown() the menu during unmap()
Daniel Boles [Fri, 20 Jan 2017 03:23:00 +0000 (03:23 +0000)]
combobox: popdown() the menu during unmap()

combo_box_popdown() of course doesn’t popdown our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.

8 years agoGDK W32: Ensure that we use made-up monitors when there are none
Руслан Ижбулатов [Fri, 20 Jan 2017 10:23:00 +0000 (10:23 +0000)]
GDK W32: Ensure that we use made-up monitors when there are none

Previously GDK only made up monitors when it initially found none. Now it
also makes up monitors when it initially finds some, but later fails to get
their informatin in a normal way and finally prunes them out, being left with
zero monitors.

Having zero-length monitor array is unexpected and causes a number
of critical warnings and some critical functionality (such as displaying
drop-down menus) fails in such cases.

Ideally, there might be such a way to interrogate W32 API that produces the
information about non-real (but active) monitors out of it so that it isn't
necessary for us to make stuff up. However, this code is already complicated,
and i am not prepared to dig W32 API to find a way to do this.

This fixes the issues people had when they accessed a Windows desktop via RDP.

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

8 years agoupdate zh_CN translation
Mandy Wang [Fri, 20 Jan 2017 12:37:01 +0000 (20:37 +0800)]
update zh_CN translation

8 years agodemos: Fix build
Chun-wei Fan [Fri, 20 Jan 2017 10:17:33 +0000 (18:17 +0800)]
demos: Fix build

Include gtk/fallback-c89.c so that we can ensure that we have round(), and
that file already includes math.h

8 years agoGDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation
Руслан Ижбулатов [Fri, 20 Jan 2017 09:08:41 +0000 (09:08 +0000)]
GDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation

Replace the code borrowed from the X11 backend with the code borrowed from Wayland backend. Now GTK doesn't crash when the number of monitors is zero.

8 years agoRevert "wayland: Push NULL buffer when hiding a GdkWindow"
Carlos Garnacho [Thu, 19 Jan 2017 19:07:14 +0000 (20:07 +0100)]
Revert "wayland: Push NULL buffer when hiding a GdkWindow"

This reverts commit 0f2e19c01059d151d606e7006d95dc7f60c222fc.

8 years agodocs: Add gtk_print_job_set_source_fd()
David King [Thu, 19 Jan 2017 18:04:37 +0000 (18:04 +0000)]
docs: Add gtk_print_job_set_source_fd()

8 years agowayland: Push NULL buffer when hiding a GdkWindow
Carlos Garnacho [Thu, 19 Jan 2017 15:07:13 +0000 (16:07 +0100)]
wayland: Push NULL buffer when hiding a GdkWindow

This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.

Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.

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

8 years agocombobox: Avoid a pointless assignment
Daniel Boles [Thu, 19 Jan 2017 03:26:09 +0000 (03:26 +0000)]
combobox: Avoid a pointless assignment

Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.

8 years agocombobox: Also preselect active item in grid popup
Daniel Boles [Thu, 19 Jan 2017 03:12:32 +0000 (03:12 +0000)]
combobox: Also preselect active item in grid popup

i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid

8 years agoscale: Really fix documentation of set_digits()
Daniel Boles [Thu, 19 Jan 2017 00:44:35 +0000 (00:44 +0000)]
scale: Really fix documentation of set_digits()

This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.

8 years agoscale: doc: set_digits doesn’t round retroactively
Daniel Boles [Wed, 18 Jan 2017 23:42:55 +0000 (23:42 +0000)]
scale: doc: set_digits doesn’t round retroactively

Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.

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

8 years agoScale: Always sync ::digits to Range::round-digits
Daniel Boles [Wed, 18 Jan 2017 22:54:42 +0000 (22:54 +0000)]
Scale: Always sync ::digits to Range::round-digits

The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.

But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.

Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.

This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.

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

8 years agoRemove executable bit from C source files in tests
Daniel Boles [Wed, 18 Jan 2017 22:52:35 +0000 (22:52 +0000)]
Remove executable bit from C source files in tests

8 years agocombobox: Work around popup handler altering model
Daniel Boles [Wed, 18 Jan 2017 22:22:52 +0000 (22:22 +0000)]
combobox: Work around popup handler altering model

GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:

 • Until recently, this item would be selected in the menu shell, which
   would then be popped up and change the selection away from that item.
   This was therefore redundant (more on which below!) but benign.

 • After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
   however, this causes a critical assertion fail, as now we stash the
   originally selected item in a pointer so that it can be selected only
   after realisation/popup – but by that stage, the model has just been
   refiltered and the previous pointer no longer refers to a valid item.

This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.

If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)

8 years agocombobox: Don’t select active item if it’s hidden
Daniel Boles [Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)]
combobox: Don’t select active item if it’s hidden

I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.

8 years agocombobox: Move variables into narrowest scopes
Daniel Boles [Wed, 18 Jan 2017 21:20:10 +0000 (21:20 +0000)]
combobox: Move variables into narrowest scopes

8 years agoRevert "filechooser portal: Make sure we can save"
Matthias Clasen [Tue, 17 Jan 2017 19:14:34 +0000 (14:14 -0500)]
Revert "filechooser portal: Make sure we can save"

This reverts commit 4875c689a0e826604953965ffdb71d8b82cae364.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.

8 years agofilechooser portal: Make sure we can save
Matthias Clasen [Tue, 17 Jan 2017 19:08:38 +0000 (14:08 -0500)]
filechooser portal: Make sure we can save

Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.

8 years agogdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Rui Matos [Wed, 11 Jan 2017 18:12:12 +0000 (19:12 +0100)]
gdk/wayland: Always get the seat's key modifiers from the GdkKeymap

Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.

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

8 years agogdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set
Rui Matos [Wed, 11 Jan 2017 17:33:11 +0000 (18:33 +0100)]
gdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set

Gtk+ treats MOD1 as a synonym for Alt, and does not expect it to be
mapped around, so we should avoid adding GDK_META_MASK if MOD1 is
already included to avoid confusing gtk+ and applications that rely on
that behavior.

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

8 years agomir: properly handle empty clipboard
William Hua [Mon, 9 Jan 2017 17:04:48 +0000 (12:04 -0500)]
mir: properly handle empty clipboard

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

8 years agomir: paste clipboard data from content-hub
William Hua [Sat, 15 Oct 2016 20:19:59 +0000 (22:19 +0200)]
mir: paste clipboard data from content-hub

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

8 years agomir: copy clipboard data to content-hub
William Hua [Wed, 12 Oct 2016 20:56:01 +0000 (16:56 -0400)]
mir: copy clipboard data to content-hub

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

8 years agomir: connect to content-hub
William Hua [Tue, 11 Oct 2016 20:53:48 +0000 (16:53 -0400)]
mir: connect to content-hub

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

8 years agomir: track focused window
William Hua [Fri, 14 Oct 2016 21:00:34 +0000 (17:00 -0400)]
mir: track focused window

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

8 years agomir: implement window properties
William Hua [Tue, 11 Oct 2016 23:06:12 +0000 (19:06 -0400)]
mir: implement window properties

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

8 years ago3.22.7
Matthias Clasen [Mon, 16 Jan 2017 19:10:47 +0000 (14:10 -0500)]
3.22.7

8 years agowayland: avoid 0 width/height anchor rectangle
Olivier Fourdan [Thu, 12 Jan 2017 17:08:32 +0000 (18:08 +0100)]
wayland: avoid 0 width/height anchor rectangle

Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.

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

8 years agogrid: Fix plural error in docs' @Short_description
Daniel Boles [Sun, 15 Jan 2017 20:39:43 +0000 (20:39 +0000)]
grid: Fix plural error in docs' @Short_description

8 years agocssimage: Fallback images have no aspect ratio
Benjamin Otte [Fri, 13 Jan 2017 00:43:07 +0000 (01:43 +0100)]
cssimage: Fallback images have no aspect ratio

The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.

8 years agocssimage: Scale images to contain, not cover
Benjamin Otte [Fri, 13 Jan 2017 02:28:34 +0000 (03:28 +0100)]
cssimage: Scale images to contain, not cover

Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.

8 years agoDeprecate gdk_window_process[_all]_updates
Matthias Clasen [Wed, 11 Jan 2017 01:24:23 +0000 (20:24 -0500)]
Deprecate gdk_window_process[_all]_updates

These functions should not be used anymore now that we have a
frame clock, and are gone in GTK+ 4

8 years agogdk/wayland: Handle non-existant gsettings keys
Rui Matos [Mon, 9 Jan 2017 16:47:54 +0000 (17:47 +0100)]
gdk/wayland: Handle non-existant gsettings keys

Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

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

8 years agogdk/wayland: Add support for the gtk-enable-primary-paste gsetting
Rui Matos [Thu, 8 Dec 2016 17:18:53 +0000 (18:18 +0100)]
gdk/wayland: Add support for the gtk-enable-primary-paste gsetting

The gsetting was recently added so that we can have this configurable
on the wayland backend too.

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

8 years agoGDK W32: Use keyboard hook to detect AeroSnap combinations better
Руслан Ижбулатов [Sat, 24 Dec 2016 21:01:23 +0000 (21:01 +0000)]
GDK W32: Use keyboard hook to detect AeroSnap combinations better

Windows WM handles AeroSnap for normal windows on keydown. We did this
on keyup only because we do not get a keydown message, even if Windows WM
does nothing with a combination. However, in some specific cases it DOES
do something - and we have no way to detect that. Specifically, winkey+downarrow
causes maximized window to be restored by WM, and GDK fails to detect that. Then
GDK gets a keyup message, figures that winkey+downarrow was pressed and released,
and handles the combination - by minimizing the window.

To overcome this, install a low-level keyboard hook (high-level ones have
the same problem as normal message loop - they don't get messages when
Windows WM handles combinations) and use it to detect interesting key combinations
before Windows WM has a chance to block them from being processed.

Once an interesting combination is detected, post a message to the window, which
will be handled in due order.

It should be noted that this code handles key repetitions in a very crude manner.

The downside is that AeroSnap will not work if hook installation function call fails.
Also, this is a global hook, and if the hook procedure does something wrong, bad things
can happen.

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

8 years agoGDK W32: Handle CapsLock as part of the key shift level
Руслан Ижбулатов [Wed, 4 Jan 2017 04:31:53 +0000 (04:31 +0000)]
GDK W32: Handle CapsLock as part of the key shift level

Instead of using some kind of flawed logic about modifying a keypress result
when CapsLock is toggled, just add a CapsLock shift level (and all derived
shift levels, i.e. Shift+CapsLock and CapsLock+AltGr and Shift+CapsLock+AltGr)
and query Windows keyboard layout API about the result of keypresses involving
CapsLock.

Keysym table is going to be (roughly) twice as large now, but CapsLock'ed
keypresses will give correct results for some keyboard layouts (such as
Czech keyboard layout, which without this change produces lowercase letters
for CapsLock->[0,2,3,4...] instead of uppercase ones).

Keymap update time also increases accordingly.

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

8 years agorevealer: Fix a typo in a function doc
Daniel Boles [Mon, 9 Jan 2017 22:34:30 +0000 (22:34 +0000)]
revealer: Fix a typo in a function doc

Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.

8 years agowayland: Disable EGL swap interval
Carlos Garnacho [Thu, 22 Dec 2016 18:22:07 +0000 (19:22 +0100)]
wayland: Disable EGL swap interval

We have a frame clock that ensures rendering is done as per the
output vsync. There is no need to have Mesa do the same for us.

This, most notably, ensures Mesa doesn't schedule frame callbacks
that will be left unattended if the compositor stops throttling
frames for its surface, this is eg. the case if the toplevel is
moved to another workspace.

Also, given a SwapInterval!=0 will always bring these unexpected
side effects, check that it's possible to disable it, and spew
a debug message if that isn't the case.

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

8 years agogtkdnd: Remove unnecessary call
Carlos Garnacho [Thu, 24 Nov 2016 15:24:04 +0000 (16:24 +0100)]
gtkdnd: Remove unnecessary call

drag-data-delete is emitted based on the interchange of the
DELETE atom, which may well be set or bypassed locally by
the app. As such emitting it here is not right, the other
paths handling the DELETE atom interchange are still valid
and there.

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

8 years agowayland: Add fake mimetype for local DnD cases
Carlos Garnacho [Wed, 26 Oct 2016 19:31:58 +0000 (21:31 +0200)]
wayland: Add fake mimetype for local DnD cases

If there are no targets, DnD is probably intended to be local,
add a mimetype for matching then. The wayland protocol requires
at least one wl_data_offer.target call with the mimetype selected
for transfer.

8 years agoGDK W32: Special handling for VK_PAUSE
Руслан Ижбулатов [Wed, 27 Jul 2016 18:05:10 +0000 (18:05 +0000)]
GDK W32: Special handling for VK_PAUSE

Similar to VK_DIVIDE, this key can't be mapped to a scancode by
MapVirtualKeyEx(). Googling suggests that this is a known bug.

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

8 years agoGDK W32: Change WM_SYSMENU style switch logic
Руслан Ижбулатов [Sun, 25 Dec 2016 17:48:20 +0000 (17:48 +0000)]
GDK W32: Change WM_SYSMENU style switch logic

Instead of checking for window state and giving it extra styles that
fit, just give it all styles that it is missing. It turned out that
otherwise it is impossible to, for example, restore a maximized window
via sysmenu. Also, be more flexible towards GDK/WM window state mismatches
and consider the window minimized/maximized if *either* GDK or WM thinks so.

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

8 years agoGDK W32: Remove unneeded assertion
Руслан Ижбулатов [Mon, 9 Jan 2017 09:53:46 +0000 (09:53 +0000)]
GDK W32: Remove unneeded assertion

Just set check_for_dpi_awareness = TRUE and eventually it will be handled
correctly, even if setDpiAwareFunc() returns E_ACCESSDENIED or shcore functions
are NULL.

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

8 years agoMake GTK_DEBUG=interactive work better
Matthias Clasen [Wed, 4 Jan 2017 19:42:33 +0000 (14:42 -0500)]
Make GTK_DEBUG=interactive work better

We currently have various ways to initialize GTK+, and not
all of them were supporting this way of bringing up the
inspector. Fix this.

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

8 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 7 Jan 2017 12:53:31 +0000 (14:53 +0200)]
Updated Lithuanian translation

8 years agogtk-demo: Make icon counter work from ui file
Benjamin Otte [Sat, 7 Jan 2017 01:05:26 +0000 (02:05 +0100)]
gtk-demo: Make icon counter work from ui file

Gets rid of update always being 1 frame late.

8 years agogtk-demo: Add GtkFishbowl
Benjamin Otte [Sat, 7 Jan 2017 00:59:23 +0000 (01:59 +0100)]
gtk-demo: Add GtkFishbowl

Avoids usage of GtkFixed where child properties eat up all the CPU time.
And that's kinda not what I want to benchmark.

8 years agogtk-demo: Allow locking of icon count in fishbowl demo
Benjamin Otte [Sun, 20 Nov 2016 04:29:03 +0000 (05:29 +0100)]
gtk-demo: Allow locking of icon count in fishbowl demo

I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.

8 years agowayland: Handle subsurface as popup parent
Jonas Ådahl [Thu, 5 Jan 2017 08:01:49 +0000 (16:01 +0800)]
wayland: Handle subsurface as popup parent

When a subsurface is used as a parent of a popup, GDK needs to traverse
up to the transient-for as the next parent, to properly find the parent
used by the popup positioner. This is because the parent of a popup
must always either be an xdg_popup or an xdg_surface, but traversing
the "parent" (in GDK terms) upwards from a subsurface will end up on
the fake root window before we hit the actual parent (in Wayland terms).

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

8 years agoRevert "Make it possible to set style classes for label links"
Matthias Clasen [Fri, 6 Jan 2017 00:40:23 +0000 (19:40 -0500)]
Revert "Make it possible to set style classes for label links"

This reverts commit 9a2527b36122321c5aeaed8526747d54d0f4c0c8.

This needs more work to have a chance of working properly.

8 years agoRevert "Use CSS for styling links in labels"
Matthias Clasen [Fri, 6 Jan 2017 00:40:12 +0000 (19:40 -0500)]
Revert "Use CSS for styling links in labels"

This reverts commit 34264667ed844dd9212e987852e06d2bbba54e66.

8 years agoUse CSS for styling links in labels
Matthias Clasen [Thu, 5 Jan 2017 23:10:52 +0000 (18:10 -0500)]
Use CSS for styling links in labels

This was implemented only halfway, and was hardcoding the
underline. We don't need to do that anymore.

8 years agoBump version to 3.22.7
Matthias Clasen [Thu, 5 Jan 2017 22:33:51 +0000 (17:33 -0500)]
Bump version to 3.22.7

8 years agoMake it possible to set style classes for label links
Matthias Clasen [Thu, 5 Jan 2017 21:36:14 +0000 (16:36 -0500)]
Make it possible to set style classes for label links

This makes it possible to style links in labels differently
in certain situations.