Commit Graph

8685 Commits

Author SHA1 Message Date
Bastien Nocera
996aeaef41 backends: Fix cut'n'paste error in click method setting
GDesktopTouchpadScrollMethod was used instead of GDesktopTouchpadClickMethod
which became visible now that the former has been removed from
gsettings-desktop-schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=759304
2015-12-15 14:41:51 +01:00
Bastien Nocera
a27b2597b9 backends: Force 2-finger scroll by default if available
When the touchpad is two-finger scrolling capable, always enable it.

When the touchpad only supports edge scrolling (usually older devices, and
usually smaller devices), allow disabling the edge scrolling.

This requires a newer gsettings-desktop-schemas as the scroll-method key
was removed, and the edge-scroll-enabled key added.

https://bugzilla.gnome.org/show_bug.cgi?id=759304
2015-12-15 14:38:23 +01:00
Lionel Landwerlin
0e8ca1a042 default-plugin: port to non deprecated API
https://bugzilla.gnome.org/show_bug.cgi?id=759374
2015-12-15 08:39:57 +00:00
Jasper St. Pierre
f5f26c9cff Update .gitignore 2015-12-14 15:17:40 -08:00
Jasper St. Pierre
91ac69382d wayland: Fix up touch coordinates on HiDPI 2015-12-14 14:52:23 -08:00
Jasper St. Pierre
8cc345fcf5 window: Allow minimizing windows which don't advertise support for it
Wine removes the minimize func from its Motif hints on full-screen
windows, because, as the Win32 API literally says, the minimize button
is indeed not visible on full-screen windows.

Given that this code was added to prevent minimizing a panel by
accident, I don't necessarily think that it's relevant anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=758186
2015-12-05 10:46:21 -08:00
Carlos Garnacho
96b5042dda core: Unset "pointer emulating" sequence lazily
Unsetting it in meta_display_handle_event() will make the pointer
emulation checks fail on TOUCH_END event handlers across clutter
actors, the sequence should still be considered as pointer emulating
at that time.

As we don't have a way to hook this post clutter event handling,
instead unset/reset it lazily on the next pointer emulating TOUCH_BEGIN
event, the checks would already fail on other sequences, even if the
pointer emulating touch ended earlier. The only extra thing we need
to take care about is sequence collision, at which point it's safe to
just unset the stored sequence if its new incarnation isn't flagged/
deemed as pointer emulating.

https://bugzilla.gnome.org/show_bug.cgi?id=756754
2015-12-04 11:47:01 +01:00
Jonas Ådahl
428c687b5a wayland: Clean up wl_pointer_send_enter/leave code
Be consistent and always use a helper, and fix the naming so
broadcast means to actually broadcast.

https://bugzilla.gnome.org/show_bug.cgi?id=755503
2015-12-03 16:11:37 +08:00
Rui Matos
82bdd1e353 monitor-manager: Fix the max potential number of logical monitors
The max potential number of logical monitors (i.e. MetaMonitorInfos)
is the number of CRTCs, not the number of outputs.

In cases where we have more enabled CRTCs than connected outputs we
would end up appending more MetaMonitorInfos to the GArray than the
size it was initialized with which means the array would get
re-allocated rendering invalid some MetaCRTC->logical_monitor pointers
assigned previously and thus ending in crashes later on.

https://bugzilla.gnome.org/show_bug.cgi?id=751638
2015-11-29 19:15:37 +01:00
Marek Chalupa
4bebc5e5fa cursor-renderer: do not update cursor if it is out of monitor
if the cursor coordinates are out of monitor, just don't render the
cursor

https://bugzilla.gnome.org/show_bug.cgi?id=756698
2015-11-29 19:15:23 +01:00
Jonas Ådahl
be5643cee7 wayland: Use xdg shell protocol from wayland-protocols
Use the xdg_shell XML file installed by wayland-protocols instead of
our own copy. This protocol has yet to go through any unstable naming,
but since we had an outdated (though wire compatible) version, some
minor changes were needed.

https://bugzilla.gnome.org/show_bug.cgi?id=758633
2015-11-26 16:55:35 +08:00
Jonas Ådahl
2ee1c5fa61 wayland: Use pointer gestures protocol from wayand-protocols
Remove our own copy of the pointer gestures protocol, and us the one
installed by wayland-protocols. This also means the new fixed unstable
naming conventions are used for the new version of the protocol, which
is reflected in the change. No functional changes were made, it is only
a rename.

