1
0
Fork 0
Commit graph

1724 commits

Author SHA1 Message Date
Adel Gadllah
493c0f71d2 prefs: Update cursor size based on xsettings
We shouldn't scale the cursor size in mutter we g-s-d exports
the correct size on hidpi so use gtk-cursor-theme-size.

This way we also catch changes on resolution updates.

https://bugzilla.gnome.org/show_bug.cgi?id=729337
2014-09-14 10:21:46 +02:00
Adel Gadllah
ab40dfdd51 Revert "prefs: Scale the root window cursor by the scale factor"
This reverts commit 4fe66ce0a9.

This is wrong ... we should not scale the cursor size but read
the cursor xsettings that gets exported by gsd. Also this won't update on
resolution changes.

https://bugzilla.gnome.org/show_bug.cgi?id=729337
2014-09-14 10:21:46 +02:00
Jasper St. Pierre
a676249c0c stack-tracker: Fix an off-by-one error in restack_managed
When restacking the last window alone, we would trigger this off-by-one
error. This would throw us off the end of the array, causing lower_below
warnings for nonsensical values.

Since the last window already is lowered below everything else, we
shouldn't need to lower it.
2014-09-12 17:10:34 -06:00
Jasper St. Pierre
2833c702c6 stack-tracker: Make lower_below / raise_above internal as well
These are unused elsewhere.
2014-09-12 16:56:27 -06:00
Owen W. Taylor
30e7044746 display: Refix return value of set_alarm_filter 2014-09-12 15:12:09 -04:00
Jasper St. Pierre
1c227baf81 display: Fix return value of set_alarm_filter 2014-09-12 12:55:07 -06:00
Owen W. Taylor
f163a15b13 MetaStackTracker: optimize out unnecessary X restacking
We have a quite accurate view of the X stack, so there's no good reason to ask
the X server to do restacking that has no effect. (Restackings that have no
effect on either X windows or Wayland windows were generally optimized out in
the synchronization code, but in other cases like moving an X window that is
only beneath Wayland windows to the top of the stack we would make such
requests.)

Removing such requests:
 - Is a small efficiency win in itself
 - Allows us to immediately go ahead and apply Wayland changes to the verified stack
 - Prevents queued Wayland changes piling up waiting for an X event that will never
   be received, since the X server will not send confirmation of no-op restacks.

Since such operations may still have an effect on the relative stacking of X
and Wayland windows, we need to continue applying them to the local stack.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
87779ed34e MetaStackTracker: make functions used only internally static
Now that all actual stack shuffle is handled inside stack-tracker.c, we can make
meta_stack_tracker_record_[raise_above/lower_below] internal to that file and
remove the unused meta_stack_tracker_record_lower().

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
04bc846ef3 Move logic for syncing the stack to the X server into MetaStackTracker
stack.c:sync_stack_to_xserver had both code for assembling the desired stack, and
code for enforcing the desired stack on the actual stack of X and Wayland windows;
the latter part is properly the domain of stack-tracker.c; moving the code to
apply the stack there both simplifies it and keeps stack.c more manageable.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
301acac163 stack.c: remove obsolete handling of override-redirect windows
There was still code in stack.c to handle skipping override-redirect windows,
but since quite a while ago, meta_stack_add() is not called for OR windows
since they are outside our stacking control. Add an assertion and remove
unnecessary code.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
9401196e88 Remove cache of last stacking order in stack.c
stack.c kept it's own record of the last stacking it requested, so that
restacking could be done with minimal moves, but we already have a better
view of the stacking order with the stack tracker, so use that instead.

This allows eliminating the special case for the first restack.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
3457366066 Move manipulation of the X stack to MetaStackTracker
Since MetaStackTracker is the code that knows about the current X stacking order
and the relationship between X windows and Wayland windows, it's cleaner to
encapsulate stack manipulation in MetaStackTracker rather than have the calling
code make the X calls and only call into MetaStackTracker to inform it about
the changes.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
cb66cf6398 MetaStackTracker: eliminate the resynchronization process
The step where we requery the stacking order from the server than combine
it in an arbitrary fashion with Wayland windows can be eliminated by observing
that we are the final authority for Wayland window stacking - so if we
apply each X event that we receive from the X server to our stack in a
way that leaves the X windows ordered in the same way as on the server,
and apply events that we have stored locally in a way that doesn't affect
the ordering of X windows, than we have a fully correct ordering of windows.

