gtk4.git
9 years agoanimatedstyle: fail to create new style if timestamp goes backwards
Matt Watson [Tue, 22 Mar 2016 07:54:11 +0000 (00:54 -0700)]
animatedstyle: fail to create new style if timestamp goes backwards

With slowdown factor, we will only we be able to handle timestamps
that monotonically increase.

9 years agocssanimation: port to progress tracker
Matt Watson [Fri, 25 Mar 2016 06:43:15 +0000 (23:43 -0700)]
cssanimation: port to progress tracker

9 years agocsstransition: port to progress tracker
Matt Watson [Mon, 7 Mar 2016 06:45:27 +0000 (22:45 -0800)]
csstransition: port to progress tracker

9 years agoentry: port to progress tracker
Matt Watson [Tue, 5 Apr 2016 06:44:04 +0000 (23:44 -0700)]
entry: port to progress tracker

9 years agoprogressbar: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 08:08:48 +0000 (01:08 -0700)]
progressbar: port to progress tracker

9 years agoscrolledwindow: port indicator fade to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:54:34 +0000 (14:54 -0700)]
scrolledwindow: port indicator fade to progress tracker

9 years agopopover: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:45:21 +0000 (14:45 -0700)]
popover: port to progress tracker

9 years agoswitch: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:38:22 +0000 (14:38 -0700)]
switch: port to progress tracker

9 years agorevealer: port to progress tracker
Matt Watson [Fri, 25 Mar 2016 09:01:25 +0000 (02:01 -0700)]
revealer: port to progress tracker

9 years agostack: skip first frame for animations
Matt Watson [Wed, 2 Mar 2016 01:19:50 +0000 (17:19 -0800)]
stack: skip first frame for animations

Not the ideal solution for this problem, but in practice leads to
much better performance on lower end hardware.

Stack does a double draw on the first frame of its animation, of
both the old contents (into a cairo surface) and the new contents.
Homogeneous stacks only need to reallocate contents on the first
frame.

On lower powered hardware where our frames will be a good deal
slower than the refresh rate anyway, we can assure a smother
experience by waiting a frame to start tweening where frame duration
will be more consistent.

9 years agostack: port to progress tracker
Matt Watson [Tue, 1 Mar 2016 06:24:39 +0000 (22:24 -0800)]
stack: port to progress tracker

9 years agoinspector: add slider to control slowdown factor
Matt Watson [Mon, 14 Mar 2016 10:38:55 +0000 (03:38 -0700)]
inspector: add slider to control slowdown factor

9 years agoprogresstracker: add GTK_SLOWDOWN environment variable
Matt Watson [Mon, 14 Mar 2016 10:38:23 +0000 (03:38 -0700)]
progresstracker: add GTK_SLOWDOWN environment variable

As we consolidate widgets to use progress tracker, this will allow
us to control the speed of all animations in a centralized place

9 years agoprogresstracker: simple struct to track animation progress
Matt Watson [Tue, 1 Mar 2016 05:39:33 +0000 (21:39 -0800)]
progresstracker: simple struct to track animation progress

9 years agodemos: Show slider/rotation axes in "Event axes" demo
Carlos Garnacho [Fri, 8 Apr 2016 15:25:53 +0000 (17:25 +0200)]
demos: Show slider/rotation axes in "Event axes" demo

9 years agowayland: Propagate slider/rotation axes from tools to devices
Carlos Garnacho [Fri, 8 Apr 2016 15:25:04 +0000 (17:25 +0200)]
wayland: Propagate slider/rotation axes from tools to devices

9 years agotest: do not remove files on distclean
Olivier Fourdan [Wed, 6 Apr 2016 17:44:16 +0000 (19:44 +0200)]
test: do not remove files on distclean

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

9 years agowayland: do not update shadows for child windows
Olivier Fourdan [Thu, 7 Apr 2016 13:56:46 +0000 (15:56 +0200)]
wayland: do not update shadows for child windows

glade-previewer places a gtkwindow inside another toplevel gtkwindow,
updating the shadow width for the client induces a busy loop where the
parent will grow continuously until it crashes gnome-shell/mutter.

To avoid the loop, do not update the shadow width if not dealing with a
toplevel window.

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

