1
0
Fork 0
Commit graph

4799 commits

Author SHA1 Message Date
Jasper St. Pierre
3ea6424b8f background: Fix meta_background_new
This is used by the default plugin.
2014-09-03 19:55:15 -07:00
Jasper St. Pierre
96bee8e60d Conditionalize some more Wayland support 2014-09-03 19:51:02 -07:00
Jasper St. Pierre
883c4a7b0f background-actor: Add a simple paint volume
Not having a paint volume causes every single paint to turn into
full-stage redraw, since otherwise culling won't properly work.

Since we don't paint outside of our allocation, just use the simple
default implementation, but also return TRUE inside it.
2014-09-03 11:08:48 -07:00
Jasper St. Pierre
d4317ba1e4 background: Fix build
These warnings weren't properly working on Owen's machine, so they went
unchecked.
2014-09-03 11:03:17 -07:00
Owen W. Taylor
9d69b2a963 MetaBackground: add properties to set vignette settings
Make the vignette options properties so they can be animated;
modify the function-call API for meta_background_actor_set_vignette()
to correspond more closely to the 3 properties.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
ef3b000050 MetaBackgroundActor: match total dimming if GLSL is not present
Without GLSL, we didn't apply the vignetting, which not only made the
background uniform in color, it made it much lighter. Adjust for this
and make the average brightness with the vignette effect the same
with or without GLSL.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
a4a688ed83 Rewrite background code
The old requirement that multiple MetaBackgroundActor objects be
layered on top of each to produce blended backgrounds resulted in
extremely inefficient drawing since the entire framebuffer had
to be read and written multiple times.

 * Replace the MetaBackground ClutterContent with a plain GObject
   that serves to hold the background parameters and prerender
   textures to be used to draw the background. It handles
   colors, gradients, and blended images, but does not handle
   vignetting

 * Add vignetting to MetaBackgroundActor directly.

 * Add MetaBackgroundImage and MetaBackgroundImageCache to allow
   multiple MetaBackground objects to share the same images

By removing the usage of ClutterContent, the following optimizations
were easy to add:

 Blending is turned off when the actor is fully opaque
 Nearest-neighbour filtering is used when drawing 1:1

The GLSL vignette code is slightly improved to use a vertex shader
snippet for computing the texture coordinate => position in actor
mapping.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
17dc5c57dd Use meta_actor_painting_untransformed() for MetaShapedTexture
The old check for using NEAREST by checking clutter_actor_is_in_clone_paint()
and meta_actor_is_untransformed (actor) doesn't work properly since
clutter_actor_is_in_clone_paint() does not look at ancestors of the
actor; it only applies to a direct clone of the actor. Using
meta_actor_painting_untransformed() allows us to check exactly what we
care about rather than using tricky approximations.

https://bugzilla.gnome.org/show_bug.cgi?id=735632
2014-09-03 13:43:40 -04:00
Owen W. Taylor
ef5f939db8 Factor out meta_actor_painting_untransformed()
The painting_untransformed() function in MetaWindowGroup is useful
elsewhere, in particular if we want to check whether we can avoid
bilinear filtering when painting a texture 1:1.

https://bugzilla.gnome.org/show_bug.cgi?id=735632
2014-09-03 13:43:40 -04: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
2f9840a51c compositor: Conditionalize some more Wayland support 2014-08-27 12:56:39 -04:00
Jasper St. Pierre
09aefdba43 compositor: Conditionalize more Wayland support 2014-08-27 12:41:26 -04:00
Jasper St. Pierre
4c8a408afc Only build Wayland protocols when we have Wayland 2014-08-27 12:07:11 -04:00
Jasper St. Pierre
4c08d9a53b configure: Don't conditionalize gbm
Let's just say it's required for now.
2014-08-27 12:05:00 -04:00
Jasper St. Pierre
b091cbf361 shaped-texture: Don't set a small minimum size
The shaped-texture is effectively fixed size. It doesn't make sense to
have less allocation than requested.
2014-08-27 10:00:19 -04:00
Jasper St. Pierre
a6fcda69ac shaped-texture: Remove the use of MetaWindowActor internals
I want to make this class an independent helper.
2014-08-27 10:00:19 -04:00
Jasper St. Pierre
9063e4568c configure: Conditionalize libinput and gbm too 2014-08-27 09:57:43 -04:00
Adel Gadllah
3a8bad1e6f meta-surface-actor: Fix is_argb32 for unredirected windows
meta_surface_actor_is_argb32 assumes that lack of stex means that a window is
ARGB32. When we unredirect a window we detach the texture so we end up without
a texture. Given that should_unredirect returns FALSE when a window is argb32,
we know that this window is indeed not ARGB32.

