1
0
Fork 0
Commit graph

1022 commits

Author SHA1 Message Date
Jasper St. Pierre
aa3643cdde Move window pings to MetaWindow
This will make it possible to use on Wayland as well...
2013-11-21 14:24:04 -05:00
Rui Matos
5ea443eb4b idle-monitor: Fix a GSList leak
https://bugzilla.gnome.org/show_bug.cgi?id=712833
2013-11-21 19:22:25 +01:00
Jasper St. Pierre
6c0e16c482 keybindings: Properly interpret keybindings
We need to compare against the keysym, not the keycode.
2013-11-21 13:09:21 -05:00
Jasper St. Pierre
153d8efcf5 window: Create a backing MetaWindow for unmapped Wayland surfaces
We require a MetaWindow to properly implement some of the requests
for xdg_surface, so add a way to have an unmapped MetaWindow that
we can store properties on, that we later map when the client
attaches a buffer...
2013-11-19 17:48:19 -05:00
Jasper St. Pierre
0824eb7c96 cursor-tracker: Make sure to sync after we change the cursor
So the cursor changes immediately...
2013-11-19 15:43:46 -05:00
Jasper St. Pierre
d945501be6 window: Remove width/height from meta_window_new_for_wayland 2013-11-19 15:37:33 -05:00
Jasper St. Pierre
ca342c4573 window: Remove unused parameter from meta_window_new_shared() 2013-11-19 15:37:33 -05:00
Florian Müllner
3025cb7c48 display: Remove unused variables 2013-11-19 20:12:51 +01:00
Florian Müllner
17f48baf3a display: Tweak code to work around a compiler warning
The compiler is not quite smart enough to figure out that the condition
for setting the "compositor" variable matches a later condition for
accessing it, so express this in a way the compiler will understand.
2013-11-19 20:08:46 +01:00
Florian Müllner
333661a9d8 stack: Drop unused code
Since commit 2b2b2d3191 the code is unused and triggers a
compiler error with -Werror=unused-but-set-variable.
2013-11-19 20:08:46 +01:00
Owen W. Taylor
b9da43b753 Rename meta_window_get_outer_rect() to meta_window_get_frame_rect()
For clarity, rename meta_window_get_outer_rect() to match terminology
we use elsewhere. The old function is left as a deprecated
compatibility wrapper.
2013-11-19 14:04:16 -05:00
Owen W. Taylor
097ee776c7 Stop passing around MetaFrameBorders
Instead of passing around MetaFrameBorders, compute it when we need it.
This also allows us to know that we are using MetaFrameBorders only for windows
with frames (where it is meaningful) and not for frameless windows, which
can have custom borders which we need to interpret differently.

https://bugzilla.gnome.org/show_bug.cgi?id=707194
2013-11-19 14:04:16 -05:00
Owen W. Taylor
a4a8f1f863 MetaFrame: Cache borders
Cache the computed border size so we can fetch the border size at
any time without worrying that we'll be spending too much time in
the theme code (in some cases we might allocate a PangoFontDescription
or do other significant work.)

The main effort here is clearing the cache when various bits of window
state change that could potentially affect the computed borders.

https://bugzilla.gnome.org/show_bug.cgi?id=707194
2013-11-19 14:04:16 -05:00
Owen W. Taylor
f36a627330 Use utility functions to convert between frame and client rectangles
There are extensive places in the code where we convert between the client
rectangle and the frame rectangle. Instead of manually doing it use
new helper functions on MetaWindow and the existing meta_window_get_outer_rect().

This fixes a number of bugs where the computation was being done incorrectly,
most of these bugs are with the recently added custom frame extents, but
some relate to invisible borders or even simply to confusion between the
window and frame rectangle.

Switch the placement code to place the frame rectangle rather
than the client window - this simplifies things considerably.