9 years agogdkevents: Fix GDK_AVAILABLE_IN annotation
Carlos Garnacho [Fri, 8 Apr 2016 13:08:15 +0000 (15:08 +0200)]
gdkevents: Fix GDK_AVAILABLE_IN annotation

These functions have just been added. An oversight prior to merging
wayland tablet.

9 years agowayland: Check the tablet manager before creating a wp_tablet_seat
Carlos Garnacho [Wed, 6 Apr 2016 15:29:11 +0000 (17:29 +0200)]
wayland: Check the tablet manager before creating a wp_tablet_seat

This makes things non-crashy if the compositor doesn't provide wp_tablet_manager

9 years agogtk3-demo: Add tool information to "Event axes" demo
Carlos Garnacho [Tue, 5 Apr 2016 12:33:29 +0000 (14:33 +0200)]
gtk3-demo: Add tool information to "Event axes" demo

Print tool type and serial, if found.

9 years agowayland: Hook tablets to GdkSeat
Carlos Garnacho [Tue, 26 Jan 2016 18:25:19 +0000 (19:25 +0100)]
wayland: Hook tablets to GdkSeat

Those are now also grabbed togetther with other master pointers,
so everything is able to interoperate on eg. popups triggered by
other devices.

9 years agowayland: Translate pen buttons into button events
Carlos Garnacho [Mon, 22 Jun 2015 16:28:46 +0000 (18:28 +0200)]
wayland: Translate pen buttons into button events

up/down already take GDK_BUTTON_PRIMARY, we translate BTN_STYLUS(2)
into GDK_BUTTON_MIDDLE/SECONDARY.

9 years agoWayland: Translate wl_tablet.down/up into button events
Stephen Chandler Paul [Mon, 22 Jun 2015 16:16:27 +0000 (18:16 +0200)]
Wayland: Translate wl_tablet.down/up into button events

These are sent with button=GDK_BUTTON_PRIMARY, axes must be also
included in these events, in addition to motion ones.

9 years agoWayland: Translate tool axes in motion events
Stephen Chandler Paul [Mon, 22 Jun 2015 16:02:50 +0000 (18:02 +0200)]
Wayland: Translate tool axes in motion events

On wayland, such axes are per-tool, we must update device capabilities
on the fly as new tools enter proximity, first the slave device so
it matches the current tool, and then the master device so it looks
the same than the current slave device.

9 years agoWayland: Implement proximity/crossing/motion event emission on tablets
Stephen Chandler Paul [Mon, 22 Jun 2015 15:51:48 +0000 (17:51 +0200)]
Wayland: Implement proximity/crossing/motion event emission on tablets

Each tablet will update its own GdkWaylandPointerData separately. This
commit only adds plain motion event emission so far, no axes are managed
yet.

9 years agoWayland: Add initial support for drawing tablets
Stephen Chandler Paul [Mon, 19 Jan 2015 00:32:24 +0000 (19:32 -0500)]
Wayland: Add initial support for drawing tablets

Only the management of tablets and tools is added so far. No tablet events
are yet interpreted.

As it's been the tradition in GTK+, erasers are split into their own device,
whereas the rest of the tools are meant to be routed through the
GDK_SOURCE_PEN device. Both pen/eraser devices are slaves to a master
pointer device, separate to wl_pointer's. This is so each tablet can
maintain its own cursor/positioning accounting.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
9 years agobuild: Bump wayland-protocols dependency to 1.3
Carlos Garnacho [Wed, 6 Apr 2016 13:49:22 +0000 (15:49 +0200)]
build: Bump wayland-protocols dependency to 1.3

Needed for tablet support

9 years agowayland: Refactor master pointer data into a separate struct
Carlos Garnacho [Fri, 19 Jun 2015 15:25:54 +0000 (17:25 +0200)]
wayland: Refactor master pointer data into a separate struct

This will enable multiple "pointers" to have separate data here.
Will come out useful when adding support for tablets, as they
will have a separate cursor for all purposes.

9 years agogdkcursor-wayland.c: Minor indentation fix
Stephen Chandler Paul [Sun, 18 Jan 2015 19:30:58 +0000 (14:30 -0500)]
gdkcursor-wayland.c: Minor indentation fix

Changed the tabs to spaces

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
9 years agox11: Use XInternAtom directly on poking device hardware IDs
Carlos Garnacho [Tue, 30 Jun 2015 14:28:59 +0000 (16:28 +0200)]
x11: Use XInternAtom directly on poking device hardware IDs