Ordering this in the order of first applying the X event and then applying the
local portion also means that as long as we had an up-to-date view of the X
stack the composite operation will be identical to what was requested.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
73573a85de Replace MetaStackWindow with a 64-bit "stack ID"
Putting X windows and pointers to MetaWindows into a union had a number of
problems:

 - It caused awkward initialization and conditionalization
 - There was no way to refer to Wayland windows (represented by
   MetaWindow *) in the past, which is necessary for the MetaStackTracker
   algorithms
 - We never even cleaned up old MetaStackWindow so there could be
   records in MetaStackWindow pointing to freed MetaWindow.

Replace MetaStackWindow with a 64-bit "stack ID" which is:

 - The XID for X Windows
 - a "window stamp" for Wayland windows - window stamps are assigned
   for all MetaWindow and are unique across the life of the process.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
2014-09-12 13:42:56 -04:00
Owen W. Taylor
44ecb1c050 Add meta_display_set_alarm_filter()
Add a private hook for the test framework to get XSyncAlarmEvent events -
this will be used to implement XSyncCounter based synchronization
so that the test framework can deterministically wait until Mutter
has seen actions performed by an X11 client.

https://bugzilla.gnome.org/show_bug.cgi?id=736505
2014-09-12 11:00:55 -04:00
Rui Matos
6ba0491adf keybindings: Freeze and ungrab the keyboard only on X11 backend
This isn't needed in the native backend because we control all the
input event flow there.

https://bugzilla.gnome.org/show_bug.cgi?id=736433
2014-09-11 19:05:53 +02:00
Owen W. Taylor
33689ec558 Moving setting of window-scaling-factor to meta_clutter_init()
Setting the scaling factor immediately after calling clutter_init()
avoids creating the stage at one size, then later resizing it to
a different size.

https://bugzilla.gnome.org/show_bug.cgi?id=736279
2014-09-08 14:40:50 -04:00
Jasper St. Pierre
d79db68bf8 workspace: Clean up code style 2014-09-04 13:55:51 -07:00
Jasper St. Pierre
b3b9d9e161 stack: Never focus unmanaging windows
We can enter weird states where get_default_window is called during
window unmanagement, before the window has been fully removed from
the stack. Make sure these windows are *never* returned from
get_default_window, as focusing them can cause an assertion fail,
or worse.
2014-09-04 13:53:06 -07:00
Rui Matos
c8f015c6d7 keybindings: Ignore extra modifier bits when matching iso_next_group
Clutter events include the layout index codified into modifier_state,
unlike XI2 device events, which means that we need to mask it out so
that we can match successfully.
2014-09-02 18:11:31 +02:00
Jasper St. Pierre
604d2155ba window: Don't map the client window before placing it
A lot of applications assume that the window is fully positioned when it
gets the MapNotify, especially simple applications. Make sure that the
window is only mapped through the calc_showing logic.
2014-09-01 11:46:12 -07:00
Jasper St. Pierre
e7727d698f window: Make calc_showing private 2014-09-01 11:42:21 -07:00
Jasper St. Pierre
e1acb69cf1 workspace: Don't try to move O-R windows when relocating workspaces
All we'll get for it is spam.
2014-08-25 09:00:00 -04:00
Jasper St. Pierre
8f757c7b80 workspace: Smarten assert in light of O-R windows
O-R windows appear in workspace->windows, which aren't relocatable,
so we can't simply check if the workspace is empty after relocating
all normal windows, since those windows remain.

Make sure that the only windows we have are those that are
on_all_workspaces.
2014-08-25 08:57:13 -04:00
Jasper St. Pierre
9feb9d6bca events: Update the pointer position here
Rather than in the Wayland front-end, since it's really a core operation.
2014-08-21 17:00:55 -04:00
Jasper St. Pierre
34979c3fe8 window: Don't try to map / unmap OR windows by ourselves
This is bad behavior, and can also cause us to get in an infinite loop
if an OR window is mapped and unmapped in quick succession. This
sequence causes a MapNotify followed by an UnmapNotify, and when
processing the events, we'll call XMapWindow, XUnmapWindow, which will
put another set of MapNotify, UnmapNotify events in our queue, which we
then process by calling XMapWindow, XUnmapWindow, and so it goes
forever, or at least some scheduler uncorks us by making us call
XMapWindow when the window is already mapped, or XUnmapWindow when the
window is already unmapped.