https://bugzilla.gnome.org/show_bug.cgi?id=707194
2013-11-19 14:04:16 -05:00
Giovanni Campagna
a1087c3f30 constraints: account for decorations when positioning modal dialogs
What we want to achieve is that the dialog is visually centered
on the parent, including the decorations for both, and making sure
that CSD/frame_extents are respected.

https://bugzilla.gnome.org/show_bug.cgi?id=707194
2013-11-19 14:04:16 -05:00
Jasper St. Pierre
aad275b9a2 window: Fix signedness warning 2013-11-19 14:03:09 -05:00
Jasper St. Pierre
f0397eab94 keybindings: Fix warning
keybinding handlers now take a ClutterEvent, not an XIDeviceEvent
2013-11-19 14:02:42 -05:00
Lionel Landwerlin
6867d44573 window: don't ignore resize button release event for move/resize actions
https://bugzilla.gnome.org/show_bug.cgi?id=710251
2013-11-19 13:55:17 -05:00
Jasper St. Pierre
a841fff2ac screen: Laters are not GSources
This warns with the new GLib when we destroy the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=711731
2013-11-19 13:52:56 -05:00
Marc-André Lureau
957513242c xrandr: use "hotplug_mode_update" property
Use the "hotplug_mode_update" connector property indicating that the
screen settings should be updated: get a new preferred mode on hotplug
events to handle dynamic guest resizing (where you resize the host
window and the guest resizes with it).

https://bugzilla.gnome.org/show_bug.cgi?id=711216
2013-11-19 13:50:15 -05:00
Sindhu S
e91268a250 Add keyboard shortcut for Always on Top, bug 704831 2013-11-19 13:48:35 -05:00
Jasper St. Pierre
82cb4e8267 display: Don't focus the no-focus-window when sending WM_TAKE_FOCUS to a globally active window
Clients like on-screen keyboards try not to take focus when the user clicks
on their window by setting the Input hint to false. However, due to GTK+ and
GDK bugs, the public API for setting the Input hint to false don't remove
WM_TAKE_FOCUS from WM_PROTOCOLS, unintentionally putting them into Globally
Active mode.

These clients also expect that since they don't want to take focus, they want
the focus to remain on the existing window. In this case, for clients like
on-screen keyboards, it's so they can send synthesized keyboard events to the
focused window.

https://bugzilla.gnome.org/show_bug.cgi?id=710296
2013-11-19 13:46:34 -05:00
Jasper St. Pierre
2b2b2d3191 stack: Don't take a weak pointer
Since this is stored in an array full of data that will be copied
around, we can't rely on pointer addresses for every item in a stack
not changing.

I don't see any reason that we even have a weak pointer, either.
This code looks safe to me without it.
2013-11-19 13:10:45 -05:00
Jasper St. Pierre
bbbb9ac53c display: Make handle_[x]event private 2013-11-18 21:19:00 -05:00
Jasper St. Pierre
73a9082062 cursor-tracker: Make ensure_wayland_cursor take a ref
This fixes a crash in the last commit because that's what I thought
this would do.

It also simplifies callers drastically...
2013-11-18 19:47:34 -05:00
Jasper St. Pierre
4091f5493d cursor-tracker: Force the grab cursor on grab ops
This makes window moving have a 'window move' cursor, and similar.
2013-11-18 19:34:24 -05:00
Jasper St. Pierre
d96b053c9d cursor-tracker: Use a sync methodology for the cursor image
Rather than have MetaWaylandSeat do all the state management itself,
put the split between the root cursor and the window cursor in the
cursor tracker itself. We'll expand this to add a "grab" cursor in
the next commit, allowing us to force a cursor on grab operations.
2013-11-18 19:25:47 -05:00
Jasper St. Pierre
1f569bef76 Fix dragging on move/resize grabs
We need to use the grab_window for incoming events if we have an active grab.
2013-11-18 18:38:24 -05:00
Jasper St. Pierre
3c7cd1f38c wayland-surface: Use begin_grab_op for move grabs 2013-11-14 21:34:20 -05:00
Jasper St. Pierre
cf181fe109 display: Adapt to new clutter event filter API 2013-11-14 14:34:53 -05:00
Rui Matos
63b9110f93 wayland: Update internal wayland state unconditionally
Things like idle times and the cursor position need to be updated even
if there's a mutter grab in effect.