This way we don't cache the property if it wasn't previously there,
added by the driver itself. Bailing out is due there.

9 years agodemos: Enable multidevice behavior on event-axes demo
Carlos Garnacho [Thu, 18 Jun 2015 13:09:46 +0000 (15:09 +0200)]
demos: Enable multidevice behavior on event-axes demo

On wayland we get separate master/slaves for each tablet, we will
need to receive crossing events for each master pointer if there's
more than one around.

9 years agodemos: Set crossing events mask explicitly on event-axes demo.
Carlos Garnacho [Thu, 18 Jun 2015 13:08:39 +0000 (15:08 +0200)]
demos: Set crossing events mask explicitly on event-axes demo.

9 years agogtk3-demo: Show multiple master devices on the "Event axes" demo
Carlos Garnacho [Tue, 10 Feb 2015 14:59:18 +0000 (15:59 +0100)]
gtk3-demo: Show multiple master devices on the "Event axes" demo

9 years agogtk-demo: Add support for distance in event_axes
Stephen Chandler Paul [Tue, 10 Feb 2015 03:02:08 +0000 (22:02 -0500)]
gtk-demo: Add support for distance in event_axes

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
9 years agogtk-demo: Use GdkAxisUse instead of axis labels
Stephen Chandler Paul [Tue, 10 Feb 2015 00:44:50 +0000 (19:44 -0500)]
gtk-demo: Use GdkAxisUse instead of axis labels

Axis labels are very X specific, and are not really possible to port to other
backends such as Wayland. As such, it makes more sense to use GdkAxisUse and
GdkAxisUseFlag in order to determine the axis capabilities of a device and draw
their axes.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
9 years agoGdkDeviceTool: Add GdkAxisFlags info to tablet tools
Stephen Chandler Paul [Mon, 22 Jun 2015 15:19:16 +0000 (17:19 +0200)]
GdkDeviceTool: Add GdkAxisFlags info to tablet tools

Different tools may have different sets of axes, we should store that
info somewhere.

9 years agoGdkDeviceTool: Add GdkDeviceToolType to identify the physical tool type
Stephen Chandler Paul [Tue, 13 Jan 2015 05:03:49 +0000 (00:03 -0500)]
GdkDeviceTool: Add GdkDeviceToolType to identify the physical tool type

Because there are multiple different types of styluses that can be used with
tablets, we have to have some sort of identifier for them attached to the
GdkDeviceTool, especially since knowing the actual tool type for a GdkDeviceTool
is necessary for matching up a GdkDeviceTool with it's appropriate
GdkInputSource in Wayland (eg. matching up a GdkDeviceTool eraser with the
GDK_SOURCE_ERASER GdkInputSource of a wayland tablet).

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
9 years agox11: Set GdkDeviceTool on motion/button events
Carlos Garnacho [Tue, 6 Jan 2015 13:57:21 +0000 (14:57 +0100)]
x11: Set GdkDeviceTool on motion/button events

The last known tool from the device is used here. If no tool is known,
the event will just have a NULL pointer there.

9 years agox11: Update GdkDevices on "Wacom Serial IDs" property changes
Carlos Garnacho [Tue, 6 Jan 2015 13:56:02 +0000 (14:56 +0100)]
x11: Update GdkDevices on "Wacom Serial IDs" property changes

This takes care of the emission of GdkDevice::tool-changed, plus the
updating of the internal device accounting.

9 years agogdk: Forward tools in client-side windows event translation
Carlos Garnacho [Tue, 5 Apr 2016 12:33:24 +0000 (14:33 +0200)]
gdk: Forward tools in client-side windows event translation

9 years agoevents: Add gdk_event_[gs]et_device_tool()
Carlos Garnacho [Tue, 6 Jan 2015 13:52:42 +0000 (14:52 +0100)]
events: Add gdk_event_[gs]et_device_tool()

This getter/setter will manage the tool pointer in GdkEventPrivate. The
setter should be most notably used by backends.

9 years agoGdkSeatDefault: Add functions to add/remove tools
Carlos Garnacho [Fri, 29 Jan 2016 12:07:13 +0000 (13:07 +0100)]
GdkSeatDefault: Add functions to add/remove tools