We can stop this madness by simply making sure never to call neither
XMapWindow or XUnmapWindow on OR windows, which is the correct thing to
do anyway.
2014-08-19 16:04:40 -04:00
Jasper St. Pierre
933d05a565 window: Fix the north/south cursor position when keyboard resizing
We got these backwards...
2014-08-19 15:10:55 -04:00
Jasper St. Pierre
8a0da1cb07 keybindings: Make sure to filter out the virtualized mod itself
When devirtualizing the modifier, we can't include the virtualized mod
itself, otherwise our grab won't have the correct mask.
2014-08-19 14:58:47 -04:00
Jasper St. Pierre
1445903a34 prefs: Don't crash when we get a preference changed we don't know about
We commonly used the generic, undetailed signal 'changed' to track
changes to preferences. Since we crash on unknown preference types,
this can be dangerous if somebody adds a new setting that has a
type we're unfamiliar with, and something else changes it.

Instead of crashing, just fizzle out doing nothing.
2014-08-19 14:07:55 -04:00
Jasper St. Pierre
5d9386df0c stack: Reindent 2014-08-19 14:03:43 -04:00
Jasper St. Pierre
6fd1de226b window: Add a hack to correct dragging from the top panel in gnome-shell
In gnome-shell, we have a feature where the user can unmaximize windows
by dragging them from the panel above the window. With accurate
anchoring, this looks really weird as the cursor is now "detached" from
the window. Detect this case and put the cursor in the middle of the
window titlebar instead.
2014-08-19 13:59:39 -04:00
Jasper St. Pierre
ac099343da window: Increase the height of CSD titlebars
This seems to be more accurate with what we currently see in
GNOME. Without having the app expose this information to us, it might be
a better idea to use the default frame style for this information instead.
2014-08-19 13:59:34 -04:00
Jasper St. Pierre
bce5f3f108 window: Fix cursor anchoring issues when drag-unmaximizing windows
The cursor was anchored wrongly when trying to unmaximize windows from
dragging them from the top of the screen because of a few think-o's and
some code that forgot to be updated when we moved to the frame rect
coordinate system.

The cursor is still offset for windows that start dragging from the top
panel. This is technically correct, but looks wrong. We'll fix this in
the next commit.
2014-08-19 13:48:00 -04:00
Jasper St. Pierre
6b8dda0d00 bell: Clean up the bell code
Fix some old comments and rework it so that it's based on MetaWindow,
not the XKB event structs.
2014-08-18 19:49:09 -04:00
Jasper St. Pierre
a7b1b1da80 main: Clean up the initialization sequence
The initialization sequence before was quite icky, initializing Clutter
in a few different places depending on what was going on.

Put that all back into main.c
2014-08-18 16:57:00 -04:00
Jasper St. Pierre
de69678085 main: Clutter does not have to be initialized after the UI
I'm not sure this was ever true. Clutter can be (and should be!)
initialized beforehand.
2014-08-18 16:50:05 -04:00
Jasper St. Pierre
5f7b81eb95 keybindings: Use a less hacky method of getting the proper modifier mask
This is the method Ran suggests as a workaround in
https://github.com/xkbcommon/libxkbcommon/pull/10
2014-08-18 15:54:34 -04:00
Jasper St. Pierre
1af0033368 keybindings: Rewrite the keymap code so that it uses libxkbcommon
This way we aren't depending on Xwayland for native key mapping support,
and are instead using the native interfaces.
2014-08-18 09:11:50 -04:00
Jasper St. Pierre
3645c63c08 keybindings: Rewrite the modmap code so that it uses libxkbcommon
This removes our Xwayland dependency in the native path. The direct
grabs are still there for the X11 backend and are a bit disgusting,
but that's OK. We can refactor it out later.

This introduces some pretty lousy hackery because it depends on
https://github.com/xkbcommon/libxkbcommon/pull/10 , and I really
don't want to wait on that to squash this dep.
2014-08-18 09:11:50 -04:00
Jasper St. Pierre
0b98fbab0a Remove a few extra "ui.h" includes 2014-08-17 23:02:15 -04:00
Jasper St. Pierre
5b8dc37c31 prefs: Fix indentation 2014-08-17 23:00:05 -04:00
Jasper St. Pierre
f42258327b util: Move the text direction stuff out of MetaUI
GTK+ doesn't need to be initialized to get locale direction,
which means we can do this without bringing up MetaUI at all.
2014-08-17 22:59:43 -04:00
Jasper St. Pierre
7d1ef3f447 keybindings: Remove unused includes 2014-08-17 22:53:42 -04:00
Christophe Fergeau
20a6243c85 Remove use of META_KEY_BINDING_REVERSES
Now that the internal mutter bindings and gnome-shell stopped using
META_KEY_BINDING_REVERSES, and after moving the 'adding shift reverses
the keybinding action' logic to gnome-control-center, we can remove
META_KEY_BINDING_REVERSES from mutter.