https://bugzilla.gnome.org/show_bug.cgi?id=758633
2015-11-26 16:55:35 +08:00
Carlos Garnacho
c625d2ee9d core: Make meta_window_handle_ungrabbed_event() touch-aware
This fixes the effects of this function on touchscreens in wayland
(most notably, window raising & focusing).
2015-11-25 18:00:36 +01:00
Carlos Garnacho
3078f70f90 wayland: Fetch keyboard event codes from ClutterEvents
When running as a native compositor, we can just do that. However, the
previous code must stay for whenever it's run as a X11 client.

https://bugzilla.gnome.org/show_bug.cgi?id=758239
2015-11-25 18:00:36 +01:00
Carlos Garnacho
7309b20c25 wayland: Fetch pointer button event codes from the ClutterEvent
When running as a native compositor, we can just do that. However, the
previous code must stay for whenever it's run as a X11 client.

Additionally, the fallback switch{} that transforms clutter 1-indexed
buttons into input.h event codes had to be adapted to the change introduced
in clutter commit 83b738c0e, where the 4-7 button range is kept clear for
compatibility with the X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=758239
2015-11-25 17:56:51 +01:00
Daniel Stone
c16a5ec1cf KMS/Wayland: Correct refresh rate units
On the wire, Wayland specifies the refresh rate in milliHz. Mutter sends
the refresh rate in Hz, which confuses clients, e.g. weston-info:
interface: 'wl_output', version: 2, name: 4
	mode:
		width: 2560 px, height: 1440 px, refresh: 0 Hz,
		flags: current preferred
interface: 'wl_output', version: 2, name: 5
	mode:
		width: 3200 px, height: 1800 px, refresh: 0 Hz,
		flags: current preferred

and xrandr:
XWAYLAND0 connected 2560x1440+3200+0 600mm x 340mm
   2560x1440@0.1Hz   0.05*+
XWAYLAND1 connected 3200x1800+0+0 290mm x 170mm
   3200x1800@0.1Hz   0.03*+

Export the refresh rate in the correct units. For improved precision,
perform the KMS intermediate calculations in milliHz as well, and
account for interlaced/doublescan modes.

This is also consistent with what GTK+ expects:
      timings->refresh_interval = 16667; /* default to 1/60th of a second */

      /* We pick a random output out of the outputs that the window touches
       * The rate here is in milli-hertz */
      int refresh_rate = _gdk_wayland_screen_get_output_refresh_rate (wayland_display->screen,
                                                                      impl->outputs->data);
      if (refresh_rate != 0)
        timings->refresh_interval = G_GINT64_CONSTANT(1000000000) / refresh_rate;

Where the 'refresh_rate' given is exactly what's come off the wire.
1000000000/60000 comes out as 16667, whereas divided by 60 is ...
substantially less.

https://bugzilla.gnome.org/show_bug.cgi?id=758653
2015-11-25 15:35:25 +01:00
Florian Müllner
f3e1964362 Bump version to 3.19.2
Update NEWS.
2015-11-25 00:34:28 +01:00
Florian Müllner
9b9083180f theme: Shut up some GTK+ warnings
GTK+ started to complain when the state parameter passed to any
gtk_style_context_get*() method mismatches the context's current
state a while ago.
2015-11-24 23:46:14 +01:00
Rui Matos
7606f79a1e x11/window-props: Initialize bypass compositor hint
If a client only ever sets the hint on window creation we'd never pick
the value. Also, include override redirect windows since the hint is
relevant to them too.

https://bugzilla.gnome.org/show_bug.cgi?id=758544
2015-11-23 19:54:48 +01:00
Marek Chalupa
99c0b82b15 window: do not force placing window if it is not mapped
When managing window, we queue showing the window.
Under wayland, if we commit surface quickly enough,
the showing is unqueued and commit procedure takes care
of mapping and placing the window. In the oposite case,
queue is processed before client sets all we need and
then we have wrong size of window, which leads to broken placement.
Therefore force placement in queue only if the window should already
be mapped. If it is not mapped, we don't care where it is anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=751887
2015-11-16 10:21:09 +08:00
Alban Browaeys
ca7c1d5e02 launcher: Fix drm device detection for non pci devices
On Odroid U2 (exynos4412) the drm device is not bound to pci.
Open the detection to platform device of the drm subsystem, exclusive of
control devices.