This may be used by any backend using GdkSeatDefault as its seat
implementation.

9 years agogdk: Add GdkSeat::tool-added/removed signals
Carlos Garnacho [Fri, 29 Jan 2016 12:06:02 +0000 (13:06 +0100)]
gdk: Add GdkSeat::tool-added/removed signals

And a helper function to lookup a tool from the seat. Those are
tracker per-seat, and may be shared across devices.

9 years agogdkdevice: Add GdkDevice::tool-changed signal
Carlos Garnacho [Tue, 6 Jan 2015 13:44:15 +0000 (14:44 +0100)]
gdkdevice: Add GdkDevice::tool-changed signal

On the devices and backends that support it, this signal will be emitted
on slave/floating devices whenever the tool they are interacting with
changes. These notifications may also work as a sort of proximity events,
as the tool will be unset when the pen moves too far.

For backends, gdk_device_update_tool() has been included, all that should
be done on their side is just calling this whenever any tool might have
changed.

9 years agogdkdevice: Add GdkDeviceTool to identify device tools
Carlos Garnacho [Tue, 6 Jan 2015 13:38:14 +0000 (14:38 +0100)]
gdkdevice: Add GdkDeviceTool to identify device tools

GdkDeviceTool is an opaque object that can be used to identify a given
tool (eg. pens on tablets) during the app/device lifetime. Tools are only
set on non-master devices, and are owned by these.

The accounting functions are made private, the only public call on
GdkDeviceTool so far is gdk_device_tool_get_serial(), useful to identify
the tool across runs.

9 years agodevice: Add gdk_device_get_axes(), and ::axes property
Carlos Garnacho [Tue, 27 Jan 2015 21:35:40 +0000 (21:35 +0000)]
device: Add gdk_device_get_axes(), and ::axes property

This returns a GdkAxisFlags, holding the axes currently available
through this device.

9 years agodevice: Add distance/rotation/slider GdkAxisUse values
Carlos Garnacho [Tue, 27 Jan 2015 21:34:21 +0000 (21:34 +0000)]
device: Add distance/rotation/slider GdkAxisUse values

These are possible to handle in tablets, so add a value for these in the
axis enum.

9 years agoGDK W32: Don't move windows into top-left corner on style change
Руслан Ижбулатов [Wed, 6 Apr 2016 10:22:15 +0000 (10:22 +0000)]
GDK W32: Don't move windows into top-left corner on style change

This fixes a bug that was introduced by db1b24233e758200ab9bc23fdb9b64dba4876a00.
The reason why 0:0 coordinates were passed was that SWP_NOREPOSITION was
misinterpreted as SWP_NOMOVE. That is not the case - SWP_NOREPOSITION
prevents owner Z-order change, not the window position change.

9 years agowayland: Do not resize with the same size
Olivier Fourdan [Mon, 4 Apr 2016 12:55:38 +0000 (14:55 +0200)]
wayland: Do not resize with the same size

gnome-control-center is calling gtk_window_resize() on configure-event
signals which leads to a busy loop.

Avoids such a busy loop by not re-configuring a window with the same
size, unless this is coming from and xdg-shell configure.

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

9 years agoClarify that one cannot use the same variable
Wouter Verhelst [Thu, 31 Mar 2016 09:09:41 +0000 (11:09 +0200)]
Clarify that one cannot use the same variable

A naive way to perform an action on all parent nodes of a given node
could be to do:

while(gtk_tree_model_iter_parent(model, &iter, &iter)) {
/* perform some action on iter here */
}

However, since gtk_tree_model_iter_parent() will initialize the iterator
pointed to by the second parameter before performing the lookup, this
will not work.

Explicitly document this behaviour.

Signed-off-by: Wouter Verhelst <w@uter.be>
https://bugzilla.gnome.org/show_bug.cgi?id=573380

9 years agocups: Fix "format not a string literal" error
Bastien Nocera [Mon, 4 Apr 2016 14:38:04 +0000 (16:38 +0200)]
cups: Fix "format not a string literal" error

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

9 years agorecent-manager: Fix "format not a string literal" error
Bastien Nocera [Mon, 4 Apr 2016 13:03:12 +0000 (15:03 +0200)]
recent-manager: Fix "format not a string literal" error

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