Plugin API is broken as this constant is removed from the exported
headers. ABI is broken as using this flag is now a noop.

https://bugzilla.gnome.org/show_bug.cgi?id=732385
2014-08-17 19:29:43 +02:00
Christophe Fergeau
bb59b8c249 Don't automatically add bindings for -backward actions
Currently the bindings for {switch,cycle}.* actions are created with the
META_KEY_BINDING_REVERSES flag so that <shift>+binding triggers the
reverse action. However, gnome-control-center does not know about this
kind of implicit bindings, and, for example, cannot warn when the user
tries to setup a conflicting <shift>+xxx binding.

These backward <shift> bindings are being explicitly set in
gsettings-desktop-schemas, so the META_KEY_BINDING_REVERSES annotation
can be removed for them from mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=732385
2014-08-17 19:29:43 +02:00
Christophe Fergeau
c5c6b2257f Add meta_key_binding_is_reversed()
MetaKeyBinding can be marked as being reversed
(META_KEY_BINDING_IS_REVERSED), but MetaKeyHandlerFunc callbacks
cannot check whether this flag was set or not on the MetaKeyBinding
which triggered the callback.

https://bugzilla.gnome.org/show_bug.cgi?id=732295
2014-08-17 19:29:43 +02:00
Jasper St. Pierre
226a09b38c display: Fix inversion for meta_grab_op_is_*
*sigh*, the inline function was supposed to prevent mistakes like this.
2014-08-16 15:24:05 -04:00
Jasper St. Pierre
527c53a2a0 workspace: Rewrite workspace management code
The existing workspace management code is quite hairy, with plenty of
logic inline in all of window.c, workspace.c, and screen.c, making it
hard to understand or make changes to, since you might forget to change
several of the other places the code was around.

Rewrite the internal workspace management logic so that it's
centralized and all in window.c. Document the invariants we need to
maintain, and ensure that these invariants are properly kept, with
asserts in various places.

Extensive testing on gnome-shell did not bring up any issues, and this
is a considerable cleanup.
2014-08-16 14:59:13 -04:00
Jasper St. Pierre
19795c1681 workspace: Add a "workspace-index" property to MetaWorkspace
This will be used to replace some of the hooks that are used to call
into window.c, so that the workspace index property is properly kept up
to date.

