Руслан Ижбулатов [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
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.
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.
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.
Daniel Boles [Fri, 17 Feb 2017 22:01:32 +0000 (22:01 +0000)]
Image—Add some more missing (nullable) annotations
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.
Timm Bäder [Thu, 16 Feb 2017 11:22:58 +0000 (12:22 +0100)]
filechooserwidget: Fix profiling code compilation
Timm Bäder [Thu, 16 Feb 2017 11:22:33 +0000 (12:22 +0100)]
Add a few missing (nullable) annotations
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.
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
Tong Hui [Wed, 15 Feb 2017 12:11:27 +0000 (20:11 +0800)]
Update zh_CN translation
Matthias Clasen [Mon, 13 Feb 2017 18:28:00 +0000 (13:28 -0500)]
3.22.8
Руслан Ижбулатов [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
Lapo Calamandrei [Wed, 8 Feb 2017 15:53:10 +0000 (16:53 +0100)]
HC: 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.
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
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
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
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
Sveinn í Felli [Sat, 4 Feb 2017 15:32:13 +0000 (15:32 +0000)]
Update Icelandic translation
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
Daniel Boles [Tue, 31 Jan 2017 09:39:39 +0000 (09:39 +0000)]
searchentry: Fix typo in documentation
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."
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.
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.
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
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
William Hua [Thu, 12 Jan 2017 22:16:27 +0000 (17:16 -0500)]
mir: use modal window hint
William Hua [Mon, 9 Jan 2017 22:54:37 +0000 (17:54 -0500)]
mir: fix compile-time warnings
Daniel Boles [Sat, 21 Jan 2017 16:10:32 +0000 (16:10 +0000)]
combobox: Fix documentation typo bx => box
Daniel Boles [Fri, 20 Jan 2017 22:15:42 +0000 (22:15 +0000)]
menushell: Don’t dereference before typechecking
Daniel Boles [Fri, 20 Jan 2017 21:07:26 +0000 (21:07 +0000)]
combobox: If typechecking, don’t reference before
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.
Руслан Ижбулатов [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
Mandy Wang [Fri, 20 Jan 2017 12:37:01 +0000 (20:37 +0800)]
update zh_CN translation
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
Руслан Ижбулатов [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.
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.
David King [Thu, 19 Jan 2017 18:04:37 +0000 (18:04 +0000)]
docs: Add gtk_print_job_set_source_fd()
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
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.
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
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.
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
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
Daniel Boles [Wed, 18 Jan 2017 22:52:35 +0000 (22:52 +0000)]
Remove executable bit from C source files in tests
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)
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.
Daniel Boles [Wed, 18 Jan 2017 21:20:10 +0000 (21:20 +0000)]
combobox: Move variables into narrowest scopes
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.
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.
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
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
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
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
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
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
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
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
Matthias Clasen [Mon, 16 Jan 2017 19:10:47 +0000 (14:10 -0500)]
3.22.7
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
Daniel Boles [Sun, 15 Jan 2017 20:39:43 +0000 (20:39 +0000)]
grid: Fix plural error in docs' @Short_description
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.
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.
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
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
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
Руслан Ижбулатов [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
Руслан Ижбулатов [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
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.
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
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
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.
Руслан Ижбулатов [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
Руслан Ижбулатов [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
Руслан Ижбулатов [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
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
Aurimas Černius [Sat, 7 Jan 2017 12:53:31 +0000 (14:53 +0200)]
Updated Lithuanian translation
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.
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.
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.
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
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.
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.
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.
Matthias Clasen [Thu, 5 Jan 2017 22:33:51 +0000 (17:33 -0500)]
Bump version to 3.22.7
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.