9 years agofile-chooser-widget: Fix "format not a string literal" error
Bastien Nocera [Mon, 4 Apr 2016 12:32:56 +0000 (14:32 +0200)]
file-chooser-widget: Fix "format not a string literal" error

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

9 years agoabout-dialog: Fix "format not a string literal" errors
Bastien Nocera [Mon, 4 Apr 2016 12:16:17 +0000 (14:16 +0200)]
about-dialog: Fix "format not a string literal" errors

A non-intrusive fix.

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

9 years agoui-manager: Fix "format not a string literal" errors
Bastien Nocera [Mon, 4 Apr 2016 12:14:13 +0000 (14:14 +0200)]
ui-manager: Fix "format not a string literal" errors

Quite a bit of code movement, but necessary to build with the
default format errors produced by newer versions of GCC.

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

9 years agoAdwaita: transparent textview border border
Lapo Calamandrei [Mon, 4 Apr 2016 10:03:11 +0000 (12:03 +0200)]
Adwaita: transparent textview border border

So it will play nicely with gedit color combinations.
See https://bugzilla.gnome.org/show_bug.cgi?id=764203

9 years agoUpdated Greek translation
Tom Tryfonidis [Mon, 4 Apr 2016 09:28:23 +0000 (09:28 +0000)]
Updated Greek translation
(cherry picked from commit 40afffb9fde9f2fc46d1fafd9dcdca7692e065ef)

9 years agoMove GdkDeviceManager to deprecated section
Matthias Clasen [Mon, 4 Apr 2016 03:39:18 +0000 (23:39 -0400)]
Move GdkDeviceManager to deprecated section

It has been superseded by GdkSeat.

9 years agoAdd an index for 3.22 api additions
Matthias Clasen [Mon, 4 Apr 2016 03:33:57 +0000 (23:33 -0400)]
Add an index for 3.22 api additions

9 years agowayland: Remove an unused vfunc
Matthias Clasen [Sun, 3 Apr 2016 22:17:16 +0000 (18:17 -0400)]
wayland: Remove an unused vfunc

9 years agowayland: Remove unused field
Matthias Clasen [Sat, 2 Apr 2016 18:56:55 +0000 (14:56 -0400)]
wayland: Remove unused field

9 years agoUpdated Esperanto translation
Kristjan SCHMIDT [Sun, 3 Apr 2016 00:20:00 +0000 (02:20 +0200)]
Updated Esperanto translation

9 years agoUpdated Esperanto translation
Kristjan SCHMIDT [Sat, 2 Apr 2016 22:46:18 +0000 (00:46 +0200)]
Updated Esperanto translation

9 years agoheaderbar: Don't underallocate the label box
Timm Bäder [Sat, 2 Apr 2016 14:20:09 +0000 (16:20 +0200)]
headerbar: Don't underallocate the label box

We use a label_sizing_box to make sure the headerbar can always contain
both a title and a subtitle without resizing when showing/hiding either
of them, but we should only do that for the height; the min width of the
label_box can be larger than that of the label_sizing_box.

9 years agoAdwaita: style textview border
Lapo Calamandrei [Sat, 2 Apr 2016 14:24:52 +0000 (16:24 +0200)]
Adwaita: style textview border

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

9 years agoAdwaita: cosmetic fixes
Lapo Calamandrei [Sat, 2 Apr 2016 14:03:02 +0000 (16:03 +0200)]
Adwaita: cosmetic fixes

9 years agowayland: Avoid NULL slave devices in GdkSeat::get_slaves
Carlos Garnacho [Fri, 1 Apr 2016 17:09:03 +0000 (19:09 +0200)]
wayland: Avoid NULL slave devices in GdkSeat::get_slaves

Just because we're asked for a capability, it doesn't mean we have
it.

9 years agoAdwaita: set secondary caret color to selection blue
Lapo Calamandrei [Fri, 1 Apr 2016 14:42:40 +0000 (16:42 +0200)]
Adwaita: set secondary caret color to selection blue

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

9 years agogtkwindow: Don't allow unresizable windows to be smaller than required
Rui Matos [Thu, 31 Mar 2016 18:56:01 +0000 (20:56 +0200)]
gtkwindow: Don't allow unresizable windows to be smaller than required