https://bugzilla.gnome.org/show_bug.cgi?id=712247
2013-11-13 21:55:05 +01:00
Rui Matos
ae44bff0b1 display: Without a grab op let events go through clutter too
We want events to reach clutter no only when there a compositor modal
grab but also when no grab op is in effect.

https://bugzilla.gnome.org/show_bug.cgi?id=712247
2013-11-13 21:55:04 +01:00
Jasper St. Pierre
23ba3e527f wayland: Support alternative focus modes like focus-follows-mouse
Use the existing code for MetaWindow focus-follows-mouse to support this.
2013-11-12 16:53:15 -05:00
Jasper St. Pierre
08df9bf559 display: Use MetaWindow for auto-raise callbacks
This allows us to autoraise Wayland windows... well, except for the
XQueryPointer, but we'll replace that soon.
2013-11-12 16:53:15 -05:00
Jasper St. Pierre
648639fffe display: Invoke Wayland from the Grand Central Station callback 2013-11-12 16:53:15 -05:00
Jasper St. Pierre
875bbec949 wayland: Drop old hack to synthesize motion events
mutter now uses Clutter events for the source of its drag support, so
we don't need to synthesize X11 events anymore.
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
666e5f1f98 keybindings: Port to Clutter 2013-11-12 16:53:14 -05:00
Jasper St. Pierre
e86c53230f display: Move the pointer event handling code to work in terms of Clutter events
There is now a meta_display_handle_event alongside the
meta_display_handle_xevent function which handles events in terms of
Clutter events instead of X events. A Clutter event filter is
registered so that all Clutter events will pass through this function.
The pointer event handling code from the X event version has been moved
into this new function and has been modified to use the details from
the Clutter event instead of the X event. This is a step towards
moving all of the event handling code over to use Clutter events.

Based-heavily-on-a-patch-by: Neil Roberts <neil@linux.intel.com>
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
4ea4658abf display: Split out other event handling as well
This vastly simplifies the code in event_callback and allows us to potentially
take more of this logic and punt it to Wayland-specific backends.
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
58f6ab0a27 display: Split out input event handling
This helps with git's diff code by moving all the giant indentation
changes, letting us know what's going on better when we move to
Clutter for event handling.
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
9c0cc664d1 display: Rename filter_out_event to bypass_gtk
This clarifies the intent of the variable and makes it match bypass_compositor
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
84d26e31f1 display: Move barrier event processing to barrier.c
This puts all the code that's easily ported to Clutter events in one giant
switch statement, as Clutter doesn't translate barrier events.
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
64a848fcb7 display: Add a quick out path to handle_xevent
This makes the code flow more like the scheme we usually use, and allows
us to flatten out the method somewhat.
2013-11-12 16:53:14 -05:00
Neil Roberts
429583ae8b display: Rename meta_display_handle_event to meta_display_handle_xevent
The plan is to make a new version of meta_display_handle_event that
will accept Clutter events instead of X events and then gradually move
over the events to the new function and finally remove the X version.
2013-11-12 16:53:14 -05:00
Giovanni Campagna
93ae868987 wayland: sync the keymap from X to wayland
When X clients change the keyboard map, the also update a property
on the root window. We can notice that and rebuild our data structures
with the new values, as well as inform the wayland clients.