We can't name the property "index" since it causes conflicts with the
meta_workspace_index method. This should really be called
meta_workspace_get_index, but oh well.
2014-08-16 14:56:38 -04:00
Jasper St. Pierre
1999fcaa8f workspace: Use G_PARAM_STATIC_STRINGS 2014-08-16 14:53:58 -04:00
Jasper St. Pierre
6b5ff8fd74 workspace: Use g_object_class_install_properties 2014-08-16 14:53:58 -04:00
Jasper St. Pierre
821d946a72 workspace: Use for loops instead of whiles to iterate through lists 2014-08-16 14:53:58 -04:00
Jasper St. Pierre
5f7c901727 workspace: Make the code for removing windows easier to read
Repeatedly pop off the head of the list rather than iterating through
it.
2014-08-16 14:53:58 -04:00
Jasper St. Pierre
7b8ee4ee1e workspace: Replace a boolean ^ with !=
This is a lot easier to understand.
2014-08-16 14:53:57 -04:00
Jasper St. Pierre
32cf4afb04 screen: Fix workspace removal
I accidentally broke this in commit a119ea9. The code was considerably
more complicated than it needs to be, so let's replace it with a
g_list_find and nothing more.
2014-08-16 14:53:57 -04:00
Jasper St. Pierre
e0c92befd5 prefs: Actually insert the SCHEMA_MOUSE settings 2014-08-15 20:24:11 -04:00
Jasper St. Pierre
827e0341ab screen: Add the list window flags to meta_screen_foreach_window
So we can ditch a manual use of list_windows.
2014-08-15 20:21:39 -04:00
Jasper St. Pierre
8627b65f8d screen: Drop the MetaScreen parameter from the foreach function
It's unused.
2014-08-15 20:19:40 -04:00
Jasper St. Pierre
9c62a907c5 screen: Make meta_screen_foreach_window scan Wayland windows
Scanning over the hash table of XIDs is a terrible idea. Not only were
we excluding Wayland windows, but we were also looking at alarms and
barriers, too. We were lucky that that only contained GObjects where
our checks would work.
2014-08-15 20:13:59 -04:00
Jasper St. Pierre
a119ea96a3 screen: Use the standard for-loop iteration for iterating over lists 2014-08-15 19:52:16 -04:00
Jasper St. Pierre
06d55bf019 screen: Remove a bunch of screen checks
Now that we only manage one screen, this isn't necessary anymore.
2014-08-15 19:43:08 -04:00
Jasper St. Pierre
320f38de47 screen: Simplify meta_screen_get_workspace_by_index 2014-08-15 19:41:37 -04:00
Jasper St. Pierre
7adfaceccf screen: Remove blank and unused function 2014-08-15 19:35:42 -04:00
Jasper St. Pierre
67be4e2bf3 window: Don't use GTK+ to fetch the drag threshold
Just look it up in GSettings ourselves.
2014-08-15 18:35:20 -04:00
Jasper St. Pierre
c3e87ee896 display: Replace the inline logic with a static inline
So we won't get it wrong in the future.
2014-08-15 17:44:25 -04:00
Jasper St. Pierre
f2283ec634 display: Fix the base type check inside is_keyboard 2014-08-15 17:43:26 -04:00
Jasper St. Pierre
d06e4beb7f display: Use a named mask constant inside is_moving / is_resizing
This helps clear up what's going on a bit.
2014-08-15 17:43:00 -04:00
Jasper St. Pierre
e24863d175 display: Remove meta_grab_op_is_moving_or_resizing
It's unused.
2014-08-15 17:42:24 -04:00
Jasper St. Pierre
2de2241690 display: Fix meta_grab_op_is_moving 2014-08-15 17:40:01 -04:00
Jasper St. Pierre
977de8c5d4 events: Fix get_window_for_event for the new route logic
I forgot to write the new logic for this function.
2014-08-15 17:40:01 -04:00
Jasper St. Pierre
fb6438cdd4 keybindings: Hardcode Mod2Mask for Num Lock
This is actually part of the XKB specification, so we don't need to look
for it at runtime.
2014-08-15 16:22:16 -04:00
Jasper St. Pierre
517e8f6fbd common: Create a better encoding for MetaGrabOp
MetaGrabOp is painful and tedious to work with, because it's a
sequential series of values, meaning we have to use a giant unreadable
switch statement to figure out some basic things about the value.

To solve this, modify the encoding for MetaGrabOp and for the specific
window grab operations so that they're a set of bitflags that we can
easily check.
2014-08-15 16:08:49 -04:00
Jasper St. Pierre
0e758a9e65 display: Establish a separate state variable for routing events
We've long used a switch statement on the grab operation to determine
where events should go. The issue with MetaGrabOp is that it's a mixture
of a few different things, including event routing, state management,
and the behavior to choose during operations.

This leads to poorly defined event routing and hard-to-follow logic,
since it's sometimes unclear what should point where, and our utility
methods for determining grab operations apart can be poorly named.

To fix this, establish the concept of a "event route", which describes
where events should be routed to.
2014-08-15 16:08:49 -04:00
Jasper St. Pierre
64a915a68d window: Fix build
I break things a lot now.
2014-08-15 16:08:25 -04:00
Jasper St. Pierre
d233238c64 window: Be better at filtering window grab mods
It turns out that Clutter doesn't actually filter NumLock / ScrollLock /
CapsLock from button events due to its terrible event translation code.