Commit cdc580463e409a9b7e5f1480afa68d875ff3ff65 made it so that
unresizable windows can't be smaller than a set default size but it
lost the logic to ensure these windows remain at least big enough to
comply with their requisition.

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

9 years agowidget: Always warn when underallocating widgets
Timm Bäder [Tue, 23 Feb 2016 09:34:16 +0000 (10:34 +0100)]
widget: Always warn when underallocating widgets

9 years agowayland: Print out more debug info
Matthias Clasen [Fri, 1 Apr 2016 00:31:00 +0000 (20:31 -0400)]
wayland: Print out more debug info

Print out the subpixel layout and frame rates that the compositor
sends us.

9 years agogdkwindow: Remove O(n-children) code in gdk_window_invalidate
Alexander Larsson [Thu, 31 Mar 2016 16:56:18 +0000 (18:56 +0200)]
gdkwindow: Remove O(n-children) code in gdk_window_invalidate

When we invalidate a window we need to also invalidate all child windows
that are native (non-native are automatically invalidated as we track
invalidation once per native window only). This was done in a pretty
inefficient way, recursing over the entire tree.

This makes the invalidation much faster by only looking at the native
children of the native window we're in, filtering out those that
are not a descendant of the client side window we're interested in.
Given that there are very few native subwindows this is much faster.

9 years agoicon theme: Make the builtin hicolor index match reality
Matthias Clasen [Thu, 31 Mar 2016 11:11:24 +0000 (07:11 -0400)]
icon theme: Make the builtin hicolor index match reality

We were missing all of the status directories, and a few sizes.
This was causing us to not find image-missing on systems without
hicolor icon theme (this basically only happens on Windows).

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

9 years agoUpdated Thai translation.
Theppitak Karoonboonyanan [Thu, 31 Mar 2016 02:12:58 +0000 (09:12 +0700)]
Updated Thai translation.

9 years agoUse AM_DISTCHECK_CONFIGURE_FLAGS
Matthias Clasen [Thu, 31 Mar 2016 01:54:04 +0000 (21:54 -0400)]
Use AM_DISTCHECK_CONFIGURE_FLAGS

This is preferred over DISTCHECK_CONFIGURE_FLAGS in modern automake.

9 years agoAdwaita: theme acceleditor > label
Matthias Clasen [Wed, 30 Mar 2016 21:08:39 +0000 (17:08 -0400)]
Adwaita: theme acceleditor > label

We need to have an opaque background here, otherwise the underlying
cell shines through.

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

9 years agoAccel cell renderer: Set a css name
Matthias Clasen [Wed, 30 Mar 2016 21:08:02 +0000 (17:08 -0400)]
Accel cell renderer: Set a css name

Give the event box we use here the distinctive name "acceleditor".

9 years agowidget: queue a redraw only if resize highlighting is enabled
Benjamin Otte [Wed, 30 Mar 2016 19:41:08 +0000 (21:41 +0200)]
widget: queue a redraw only if resize highlighting is enabled

e8aa9b0440e03e7002323922f862342db51c5f32 introduced a new debug mode
that highlights resizes. Unfortunately it has the side effect of
always queueing redraws even when the debug mode is not enabled.
Make the redraw conditional.

9 years agowindow: Make the sample code obey the party line on geometry widgets
Debarshi Ray [Tue, 29 Mar 2016 17:58:21 +0000 (19:58 +0200)]
window: Make the sample code obey the party line on geometry widgets

The geometry_widget parameter is deprecated [1]. If one is passed, we
remove GDK_HINT_BASE_SIZE and GDK_HINT_RESIZE_INC from the mask [2].

[1] commit 08974a1e9a6099a5a94b9d56970dbf96e473ba87
[2] commit f7cc4abbad76f354cdc740e7fb9192719f72a89a

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

9 years agoGDK W32: Use a dumb window class for decorative windows
Руслан Ижбулатов [Tue, 15 Mar 2016 16:10:34 +0000 (16:10 +0000)]
GDK W32: Use a dumb window class for decorative windows

Currently only one kind of decorative window is in use - the shape
indicator that is shown when snapping windows to the edge of the screen.

When normal toplevel class is used, its window procedure expects certain
motions from GDK (passing user data to CreateWindowEx(), registering
handle in a hash map etc), and might crash if that is not done.

Dumb window doesn't require anything, it can just be.

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