This is a terrible hack, and it's not how we want to implement things
in 3.12, but it's enough to have the same keyboard layout in the
shell, in X clients and in wayland clients in 3.10, until we decide
on the fate of the keyboard g-s-d plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=707446
2013-11-12 16:53:13 -05:00
Jasper St. Pierre
7186841db0 wayland-surface: Remove initial_state
Just put everything in the double buffered state so it all
arrives at the same time; on commit.
2013-11-12 16:53:13 -05:00
Asad Mehmood
cd76313297 monitor: expose min-backlight-step
Expose min-backlight-step so that gnome-settings-daemon can
support backlights with less than 10 steps without mutter
normalizing the brightness back to its original value

https://bugzilla.gnome.org/show_bug.cgi?id=710380
2013-10-21 23:23:54 +02:00
Jonas Ådahl
dc8231c2cf MetaCursorTracker: Set hot spot when cursor buffer set from wl_buffer
When creating MetaCursorReference using a wl_resource, use the provided
hotspot coordinates.

This makes clients such as clickdot work more correctly.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=709593
2013-10-21 21:13:56 +02:00
Bastien Nocera
4d01eb3a23 MonitorConfig: Use new UPower API
The "changed" signal was removed. Use "notify" instead
to track just the lid-is-closed state.

Conflicts:
	configure.ac
2013-10-21 14:01:34 +02:00
Jasper St. Pierre
77046edf21 core: Remove old unused methods 2013-10-16 01:24:35 -04:00
Jasper St. Pierre
488df061c7 display: Fix whitespace / code style with autoraise stuff 2013-10-16 00:33:56 -04:00
Jasper St. Pierre
15e83f0c2f keybindings: Remove unused function 2013-10-15 23:38:04 -04:00
Jasper St. Pierre
a23830fd13 keybindings: Remove unused parameter from process_event 2013-10-15 23:38:04 -04:00
Jasper St. Pierre
c8bf8c17be keybindings: Drop an unnecessary check 2013-10-15 23:38:04 -04:00
Jasper St. Pierre
d82e24981b window: Remove timestamp argument from change_workspace_by_index
It's unused, since we aren't activating the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=709776
2013-10-15 15:42:16 -04:00
Lionel Landwerlin
01b8ffac5d display: don't interrupt grab move/resize without modifiers
The part of code dealing with move/resize grab in display.c is only
responsible of this behavior when triggered with a modifier. So it
shouldn't stop the move/resize behavior triggered from a mouse event
without modifier on the title bar or sides of the window.

https://bugzilla.gnome.org/show_bug.cgi?id=704759
2013-10-15 18:33:25 +01:00
Lionel Landwerlin
1fa56bd7e0 window: don't process unrelated release events
When processing button events related to moving/resizing the window,
only the first button should be considered.

https://bugzilla.gnome.org/show_bug.cgi?id=704759
2013-10-15 18:33:23 +01:00
Jasper St. Pierre
d69553e8f5 stack: Never try to focus a DOCK window 2013-10-09 18:10:39 -04:00
Jasper St. Pierre
a6bf340ff8 display: Deduplicate cursor loading code
Rather than do the cursor -> name translation ourselves in two different
places, use the facilities in libXcursor to do it for us. Put the shared
piece of code in meta-cursor-tracker, and use it for both server-side and
client-side cursor loading.
2013-10-07 13:34:40 -04:00
Jasper St. Pierre
35ef7c95b2 cursor-tracker: Fix the translation for DND_IN_DRAG 2013-10-07 13:09:16 -04:00
Giovanni Campagna
348f3007d9 MetaIdleMonitor: protect the monitor instance while calling destroy notify
The destroy notify for a DBus watch holds a reference to the IdleMonitor,
but the IdleMonitorWatch object doesn't (it knows all watches will
be destroyed before the monitor is, so it doesn't need one). This
means that the DBus watch reference can be the only one keeping
the IdleMonitor alive (expecially true for device idle monitors,
which are only used by g-s-d/cursor), and that means that calling
the destroy notify freezes the monitor (and the next X calls
access garbage).

