Commit Graph

22557 Commits

Author SHA1 Message Date
Jonas Ådahl
dfc4d0d523 clutter/stage-view: Allow scales down to 0.5
There is support for scaling logical monitors down to 0.5, so don't let
ClutterStageView stand in the way for that.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
5f2bb43061 backend/native: Don't double-scale pointer motions on scaled monitors
We manually scaled pointer motions when they travel over a scaled
monitor. When a stage view of a monitor is also scaled, in practice this
meant we scaled twice. Avoid this by only manually scaling the pointer
motion when stage views are not scaled.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
fef81cd628 clutter/stage: Fix capturing scaled views
Make clutter_stage_capture() work if views are scaled. This needs
adaptations on the using side to deal with the cairo surface device
scale that is used to communicate the scale used when capturing.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Marco Trevisan (Treviño)
3e8d0204bd monitor: Dynamically calculate supported scales per resolution
When using logical sized monitors we are allowed to use fractional scaling
but only if the resulting scaled logical monitor size is in integer form.
So, in order to get this, we allow to scale the monitor to up to
8 fractional values per integer, doing some computation in order to
fetch the nearest values which are closer to the scaling factors we can
permit.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
b2a530b326 DisplayConfig: Make supported scales per mode
This changes the API to pass supported scales per mode instead of
providing a global list. This allows for more flexible scaling
scenarious, where a scale compatible with one mode can still be made
available even though another mode is incompatible.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
5ab116a87f tests: Add tests for fractional scaling
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
10b0351a59 Add support for rudimentary fractional scaling
When the logical layout mode is used, allow configuring the scaling to
be non-integer. Supported scales are so far hard coded to include at
most 1, 1.5 and 2, and scales that doesn't result in non-fractional
logical monitor sizes are discarded.

Wayland outputs are set to have scale ceil(actual_scale) meaning well
behaving Wayland clients will provide buffers with buffer scale 2, thus
being scaled down to the fractional scale.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
b64c69e4bc logical-monitor: Make scale a float
To support fractional scaling, the logical monitor scale must be stored
as a float. No other functional changes is part of this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
c2e49f1bb5 clutter: Change stage view scale to be float
To support fractional scaling, change the stage view scale to be a
float instead of an int. Also change the places where it is retrieved
and used when scaling things.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
a3d63d0ac0 clutter/stage-view: Add G_PARAM_CONSTRUCT flag to properties
Otherwise those properties won't be set when ->construct is called.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
88cae8bd3d settings: Manage our own font DPI
Previously gnome-shell listened on the Xft Xsettings via GTK+s
GtkSettings to get the font DPI setting. The Xsetting might not
be what we want, and we should not rely on Xsettings when we don't need
to, so lets manage it ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Carlos Garnacho
a6ec2b1d42 backends: Set error when opening /sys file fails
The caller in clutter really expects an error if fd==-1, so make
sure we set one here. Otherwise we get a nice crash in addition to
the failure to open the /sys file. Also, retry on EINTR.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-14 12:28:32 +02:00
Jason Gerecke
ca600973ba wayland: Store and retrieve implicit grab information for tablet tools
Window moving and resizing depends on the `meta_wayland_seat_get_grab_info`
function succeeding. At the moment, tablet tools do not generate implicit
grabs like the pointer and touch. This commit adds the necessary elements
to track implicit grabs and retrieve their information.

https://bugzilla.gnome.org/show_bug.cgi?id=777333
2017-07-13 19:10:52 +02:00
Carlos Garnacho
4b8dd51c4d backends: Fix dangling callback not being disconnected
This fixes possible crashes if configuration is changed on a device that
was added and then removed.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-13 19:05:44 +02:00
Carlos Garnacho
56c468a2ef clutter/x11: Set master device on pad button events
These should be set one, but just set the master to be the slave
pad device. We are passively grabbing the pad device, so this is
consistent with active grabs on slave devices. Besides, pads are
paired to the VCP, which is not really truthful.