9 years agoGDK W32: Add/subtract shadow when (un)snapping
Руслан Ижбулатов [Tue, 15 Mar 2016 10:17:45 +0000 (10:17 +0000)]
GDK W32: Add/subtract shadow when (un)snapping

Now halfleft/halfright/fullup snaps do hug screen edges as intended.

Documents AeroSnap behaviour when snapped windows are drag-resized
(currently this implementation handles this in a very simplistic way).

Don't believe GTK when it tells us that window shadow is 0, preserve
previous values (but do remember that GTK wants no shadow, in case
we need that).

Fixes a couple of bugs in unsnapping (check offset against the half
of the window; don't put pointer in the middle of the window vertically
if it still fits in the top half).

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

9 years agoGDK W32: Add/subtract shadow when drag-resizing
Руслан Ижбулатов [Tue, 15 Mar 2016 10:15:14 +0000 (10:15 +0000)]
GDK W32: Add/subtract shadow when drag-resizing

Implements gdk_win32_window_set_shadow_width().
Uses shadow width/height to adjust max tracking size, allowing
windows to be drag-resized to cover the whole desktop.

Also uses SM_C*VIRTUALSCREEN instead of SM_C*MAXTRACK.

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

9 years agoGDK W32: Draw snap indicators for AeroSnap
Руслан Ижбулатов [Sat, 12 Mar 2016 16:26:19 +0000 (16:26 +0000)]
GDK W32: Draw snap indicators for AeroSnap

Indicator is a bare layered click-through native window,
painted completely by GDK, including animation.

This commit also isolates some of the more spam-ish debug logging
under ifdef.

This commit also changes the system metric used for maximal window
height for the snapping purposes. Turns out, SM_CYMAXTRACK is way
too large, use SM_CYVIRTUALSCREEN instead.

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

9 years agoGDK W32: Add drag-to-snap feature to AeroSnap
Руслан Ижбулатов [Tue, 8 Mar 2016 05:03:29 +0000 (05:03 +0000)]
GDK W32: Add drag-to-snap feature to AeroSnap

This implements the part of AeroSnap that snaps windows when you
drag them (while moving or resizing) to the edge of the screen.

It also fixes drag behaviour for snapped and maximized windows
(if such windows are dragged, first they must be unmaximized/unsnapped).

Note that this code does not take into account the shadow width, and
because of that the under-pointer-position-preserving window moves
might not look as such for maximized windows, which lack the shadow
when maximized, but do have the shadow when unmaximized.

This commit also doesn't cover some corner-cases the same way AeroSnap does.

Also, the snapping indicator (which is supposed to be a window shape that
shows where the window will be if the drag op is stopped at its current
point) is not being drawn, all routines responsible for its creation,
moving and drawing are stubs.

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

9 years agoGDK W32: Improve AeroSnap - don't resize windows that fit
Руслан Ижбулатов [Tue, 8 Mar 2016 03:17:09 +0000 (03:17 +0000)]
GDK W32: Improve AeroSnap - don't resize windows that fit

This is what AeroSnap does. If a window is being unsnapped on
a new monitor, check if the work area is large enough for the
window to fit in its normal size. If the window fits, just
reposition it so that the ratio of
left-window-edge-to-screen-edge / right-window-edge-to-screen-edge
remains the same, without scaling the window.

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

9 years agoGDK W32: Re-implement AeroSnap for CSD windows
Руслан Ижбулатов [Tue, 8 Mar 2016 02:33:47 +0000 (02:33 +0000)]
GDK W32: Re-implement AeroSnap for CSD windows