https://bugzilla.gnome.org/show_bug.cgi?id=708420
2013-09-26 18:57:49 +02:00
Giovanni Campagna
52e2a1226e constraints: don't apply fullscreen workarounds for CSD windows
If you maximize a CSD window on a monitor without struts, it ends
up taking the whole monitor size, but it doesn't mean that the
application wants to fullscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=708718
2013-09-26 16:08:49 +02:00
Giovanni Campagna
58622c0515 MetaCursorTracker: fix compilation in big endian arches
The enum name was wrong.
Patch originally by Dan Horák <dan@danny.cz>

https://bugzilla.gnome.org/show_bug.cgi?id=708813
2013-09-26 13:33:23 +02:00
Giovanni Campagna
cc0b093f7a MonitorConfig: fix hole filling in the laptop lid automatic configuration
Need two passes, because the order we traverse the array is
alphabetical on connector name, not left to right, so we might
see a monitor on the right before we get the offset from disabling
the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=707473
2013-09-16 22:43:07 +02:00
Giovanni Campagna
d25275fa8d MonitorConfig: remove holes generated by disabling the laptop lid
No, holes in the framebuffer are not a good a thing: windows can
get lost there, and the user can get very confused.
Instead, compact the monitors that where previously after.

https://bugzilla.gnome.org/show_bug.cgi?id=707473
2013-09-16 22:43:00 +02:00
Giovanni Campagna
389e04c715 MetaIdleMonitor: fire immediately watches that are already expired
The XSync semantics mandate that alarms already expired will not
fire until the counter is reset and the alarm triggered again, so
clients traditionally called get_idle_time() first to see if they
should install the alarm.
This is inherently racy, as by the time the call is handled by
mutter and the reply received the idle time could be different.
Instead, if we see that the watch would have fired in the past,
fire it immediately.

This is a behavior change, but it's a compatible one, as all legacy
clients are calling get_idle_time() first, and it was perfectly
possible for the idle time counter to trigger the alarm right
after the get_idle_time() call.

https://bugzilla.gnome.org/show_bug.cgi?id=707302
2013-09-16 22:42:22 +02:00
Giovanni Campagna
76e2455d1b wayland: implement support for popup surfaces
Popup surfaces are mapped into override_redirect surfaces
of a DROPDOWN_MENU type, with the addition of a special pointer
grab.

https://bugzilla.gnome.org/show_bug.cgi?id=707863
2013-09-16 14:51:12 +02:00
Giovanni Campagna
81d9797544 wayland: implement transient hints for wayland clients
wl_shell supports a set_transient() map request that is equivalent
to setting WM_TRANSIENT_FOR in X11, so implement that.

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-16 14:48:57 +02:00
Giovanni Campagna
a7eaf43e18 wayland: implement resizing and maximization for wayland clients
To properly resize clients, we need to send them configure events
with the size we computed from the constraint system, and
then check if the new size they ask is compatible with
our expectation.

Note that this does not handle interactive resizing yet, it
merely makes the API calls work for wayland clients.

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-16 14:46:34 +02:00
Giovanni Campagna
514fec7275 display: include wayland clients in the tab list
Make sure that meta_display_list_windows() returns wayland windows
too, by keeping a separate hash for wayland clients.
This fixes a crash in the alt-tab code of gnome-shell.

Reviewed by drago01 in IRC.
2013-09-16 11:29:36 +02:00
Giovanni Campagna
6c1feedbdf Fixup previous MetaCursorTracker commit
I had it fixed locally, then it was lost in a bad rebase.
2013-09-16 10:06:44 +02:00
Giovanni Campagna
2d21fbbd35 wayland: disable extended barriers support
We don't have actual pointer barriers implemented, so this is a
quick workaround to trigger the fallback paths in the shell, for
the hot corner and the message tray.
To be reverted after 3.10
2013-09-16 09:34:27 +02:00
Giovanni Campagna
7baf687499 MetaCursorTracker: add support for loading cursors from the theme
Not only this way we get the right Adwaita cursor as the default
(instead of shipping our own in png format), but we also add
support for all MetaCursors as root cursor (which most important
should allow us to have I-beams in shell entries)