Fixes inoffensive warnings when trying to check whether motion
throttling applies for these events.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-13 19:05:44 +02:00
Carlos Garnacho
10b30eaba5 backend: Set mapping-mode on X11 pen/eraser devices
And use it in the generic code for the checks about whether mapping to
an specific display applies or not.

https://bugzilla.gnome.org/show_bug.cgi?id=784402
2017-07-12 23:43:23 +02:00
Carlos Garnacho
328e3f8f4f clutter: Extend mapping-mode to pen/eraser devices
This just used to apply to CLUTTER_TABLET_DEVICE on wayland, allow using
it on pen/eraser devices (as X11 sees tablets) for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=784402
2017-07-12 23:43:23 +02:00
Jonas Ådahl
7bd69f0b32 window: Don't crash when moving across non-adjecent logical monitors
When moving a window between two non-adjecent logical monitors, don't
try to tile a window when the window position is outside of any logical
monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=783630
2017-07-12 12:30:54 +08:00
Jonas Ådahl
538e402d71 wayland: Random whitespace fixes
https://bugzilla.gnome.org/show_bug.cgi?id=784080
2017-07-12 12:08:57 +08:00
Jonas Ådahl
9af6ec78ab wayland: Add support for wl_surface.damage_buffer
Implements support for the wl_surface.damage_buffer request, which
damages the buffer using buffer coordinate space.

https://bugzilla.gnome.org/show_bug.cgi?id=784080
2017-07-12 12:08:57 +08:00
Emmanuele Bassi
41e22ab592 Use newer glib-genmarshal option
When building against a glib-genmarshal from GLib 2.54 we can use the
`--prototypes` command line argument to generate the prototypes for the
marshallers in the C source, and avoid a missing-prototypes compiler
warning.
2017-07-11 11:30:08 +01:00
Jonas Ådahl
1303c626b1 renderer-native: Fix compilation when EGLDevice renderer not enabled
When --enable-egl-device is not passed to ./configure, the
egl_device_error will not be declared; don't try to free it when its not
declared.
2017-07-07 17:59:20 +08:00
Miguel A. Vico
7eea82d3d7 MetaRendererNative: Give EGLDevice backend priority over GBM
With GLVND, whenever we have both Mesa's and NVIDIA's drives installed
in the system, initializing the GBM backend will always succeed,
regardless of what GPU you have on your system.

This is due to GBM's software rendering fallback.

It seems better to initialize the EGLDevice backend first, which will
fail to find a device match when given a non-NVIDIA GPU.

https://bugzilla.gnome.org/show_bug.cgi?id=784272
2017-07-07 11:55:18 +08:00
Florian Müllner
80e5955918 screen: Remove stray assert
When the number of (static) workspaces decreases, we relocate windows
from extra workspaces before removing them. As removing a non-empty
workspace is not allowed, we assert that it doesn't contain any windows
before removing it.

However that assert is

 - pointless, because meta_workspace_remove() already asserts that
   the workspace is empty

 - wrong, because even empty workspaces contain windows that are set
   to show on all workspaces

Simply drop the assert to avoid a crash when trying to remove a workspace
while on-all-workspaces windows are present.

https://bugzilla.gnome.org/show_bug.cgi?id=784223
2017-07-05 16:31:18 +02:00
Carlos Garnacho
ce989976fa backends: Apply tablet settings on all tablet device types during startup
This skipped the device types that are in use on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=782027
2017-07-03 13:57:35 +02:00
Carlos Garnacho
529e5adb2e wayland: Base tablet tool coordinates on the current event
Instead of the last device position. This was copied a little bit too
straight from MetaWaylandPointer.

https://bugzilla.gnome.org/show_bug.cgi?id=783535
2017-07-03 13:56:21 +02:00
Carlos Garnacho
a70ae50ca9 clutter: Do not throttle motion events on tablet tools
Events from tablets must not be filtered out, as the event coalescing
results in precision loss.