Returing TRUE in that case causes us to flip between redirected and
unredirected on every paint.

So fix that by returning FALSE in that case.
2014-08-26 18:59:02 +02:00
Carlos Garnacho
e822e51752 surface: Don't calculate geometry for buffer-less subsurfaces
A wl_surface may have a wl_subsurface interface, but no buffers attached
yet, even though the geometry calculation code for surfaces/subsurfaces
assumes everything has already a buffer.

Just skip subsurfaces that don't have a buffer, those can't be set
a geometry yet, and right now it's crashing accessing the texture from
the NULL surface->buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=735452
2014-08-26 16:58:59 +02:00
Jasper St. Pierre
6526118d9f shaped-texture: Fix a typo in a comment 2014-08-25 10:52:07 -04:00
Jasper St. Pierre
c15b3b4a09 shaped-texture: Fix the logic when the blended region is empty
When the blended region was empty, meaning we didn't have to paint
anything blended -- the case for an app update -- was drawing the
entire window blended, because of a think-o in the complex and
complicated logic.

Fix this so that we don't draw anything for the blended region when
empty.
2014-08-25 09:30:15 -04: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
01a47c7d6d shaped-texture: If we have too many rectangles, don't paint the opaque
region first

If we're going to render the entire texture blended, then don't bother
painting the unblended stuff, since we're just going to draw on top
anyway.
2014-08-24 12:38:29 -04:00
Jasper St. Pierre
3ee09c6251 meta-monitor-xrandr: Assign a name to the mode
Based on a downstream Endless patch. They use this to show a proper mode
name to the users.
2014-08-23 08:54:06 -04:00
Jasper St. Pierre
31f5a916f4 wayland: Tie XDG surfaces together with the Shell that created them
This means that we don't leak when a client binds an XdgShell for a
client more than once, and we send pings/pongs to the correct shell
interface.
2014-08-22 12:52:21 -04:00
Jasper St. Pierre
5657a671c1 xdg-shell: Bump unstable version 2014-08-22 12:07:56 -04:00
Rico Tzschichholz
ecc254c659 surface-actor-x11: Fix "incompatible pointer type" error
Caused by e73c46ce03
2014-08-22 07:38:08 +02:00
Jasper St. Pierre
9cb1c95e49 surface-actor: Call process_damage even when the actor is invisible
Otherwise, surface-actor-x11 won't be marked as having received damage,
which is vital to updating the actual surface.
2014-08-21 18:30:56 -04:00
Jasper St. Pierre
e73c46ce03 surface-actor-x11: Use the existing check for "visibility"
Instead of doing our own thing here.
2014-08-21 18:30:35 -04:00
Jasper St. Pierre
952e9c52bc surface-actor-x11: Merge a simple function inline
This is a one-liner, only used in one place.
2014-08-21 18:30:17 -04:00
Jasper St. Pierre
b879af46b3 stage: Refine our assertions for overlays in MetaStage
We indeed call this function if we're not an X11 compositor, but in this
case we're simply calling it to say that we have no cursor overlay. Make
sure not to assert fail in this case.
2014-08-21 18:06:53 -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
dc0437a5b5 surface-actor-wayland: Pass in a CoglTexture, as well
This makes it so that MetaSurfaceActorWayland is effectively just a
wrapper actor around MetaShapedTexture with some extra scaling. I think
the MetaSurfaceActor subclassing was a bad idea -- we really should have
these abstractions in much higher levels in the stack than the
compositor.
2014-08-21 16:34:29 -04:00
Jasper St. Pierre
55331a0678 surface-actor-wayland: Don't store the buffer
We don't need to anymore -- we're purely texture based.
2014-08-21 16:24:30 -04:00
Jasper St. Pierre
f5580f61f9 wayland: Update the CoglTexture in the MetaWaylandSurface
It doesn't make sense to update it in the surface actor. It's also
theoretically wrong to update the buffer's texture on surface commit,
too, because it's buffer state, not surface state, but I don't think
there's any place we use a wl_buffer without a wl_surface.
2014-08-21 16:22:53 -04:00
Jasper St. Pierre
30953cf2d7 stage: Make the API take a CoglTexture
MetaCursorReference doesn't really need to be part of the API.
2014-08-21 15:04:58 -04:00
Jasper St. Pierre
c7fa446ee7 stage: Refactor the cursor drawing code into a generic "overlay" system
This isn't really anything but a really small actor system. This will be
used for DND cursors as well.
2014-08-21 15:04:57 -04:00
Jasper St. Pierre
d41449b578 wayland: Initialize SHM again
Uh, whoops. I accidentally removed this when revamping the
initialization sequence. This causes bad things to happen.
2014-08-19 18:27:21 -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
711f0c0c50 common: Make UNKNOWN a flag, not a combination of all directions
This was the original intention, but it was thought to be easier
to mark this as a combination of all directions. It turned out to
instead cause subtle bugs since code that blindly checked & DIR_WEST or
similar turned out to get it wrong when it was UNKNOWN, so just make
it an explicit flag.