https://bugzilla.gnome.org/show_bug.cgi?id=754911
2015-11-12 14:09:02 -05:00
Florian Müllner
4a770907c1 theme: Update style hierarchy (again)
GTK+ has updated some more widgets to use element names, so do some
catching up again ...
2015-11-12 01:04:24 +01:00
Piotr Drąg
049f1556dc Updated POTFILES.skip 2015-11-10 01:18:27 +01:00
Ray Strode
7b20d151ed data: drop mutter-wayland.desktop
It's not needed since we can automatically figure things out
based on logind.

https://bugzilla.gnome.org/show_bug.cgi?id=741666
2015-11-09 10:25:40 -05:00
Ray Strode
8ec0c99ff4 core: start as wayland display server when XDG_SESSION_TYPE=wayland
This commit gets rid of the need for --display-server and
--wayland when mutter detects that a wayland session is registered.

https://bugzilla.gnome.org/show_bug.cgi?id=741666
2015-11-09 10:25:11 -05:00
Ray Strode
cf3ee327a0 meta-backend: include stdlib.h
Otherwise build fails with missing declaration
warning for exit().
2015-11-06 23:10:41 -05:00
Owen W. Taylor
3ec3cc248d Exit, not abort, when we fail to initialize Clutter
Failing to initialize Clutter isn't something it's useful to report
into automatic bug tracking systems or get a backtrace for - in fact,
the most common case is that DISPLAY is unset or points to a
non-existent X server. So simply exit rather than calling g_error().

https://bugzilla.gnome.org/show_bug.cgi?id=757311
2015-11-06 17:03:59 -05:00
Owen W. Taylor
7fb3ecc12c MetaLauncher: Don't g_error() on failure
g_error() is the wrong thing to do when, for example, we can't find the
DRM device, since Mutter should just fail to start rather than reporting
a bug into automatic bug tracking systems. Rather than trying to decipher
which errors are "expected" and which not, just make all failure paths
in meta_launcher_new() return a GError out to the caller - which we make
exit(1).

https://bugzilla.gnome.org/show_bug.cgi?id=757311
2015-11-06 17:03:59 -05:00
Ray Strode
4c9af7267d Revert "Force cursor update after applying configuration"
This reverts commit 33150569cd.

This was a stow-a-away sitting in my local tree.
2015-11-06 16:24:34 -05:00
Ray Strode
db4355ba1e core: move backend setting to helper function
This paves the way for making the backend setting
be more automatic.

https://bugzilla.gnome.org/show_bug.cgi?id=741666
2015-11-06 16:22:40 -05:00
Ray Strode
33150569cd Force cursor update after applying configuration
The qxl kms driver has a bug where the cursor gets hidden
implicitly after a drmModeSetCrtc call.

This commit works around the bug by forcing a drmModeSetCursor2
call after the drmModeSetCrtc calls.

This is pretty hacky and won't ever go upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=746078
2015-11-06 14:26:46 -05:00
Rui Matos
af2a13ded4 monitor-manager-xrandr: Skip outputs with no crtcs
Outputs with no crtcs shouldn't happen, but if it does we should
ignore them, instead of possibly crashing later.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
2015-10-30 17:47:00 +01:00
Rui Matos
8b200de35a monitor-manager-xrandr: Skip outputs with no modes
If we can't find any valid modes for an output we need to unwind and
skip the output because trying to use a modeless output later will
crash us.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
2015-10-30 17:47:00 +01:00
Rui Matos
57ae203aab Revert "monitor-manager-xrandr: Ignore outputs without modes"
This reverts commit 86a913d37a. It
introduced a memory leak, so we'll go for a cleaner approach.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
2015-10-30 17:47:00 +01:00
Rui Matos
bff75b64be monitor-manager: Expose a few helpers to clear structs
These are useful for child classes to unwind cleanly when constructing
their structures.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
2015-10-30 17:47:00 +01:00
Florian Müllner
8899b9da01 Bump version to 3.19.1
Update NEWS.
2015-10-29 14:56:06 +01:00
Rui Matos
76e816a14f window: Properly update window->monitor for the desktop window
We don't want to move the desktop window but we still need to update
window->monitor or otherwise we'll be left with a pointer to invalid
memory.