https://bugzilla.gnome.org/show_bug.cgi?id=783535
2017-07-03 13:56:21 +02:00
Jason Gerecke
74882b2502 backends/x11: Account for non-zero device origin when setting tablet area
Wacom's display tablets typically do not have (0,0) coincident with the top
left corner of the screen. This "outbound" area must be taken into account
when setting the area or else an unexpected offset of the pointer will
occur.

https://bugzilla.gnome.org/show_bug.cgi?id=784009
2017-07-03 13:49:14 +02:00
Florian Müllner
5f49bda591 window: Include window itself in transient loop check
While it doesn't make sense to set a window as transient to
itself, our existing check whether making a window transient
doesn't cover it, so it's still possible to create an infinite
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=783502
2017-06-22 08:49:40 +02:00
Florian Müllner
edab8c3a4c Bump version to 3.25.3
Update NEWS.
2017-06-21 21:30:33 +02:00
Silvère Latchurié
8153c5b544 compositor: Handle EXIF orientation for backgrounds
Apply the embedded EXIF orientation when the background is loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=783125
2017-06-21 20:23:09 +02:00
Jason Gerecke
a4cef8586c backends/native: Interpret tablet padding as being input-centric
It is possible to interpret the ammount of padding provided to the
*_set_tablet_area functions in two different and incompatible ways. The X11
backend effectively treats them as being input-centric (i.e., the padding
defines the size of the "dead zone" on the tablet) while the native backend
has an output-centric viewpoint (i.e., the padding defines the size of the
"dead zone" on the display) viewpoint. This difference in opinion causes the
cursor offset to change when switching between Xorg and a Wayland sessions.

The calibration utility within g-c-c does its calculations with an input-
centric viewpoint, so this patch modifies the native backend to work
correctly with these values. To change viewpoints, we can simply invert
the scale and negate the offset. It should be noted that this function
also forgot to apply scaling to the offsets (as required by the matrix
transform done by libinput) which would have further compounded the
cursor offset issue under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=784009
2017-06-20 23:42:38 +02:00
Carlos Garnacho
9b9bb9cf86 backends: Fix output cycling in non display-attached tablets
It would only allow to alternate between the logical monitors, we actually
want to return NULL here so it can cycle to the whole span of monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=782032
2017-06-20 22:02:04 +02:00
Carlos Garnacho
dc5b2e396c backends: Fix typo
Instead of checking all MetaMonitors in the monitor manager, we want to
look (as the function name says) in the MetaMonitors contained in the
given logical monitor.

Otherwise, it will return TRUE for every logical monitor, given we are
querying for an existing EDID.

https://bugzilla.gnome.org/show_bug.cgi?id=782032
2017-06-20 22:02:04 +02:00
Carlos Garnacho
d23275bc76 backends/x11: Handle left-handed mode on pen/eraser devices correctly
Due to the pen/eraser device separation in X11, CLUTTER_TABLET_DEVICE does
not apply there, this device type is only used in native/evdev. Checking
for CLUTTER_PEN/ERASER_DEVICE makes the left-handed mode correctly applied
on tablets.

https://bugzilla.gnome.org/show_bug.cgi?id=782027
2017-06-20 22:02:04 +02:00
Carlos Garnacho
48e820235e backends/x11: Fix c&p issue in tablet area calculation
instead of filling in the last array value, it overwrote the previous one.

https://bugzilla.gnome.org/show_bug.cgi?id=781703
2017-06-20 22:02:04 +02:00
Daniel Mustieles
2d3c56b089 Updated Spanish translation 2017-06-19 17:37:23 +02:00
Khaled Hosny
85b2e59e7e Update Arabic translation 2017-06-18 21:28:17 +02:00
Benoit Gschwind
e1950ed76f texture-tower: Fix usage of G_*_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=783505
2017-06-14 11:15:04 +02:00
Christian Kellner
7938f41c11 monitor: invert logic for 4k TV scaling
For devices connected via HDMI (supposedly TVs) we want have a
scale factor of 1 if we are *below* the smallest 4k resolution
width (not equal or above) and do the scaling factor computation
if we are above the limit. This check was apparently wrongly
ported from gnome-settings-daemon.