This fixes the cursor appearing in the wrong place when starting a
keyboard resize.
2014-08-19 15:11:10 -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
35e0982e35 xrandr: Port some checks to XCB so we don't have to deal with BadName
RandR's QueryOutputProperty request makes the incredible decision of
throwing a BadName if you pass a property that doesn't exist, which
means that trying to check if a property exists is a royal pain when
using Xlib.

XCB's interface is much more friendly about errors and not having global
state and things like that, so use that instead to query our backlight
property.
2014-08-19 11:08:44 -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
277df44cfb xrandr: Fix build
Gah, I keep forgetting to squash for some reason.
2014-08-18 18:01:04 -04:00
Jasper St. Pierre
2dded1e510 xrandr: Don't use RRQueryOutputProperty to fetch hotplug_mode_update
If the property doesn't exist, a BadName error will be generated. This
is a terrible API, but it's what we're stuck with. Use
RRGetOutputProperty instead.
2014-08-18 18:00:33 -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
f4f70afe31 window-x11: Fix the coordinates we use in the synthetic ConfigureNotify
Before, we were using the root window coordinates of the client window,
rather than the toplevel frame window. This caused various Java programs
and programs like VirtualBox and WINE to get confused about where their
window actually is, and make bad ConfigureRequests when trying to
position their windows in the future.

Remove the mass of code here by just using window->rect.
2014-08-18 14:41:36 -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
Christophe Fergeau
04ddfe0a6f Don't remove meta/meta-version.h during make clean
meta/meta-version.h is generated by configure, so it should be removed
with make distclean, not make clean. This is the heuristic described in
https://www.gnu.org/software/automake/manual/html_node/Clean.html

Cleaning it in make clean means that configure; make clean; make won't
work properly as meta/meta-version.h will be removed and not
regenerated.

https://bugzilla.gnome.org/show_bug.cgi?id=734960
2014-08-18 10:17:57 +02:00
Christophe Fergeau
ec3dc4a607 Don't list meta/meta-version.h in mutter_built_sources
It's already listed in libmutterinclude_built_headers.

https://bugzilla.gnome.org/show_bug.cgi?id=734960
2014-08-18 10:17:57 +02: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
Jasper St. Pierre
652fe57cdd prefs: Completely remove references to REVERSES
And fill up the gap in the flags as well
2014-08-17 22:48:51 -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
d0c004c93c common: Don't define _WGO_BASE inside the enum
Doing this causes gobject-introspection to mess up and think that
the enum prefix is the empty string. Just use the long name within
the enum defines.
2014-08-16 15:50:39 -04:00
Jasper St. Pierre
53876d2b62 wayland-pointer: Squash warning
This should never happen.
2014-08-16 15:38:25 -04:00
Jasper St. Pierre
2b63b17327 wayland-pointer: Insert missing break;s 2014-08-16 15:38:15 -04: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