https://bugzilla.gnome.org/show_bug.cgi?id=757148
2015-10-27 14:33:34 +01:00
Florian Müllner
2750db2a89 theme: Set object-name on style contexts
The default theme started to use them in GTK+ commit 371f50, so
we need to update the style contexts to keep matching the style
of client-side decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=757101
2015-10-27 09:42:49 +01:00
Rui Matos
86a913d37a monitor-manager-xrandr: Ignore outputs without modes
In some cases we get outputs without any valid mode. We need to ignore
them or we'll crash later.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
2015-10-23 14:13:26 +02:00
Alberts Muktupāvels
2857fdbdb8 backend-x11: Ensure the Xkb group index remains properly set
Ubuntu ships a patch in the X server that makes the group switch
keybindings only work on key release, i.e. the X server internal group
locking happens on key release which means that mutter gets the
XKB_KEY_ISO_Next_Group key press event, does its XLockGroup() call
with a new index and then, on key release, the X server moves the
index further again.

We can work around this without affecting our behavior in unpatched X
servers by doing a XLockGroup() every time we're notified of the
locked group changing if it doesn't match what we requested.

https://bugzilla.gnome.org/show_bug.cgi?id=756543
2015-10-23 14:13:26 +02:00
Daniel Șerbănescu
69a7d5ff02 Updated Romanian Translation 2015-10-22 19:15:59 +02:00
Giovanni Campagna
a4f763ac3b wayland-surface: disconnect signals on destroy
Otherwise signal handlers will be called on garbage

https://bugzilla.gnome.org/show_bug.cgi?id=756548
2015-10-19 17:21:59 -07:00
Giovanni Campagna
f2afa7aa6c mutter: don't show the resize popup for 2 x 2 size increments
In a HiDPI environment, all gtk+ apps will report a 2 x 2 size
increment to avoid odd size. But that does not mean they are
resizing in cells like terminals, so they resize popup should
not be shown.

Ideally, we should ignore <= scale x scale increments, but in
practice scale is 1 or 2, and even in a lo-dpi setting a 2 x 2
increment makes little sense so let's keep the patch simple.

https://bugzilla.gnome.org/show_bug.cgi?id=746420
2015-10-19 17:21:59 -07:00
Carlos Garnacho
a5d2555196 wayland: Make it possible to trigger popups through pointer/keyboard/touch
Right now we just check the pointer serial, so the popup will be
immediately dismissed if the client passes a serial corresponding to
another input device.

Abstract this a bit further and add a meta_wayland_seat_can_popup() call
that will check the serial all input devices. This makes it possible to
trigger menus through touch or keyboard devices.

https://bugzilla.gnome.org/show_bug.cgi?id=756296
2015-10-17 18:52:52 +02:00
Carlos Garnacho
dd5a4ecdf9 wayland: Store key press/release serials on MetaWaylandKeyboard
https://bugzilla.gnome.org/show_bug.cgi?id=756296
2015-10-17 18:52:15 +02:00
Rui Matos
43a1d43f2b monitor-manager-xrandr: Be more robust when reading XRROutputInfos
We might get modes in XRROutputInfos that aren't in the
XRRScreenResources we get earlier. This always seems to be transient,
i.e. when it happens, the X server will usually send us a follow up
RRScreenChangeNotify where we then get a "stable" view of the world
again.

In any case, when these glitches happen, we end up with NULL pointers
in the MetaOutput->modes array which makes us crash later on. This
patch ensures that doesn't happen.

https://bugzilla.gnome.org/show_bug.cgi?id=756660
2015-10-16 13:57:26 +02:00
Jonas Ådahl
d6d377a447 wayland: Set the xdg_popup pointer even when not mapping
If we immediately dismiss the popup, we still need to set the
surface->xdg_popup pointer field in order for the destructor to
properly clean up the state. Not doing this may cause a crash if the
xdg_popup resource that was immediately dismissed is destoryed after
wl_surface during client destruction.

https://bugzilla.gnome.org/show_bug.cgi?id=756675
2015-10-16 11:31:51 +08:00
Florian Müllner
ffd95c2ad5 theme: Complete removal of "fringe" titlebar button support
We have been ignoring those buttons since 3.16 after they had been
broken in the default theme for a couple of versions. As nobody
appears to miss them, it's time to remove them for good.
2015-10-16 04:13:14 +02:00
Florian Müllner
72be89dfb9 theme: Reset button style state when done drawing
We use a single style context to draw titlebar buttons, updating
its state according to each button's prelight state as necessary.
This assumes that the original state is neither ACTIVE nor PRELIGHT,
which means we need to reset the state after drawing to avoid
propagating the state of the last-drawn button.
2015-10-16 04:04:34 +02:00
Florian Müllner
2feeb57dee iconcache: Mark surfaces as dirty after changing data
This is required to tell cairo to update its cached areas.
2015-10-16 04:04:31 +02:00