Based of a patch by Caolan McNamara <caolanm@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=777347
2017-06-07 14:03:03 +02:00
Kukuh Syafaat
9f41bdb086 Update Indonesian translation 2017-06-07 08:01:27 +00:00
mitchmindtree
8457e2bad6 wayland/pointer: Check for subsurfaces when grabbing
Previously, the function only returned `TRUE` if the given surface was
equal to the given pointer's focused surface. This changes the behaviour
to also return `TRUE` if any of the given surface's subsurfaces are
equal to the pointer's focused surface.

https://bugzilla.gnome.org/show_bug.cgi?id=781811.
2017-06-07 09:47:29 +08:00
Florian Müllner
4d7329a7e2 window: Include STATE_CHANGED flag when tiling
For size change animations, plugins rely on the size change effect being
followed by size changed signal (or effects being kill altogether).
However unless the move_resize operation included the STATE_CHANGED flag,
the size changed event emitted when the compositor syncs the window
geometry only happens when the operation resulted in an actual change.

To avoid animations getting stuck in that case, make sure to include the
flag when tiling a window.

https://bugzilla.gnome.org/show_bug.cgi?id=783293
2017-06-06 15:35:06 +02:00
Jonas Ådahl
b4120a75e0 wayland/pointer: Track lifetime of current surface
Clear the pointer->current when the surface is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=783113
2017-06-01 12:46:32 +08:00
Jonas Ådahl
b19e4592df wayland/pointer: Use glib signals tracking focus surface
Use the "destroy" MetaWaylandSurface signal instead of the wl_resource
destroy signal for tracking the lifetime of the surface with pointer
focus.

As unsetting the focus may have side effects due to handlers of the
"focus-surface-changed" signal, connect the signal after the default
handler to make sure other clean up facilities have the chance deal with
the surface destruction before we try to unset the focus.

https://bugzilla.gnome.org/show_bug.cgi?id=783113
2017-06-01 12:46:32 +08:00
Ikey Doherty
e9c9ee844c backends/x11: Ensure reply is initialised to NULL 2017-05-31 19:15:39 -04:00
Bastien Nocera
f5f0ff0a2f monitor-manager: Fix crash when UPower is not available
Don't access the upower client if it doesn't exist

https://bugzilla.gnome.org/show_bug.cgi?id=780407
2017-05-31 16:11:24 +02:00
Christian Kellner
68dacb531b keybindings: handle multiple keycodes for keysym
A single keysym can resolve to multiple keycodes. Instead of only using
the first one and ignoring the others, we store all codes in
MetaResolvedKeyCombo and then handle all of them in keybinding
resolution. If we already have bound a keycode for a keybinding with a
specific keysym then this can get overwritten by a new keybinding with a
different keysym that resolves to the same keycode. Now that we resolve
and bind all keycodes for a keysym this might happen more often; in that
case warn but still overwrite, but only for the first keycode for each
keysym. If a secondary (i.e. all non-first keycodes) is already indexed
we just ignore that; this should resemble the old behavior  where we
only took the first keycode for any keysym as close as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=781223
2017-05-30 15:23:00 +02:00
Tim Lunn
dd82f4afcd configure: require glib 2.53.2
This is required for the new glib-genmarshal as introduced in
 commit 9131f26cae

https://bugzilla.gnome.org/show_bug.cgi?id=783161
2017-05-28 11:21:42 +10:00
Fabio Tomat
fc010e0edc Update Friulian translation 2017-05-27 20:55:46 +00:00