https://bugzilla.gnome.org/show_bug.cgi?id=707573
2013-09-16 09:31:44 +02:00
Giovanni Campagna
a3e44d13d1 wayland: implement HW cursors
Use the DRM API and libgbm to upload cursor buffers to the
appropriate HW plane, saving on GL calls and compositing.

https://bugzilla.gnome.org/show_bug.cgi?id=707573
2013-09-16 09:27:48 +02:00
Giovanni Campagna
65db8efbe8 MonitorManager: add a KMS backend
Using the new Cogl API to actually modeset (because we can't
use the DRM API directly without controlling buffer swap), we
can finally have a KMS monitor backend, which means full display
configuration when running on bare metal.

https://bugzilla.gnome.org/show_bug.cgi?id=706308
2013-09-16 00:34:48 +02:00
Pavel Vasin
67fff237e6 MonitorConfig: fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=708070
2013-09-14 17:07:32 +02:00
Pavel Vasin
0394b4a82b window: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=708070
2013-09-14 17:07:32 +02:00
Pavel Vasin
ff7c85c599 workspace: Add missing chain-up for finalize()
https://bugzilla.gnome.org/show_bug.cgi?id=708070
2013-09-14 17:07:32 +02:00
Giovanni Campagna
fc108d5052 Fixup previous commit
Had a wrong cursor name.
2013-09-12 10:33:26 +02:00
Giovanni Campagna
8c0d38a1a1 display: add support for more cursor types
These cursors are used by gnome-shell, supporting them allows
to reduce GDK usage in the shell.

Also, make meta_screen_set_cursor() public.

https://bugzilla.gnome.org/show_bug.cgi?id=707919
2013-09-12 10:18:20 +02:00
Giovanni Campagna
72ca2b218d wayland: die when gnome-session asks us to
At logout, we want to die when gnome-session tells us. Previously,
we were relying on the X server going down (killed by GDM at the
end of the session), but we can't use that in wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-11 16:01:24 +02:00
Giovanni Campagna
7360aece74 wayland: don't require Clutter backend variables to be set from outside
When running under mutter-launch, we can assume we're running on
bare metal, and set the clutter backend appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-11 16:01:09 +02:00
Giovanni Campagna
5ae52473c9 Don't translate debug logs and warnings
Warnings that are going to the journal should be not translated:
they're not user visible, and translating them would just make
bug reporting harder (as now the developers need to understand
what the warning is saying)

https://bugzilla.gnome.org/show_bug.cgi?id=707897
2013-09-11 16:01:09 +02:00
Giovanni Campagna
7b537d6b8f Fix regression in mutter-wayland translations
Switching meta/util.h to gi18n.h was wrong, mutter is a library
and needs gi18n-lib.h, but that cannot be included from a public
header (since it depends on config.h or command line options),
so split util.h into a public and a private part.

https://bugzilla.gnome.org/show_bug.cgi?id=707897
2013-09-11 16:01:07 +02:00
Giovanni Campagna
4494888b82 Add an option to run as a wayland compositor
Move the option from the mutter binary to libmutter, and
rename from --nested to --wayland.
This allows gnome-shell to drop the set_is_wayland_compositor()
call.

https://bugzilla.gnome.org/show_bug.cgi?id=707897
2013-09-11 16:00:47 +02:00
Giovanni Campagna
5b3340e585 MetaCursorTracker: add methods for setting the cursor visibility
clutter_stage_show_cursor()/hide_cursor() only works in the X11
backend (where someone else is in charge of showing the cursor),
and even then, it has confusing effects when running nested wayland,
so an abstraction layer is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=707474
2013-09-09 18:04:07 +02:00
Giovanni Campagna
6f4f611ba8 MetaCursorTracker: extend with query pointer abilities
We need an abstraction in gnome-shell for XQueryPointer, and
MetaCursorTracker seems a good place for it.