Check only the grab mods to check if it's unmodified.
2014-08-15 16:06:54 -04:00
Jasper St. Pierre
f28c7835a1 workspace: Fix build
Forgot to squash, sigh.
2014-08-15 13:48:25 -04:00
Jasper St. Pierre
cecf7f4bf0 events: Revert a local change I accidentally made 2014-08-15 13:47:57 -04:00
Jasper St. Pierre
c687cf9db6 display: Simplify yet even more grab op code 2014-08-15 13:46:54 -04:00
Jasper St. Pierre
54d2218ac2 workspace: Simplify some more grab op code 2014-08-15 13:46:54 -04:00
Jasper St. Pierre
471e6b9e13 cursor-renderer: Popups need to set cursors, too
Popups could not set the cursor image, because the cursor tracker would
ignore window cursors if we had a popup active. The correct condition to
check for is already in should_block_wayland. Rename this to the more
sensible name windows_are_interactable, and use it in the cursor tracker.
2014-08-15 13:46:54 -04:00
Jasper St. Pierre
d931af33c4 display: Init X11 events separately 2014-08-15 13:46:53 -04:00
Jasper St. Pierre
a0e3c05428 display: Don't bother recording the grab timestamp
It's not used anywhere.
2014-08-15 13:09:18 -04:00
Jasper St. Pierre
a5f993f269 window: Filter out buttons when checking if the event is unmodified 2014-08-15 08:41:10 -04:00
Jasper St. Pierre
31361e464a events: Make the ungrabbed button press handling more bullet proof
Instead of returning a value based on whether or not we handled it, we
have this logic: either we have taken a grab on the window, in which
case we have a grab op and have handled it ourselves, or we did not take
a grab and *need* to replay the event to the window.

Handle this in events.c by checking the grab operation in the same way
that we check the other grab ops.
2014-08-15 08:41:10 -04:00
Jasper St. Pierre
bb977c00ca window: Don't mark the event as handled for odd event combinations
This is an accidental regression from 7a109a1. If we mark the event as
handled, then we *need* to set grab_op, or do some other sort of
behavior, since we have a grab.
2014-08-15 08:41:09 -04:00
Jasper St. Pierre
39f65f9f86 backend: Add a keymap-changed signal 2014-08-14 17:36:29 -04:00
Jasper St. Pierre
1e225ecdaf keybindings: Add a helper for taking the standard three-button grab 2014-08-14 17:35:49 -04:00
Jasper St. Pierre
cfb85d9a9a keybindings: Seal off the keybindings manager into its own structure
This helps clean up MetaDisplay, and also helps us move it into a
backend-specific thing in the future.
2014-08-14 17:35:48 -04:00
Jasper St. Pierre
f88c20f335 keybindings: Add an accessor for window grab modifiers
Since we're going to seal it away in the future.
2014-08-14 17:35:24 -04:00
Jasper St. Pierre
c98824bc9e window: Centralize the checks for the window grab modifiers
The code in the grab code was only checking for one of the modifiers to
be down, instead of all of them.
2014-08-14 17:35:24 -04:00
Jasper St. Pierre
69a35bb85f Remove support for the debugging window grabs feature
mutter doesn't really run nested in a useful way anymore.
2014-08-14 17:35:23 -04:00
Jasper St. Pierre
a3bb6c12e5 keybindings: Make devirtualize_modifiers a private function
This is now only used internally in keybindings.c
2014-08-14 17:35:23 -04:00
Jasper St. Pierre
586f118279 keybindings: Move the button grabs to here as well 2014-08-14 17:35:23 -04:00
Jasper St. Pierre
31081e5dac keybindings: Simplify a bit more code 2014-08-14 17:35:23 -04:00
Jasper St. Pierre
ef363e9d2e display: Simplify the regrab on focus mode 2014-08-14 17:35:23 -04:00
Jasper St. Pierre
9fa77acb8c display: Move devirtualize_modifiers into keybindings
It's mostly only used here.
2014-08-14 17:35:23 -04:00
Jasper St. Pierre
1e30db64d1 keybindings: Don't bother not reloading keymaps for MappingModifier
Now that we always use XKB, it's very unlikely that we'll get a
MappingNotifier without a subsequence XkbKeymapNotify event. Just
do all the work always.

This will also help us considerably for the future when we'll be
putting the keymap event in the backend.
2014-08-14 17:35:08 -04:00
Jasper St. Pierre
e830b66604 Remove a few extra HAVE_XKBs 2014-08-14 14:19:31 -04:00
Jasper St. Pierre
5f0fab2156 Conditionalize Wayland support again 2014-08-13 20:28:22 -04:00
Jasper St. Pierre
467465c99c backend: Create the stage in the backend, rather than the compositor
This allows creating the stage much earlier than it otherwise would have
been. Our initialization sequence has always been a bit haphazard, with
first the MetaBackend created, then the MetaDisplay, and inside of that,
the MetaScreen and MetaCompositor.

Refactor this out so that the MetaBackend creates the Clutter
stage. Besides the clarity of early initialization, we now have much
easier access to the stage, allowing us to use it for things such as
key focus and beyond.
2014-08-13 20:08:46 -04:00