It works exactly like AeroSnap.
Except for shift+win+left/right, which is left for AeroSnap
to handle (AeroSnap takes action before we get the message,
so there's no way for us to override it).
The only thing that doesn't work is shift+win+left/right on
a maximized window, for reasons unknown at the moment.

This only implements winkey+stuff behaviour of AeroSnap,
not the drag-to-the-edge-and-something-funny-happens one.

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

9 years agowindow: Fix gtk_window_set_geometry_hints documentation
Debarshi Ray [Tue, 29 Mar 2016 17:29:31 +0000 (19:29 +0200)]
window: Fix gtk_window_set_geometry_hints documentation

The geometry_widget parameter is ignored from 3.20 onwards [1], not
3.18 as mentioned in the documentation.

[1] commit 08974a1e9a6099a5a94b9d56970dbf96e473ba87

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

9 years agoBump to 3.21.0
Emmanuele Bassi [Tue, 29 Mar 2016 15:24:14 +0000 (16:24 +0100)]
Bump to 3.21.0

Otherwise newly added API will start warning.

9 years agoGDK W32: Erase hidden layered windows before showing them
Руслан Ижбулатов [Wed, 16 Mar 2016 18:16:33 +0000 (18:16 +0000)]
GDK W32: Erase hidden layered windows before showing them

If a layered window was hidden and is made visible, erase its
contents before showing it. GDK will schedule a redraw, but until
then we generally don't want to show old contents.

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

9 years agoGDK W32: Implement show_window_menu()
Руслан Ижбулатов [Fri, 18 Mar 2016 04:51:52 +0000 (04:51 +0000)]
GDK W32: Implement show_window_menu()

This is achieved by sending undocumented message WM_SYSMENU
to the window.
Before doing that, the window is given WS_SYSMENU style
(to enable window menu) and some combination of
WS_MAXIMIZEBOX (for "Mazimize" item)
WS_MINIMIZEBOX (for "Minimize" item)
WS_SIZEBOX (for "Size" item)
depending on which operations are currently permissible.

WM_SYSMENU is processed by DefWindowProc(), which results
in showing the window menu. We remove extra styles
at the first opportunity (WM_INITMENU message), as they
alter the way our window is rendered.

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

9 years agoAdwaita: set caret-color for drop targets
Lapo Calamandrei [Tue, 29 Mar 2016 13:06:11 +0000 (15:06 +0200)]
Adwaita: set caret-color for drop targets

9 years agoAdwaita: cosmetic fix
Lapo Calamandrei [Tue, 29 Mar 2016 13:01:57 +0000 (15:01 +0200)]
Adwaita: cosmetic fix

9 years agoAdd some tests for GdkRectangle
Matthias Clasen [Mon, 28 Mar 2016 23:54:55 +0000 (19:54 -0400)]
Add some tests for GdkRectangle

In particular, we're testing corner cases with empty rectangles
here.

9 years agoExpand visual tests a bit
Matthias Clasen [Mon, 28 Mar 2016 23:28:57 +0000 (19:28 -0400)]
Expand visual tests a bit

9 years agoAdd tests for seat apis
Matthias Clasen [Mon, 28 Mar 2016 23:22:36 +0000 (19:22 -0400)]
Add tests for seat apis

These are just some basic sanity tests.

9 years agoMove autotestkeywords to testsuite
Matthias Clasen [Mon, 28 Mar 2016 21:56:13 +0000 (17:56 -0400)]
Move autotestkeywords to testsuite

All the 'make check' and installed tests are now in testsuite/,
and tests/ is just a collection manual test programs.

9 years agowindow: Remove suspicious branch
Benjamin Otte [Tue, 1 Dec 2015 16:25:54 +0000 (17:25 +0100)]
window: Remove suspicious branch

While this commit was found to make emacs windows shrink (and it was
reverted in the gtk-3-20 branch for that reason), that was the only
observed breakage, while the reversal broke several of our unit tests.

Closer study of the emacs sources revealed that it does some really
unsupportable things like doing its own X event handling behind GTK+'s
back and freely mixing sizes of GtkWindows and GdkWindows obtained in
various ways. I've filed a bug against emacs with suggestions for how
to avoid the shrinking window, regardless of this commit.

Original commit message:

It seems this branch is not needed anymore. It was originally added in
1999 to support gtk_widget_realize(), but all those reasons seem
obsolete today.
Instead just call gtk_widget_realize().

If you end up at this commit when bisecting:
There is no bug that made me remove this code, it was purely meant to be
cleanup / dead code removal. I seem to have introduced a new bug or
bisecting wouldn't have let you here. So it seems we should just revert
this commit.

9 years agogtkapplication: _get_app_menu can return NULL
Timm Bäder [Mon, 28 Mar 2016 16:18:20 +0000 (18:18 +0200)]
gtkapplication: _get_app_menu can return NULL

9 years agoUpdated Lithuanian translation
Aurimas Černius [Mon, 28 Mar 2016 14:48:10 +0000 (17:48 +0300)]
Updated Lithuanian translation