https://bugzilla.gnome.org/show_bug.cgi?id=707474
2013-09-09 18:04:07 +02:00
Giovanni Campagna
9f64f2cf4f Rename META_POWER_SAVE_UNKNOWN to UNSUPPORTED
It conveys more clearly what this value means.

https://bugzilla.gnome.org/show_bug.cgi?id=707649
2013-09-09 15:33:53 +02:00
Giovanni Campagna
2b1eb206d3 Monitor: don't shortcut set_power_save if the value is the same as the old one
We don't get notifications from X11 when the mode is reset, so
our cached value can get stale. To work around that, always forward
requests to the backend (and let it deal with ignoring the change
if wanted)

https://bugzilla.gnome.org/show_bug.cgi?id=707649
2013-09-09 15:33:53 +02:00
Jasper St. Pierre
bf78f067a2 Make sure to always call va_end 2013-09-03 16:10:10 -04:00
Jasper St. Pierre
97eece6607 display: Add some missing breaks
If we somehow get an event with a wrong device ID, we should not
be comparing bad event IDs.
2013-09-03 16:10:10 -04:00
Giovanni Campagna
b53bf0e8c2 Fix distcheck
Missing translation files, missing dists and some -Werrors.
2013-09-03 17:00:18 +02:00
Giovanni Campagna
a26ded47d9 Add a private gtk-mutter protocol
Add a new interface, gtk_shell, than can be used by gtk to
retrieve a surface extension called gtk_surface, which will be
used to communicate with mutter all the GTK extensions to EWMH

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

Add support for GTK application menus

To do so, we need to be able to set surface state before creating
the MetaWindow, so we introduce MetaWaylandSurfaceInitialState as
a staging area.
The gtk-shell-surface implementation would either write to the
initial state, or directly to the window.

At the same, implement set_title and set_class too, because it's
easy enough.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
806d5939e3 wayland: split headers and distribute structure definitions
Instead of having all structures in one huge headers, move them
in the appropriate place, and create one header for surface state.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
590cf4e832 MonitorXrandr: check the event timestamps before reconfiguring
If, checking the event timestamps, we see that a new configuration
was explicitly requested by an another XRandR client, don't proceed to
apply the intended configuration again, even if looking at the
EDIDs it appears that the outputs changed.
This works around some buggy Xorg drivers (qxl, vbox) that generate
a new serial number everytime the user resizes the host window.

https://bugzilla.gnome.org/show_bug.cgi?id=706735
2013-09-02 17:36:03 +02:00
Cosimo Cecchi
22ca820c44 idle-monitor: fix event propagation to devices
device_id_max is set to the device_id in ensure_device_monitor(), but we
will loop only to (device_id_max - 1) when propagating the sync XEvent
down, missing the device correspondng to device_id_max.

https://bugzilla.gnome.org/show_bug.cgi?id=707250
2013-09-01 17:51:10 -07:00
Giovanni Campagna
e311cef013 Add keybindings for switching VTs
Once mutter is started from weston-launch on its own VT, there is
no way to change VT again (for example to actually start an application),
because the keyboard is put in raw mode.
So introduce some keybindings mimicking the standard X ones (Ctrl+Alt+Fn)
that switch the VT manually when activated.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
e72f81c24f wayland: add TTY and DRM master management
Now that we have a setuid launcher binary, we can make use of
using a private protocol through the socket we're passed at startup.

We also use the new hook in clutter-evdev to ask mutter-launch for
the FDs of the input devices we need, and we emulate the old X
DRM lock with a nested GMainContext without sources.

In the future, mutter-launch will be replaced with the new logind
API currently in development.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Jasper St. Pierre
2d35e07fae wayland: Add support for set_opaque_region / set_input_region
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:52 -04:00
Jasper St. Pierre
f506e090ea monitor: Use a more sane dummy configuration for nested mode 2013-08-29 15:26:49 -04:00