1
0
Fork 0
Commit graph

1278 commits

Author SHA1 Message Date
Jasper St. Pierre
59541dfa14 window: Initialize the result here
The vfuncs simply |= their results into the result variable, so we
need to make sure we start out with nothing.
2014-04-12 10:08:36 -07:00
Jasper St. Pierre
becce7afa0 stack: Fix a crasher from a buffer overrun
The code that restacks X11 windows at the end first tracks any
old windows we know about, and then handles any windows created.

It starts when it ended, and then walks forwards and then
back looking for the first X11 window it doesn't know about.
However, when there aren't any X11 windows, it flies off the end
of the array and starts looking through random memory.

When it finds the X11 window, it then goes through and then tries
to restack the remaining windows according to how we've sorted
them.

Unfortunately, META_WINDOW_CLIENT_TYPE_X11 is 0, which is quite
common in random memory we have lying around, so we enter that
path and then just crash.

Fix the buffer overrun by adding the proper bounds check to the
search.

You can easily reproduce this by opening a menu while bloatpad
is full-screen. Why it only crashes when full-screen and not
when a standard window, I have no idea.
2014-04-12 08:15:58 -07:00
Jasper St. Pierre
862d57d459 stack: Fix indentation 2014-04-12 08:15:54 -07:00
Jasper St. Pierre
bb62f49c98 display: Wayland client grabs should not block Wayland input focus
This fixes menu issues with GTK+.
2014-04-12 00:24:27 -07:00
Jasper St. Pierre
b4293d46a6 display: Rewrite grab_op_should_block_wayland to be a tiny bit clearer 2014-04-12 00:24:27 -07:00
Jasper St. Pierre
30d534f17e display: Rename grab_op_is_wayland to grab_op_should_block_wayland
The idea here is that while we take a WM-side grab, like a compositor
grab or a resizing grab, we need to remove the focus from the Wayland
client.

We make a special exception for CLICKING operations, because these
are really an internal state machine while you're pressing on a button
inside a frame, and in this case, we need to not kill the focus.
2014-04-12 00:24:26 -07:00
Jasper St. Pierre
d004f3f990 display: Don't special-case is_wayland grabs when we sync_input_focus
meta_wayland_seat_repick already detects this case and reacts
accordingly.
2014-04-12 00:24:26 -07:00
Giovanni Campagna
c55f64fdf2 x11: fix enter/leave events for frames
We need to pass all events on frames to GTK, even if we handled
them internally, to make sure that the hover state is properly
updated.
2014-04-12 03:16:40 +02:00
Bastien Nocera
d53e04f4c8 Name all timeouts and idles
Better names can be used once we make more use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=727979
2014-04-10 18:59:46 +02:00
Nirbheek Chauhan
b37223b9bb window: Use guint8 for opacity internally
Except while reading _NET_WM_WINDOW_OPACITY, opacity is between 0 and 255. With
guint8, we'll get compiler warnings if arbitrary int values are passed.

https://bugzilla.gnome.org/show_bug.cgi?id=727874
2014-04-10 18:15:25 +02:00
Jasper St. Pierre
954677dcbd window: Make sure to end the grab even if the last action was a snap
This seems to be a cherry-pick failure while we were switching event
handling around. This matches what the master branch does.
2014-04-09 12:40:13 -07:00
A. Walton
4396ac809b screen: Name the guard window
So that extensons can recognize it, for the case where they
want to watch the window list.

https://bugzilla.gnome.org/show_bug.cgi?id=710346
2014-04-09 12:20:07 -07:00
Jasper St. Pierre
797c46ba7d events: Fix event handling for window menus under X11
We need to pass XI_Enter / XI_Leave events for GTK+ windows to GTK+,
rather than eating them.
2014-04-09 11:38:49 -07:00
Jasper St. Pierre
2f229c3928 display: Remove code to calculate the above-tab keycode
We always know it will be KEY_GRAVE + 8.
2014-04-07 17:56:00 -04:00
Jasper St. Pierre
a730361d6c Use libxkbcommon keysym names everywhere 2014-04-07 17:56:00 -04:00
Jasper St. Pierre
db058d4a81 keybindings: Use xkb_keysym_get_name 2014-04-07 17:56:00 -04:00
Jasper St. Pierre
15cf804dbc keybindings: Eliminate the use of the stored modmap
We can simply check the XKB keysym here to see if it's a modifier.
2014-04-07 17:55:59 -04:00
Jasper St. Pierre
b38b037092 keybindings: Don't bother saving num_lock / caps_lock in MetaDisplay
It's unused outside of this one function.
2014-04-07 17:55:58 -04:00
Jasper St. Pierre
42bcad6549 display: Ignore the modmask passed into meta_display_begin_grab_op
A careful analysis of mutter's codebase shows that nothing actually
passes anything but 0 to this. gnome-shell has one instance, but it's
most likely a mistake.

Remove the grab_mask field and the one place in keybindings.c that uses it.

The parameter to begin_grab_op is left in for API compatibility reasons.
2014-04-07 17:45:52 -04:00
Jasper St. Pierre
b0ea0afd2f display: Remove meta_display_get_ignored_modifier_mask
It's unused, in both here and in gnome-shell.
2014-04-07 17:16:29 -04:00
Jasper St. Pierre
1d08d75108 keybindings: Rename and move keysym_to_keycode
This makes it more what it's actually doing.
2014-04-07 16:02:08 -04:00
Jasper St. Pierre
4daf20483d keybindings: Handle META_KEY_ABOVE_TAB in get_keycodes_for_keysym
We're going to switch to get_keycodes_for_keysym for the other
bindings, so add that special case here.
2014-04-07 16:01:24 -04:00
Jasper St. Pierre
96b6dcec01 display: Kill some bad whitespace 2014-04-07 16:00:17 -04:00
Jasper St. Pierre
9fe5a3b407 keybindings: Fix style 2014-04-07 16:00:17 -04:00
Jasper St. Pierre
a7d4713393 accel-parse: Add a notice about where the code came from 2014-04-07 11:25:16 -04:00
Jasper St. Pierre
4d4ecae2a1 accel-parse: Clean up trailing whitespace 2014-04-07 11:24:23 -04:00
Jasper St. Pierre
545c3b6678 accel-parse: Clean up error handling
Now that we have the code in-tree, we can change the API to actually
report an error rather than checking afterwards.
2014-04-07 11:21:36 -04:00
Jasper St. Pierre
e70f336a09 accel-parse: Use libxkbcommon for keysym parsing
This kills our dependency on GTK+ / GDK entirely.
2014-04-07 11:19:41 -04:00
Jasper St. Pierre
806f1742ac accel-parse: Switch code to output MetaVirtualModifier directly 2014-04-07 11:19:40 -04:00
Jasper St. Pierre
0dc63f395d accel-parse: Remove support for <Release> 2014-04-07 11:15:01 -04:00
Jasper St. Pierre
616f1a09b1 accel-parse: Add keycode parsing as well 2014-04-07 11:15:01 -04:00
Jasper St. Pierre
50e69109b6 accel-parse: Integrate Above_Tab parsing code directly into our copy 2014-04-07 11:15:01 -04:00
Jasper St. Pierre
242784d3e4 accel-parse: Copy the code from GTK+ in-tree
We can't use GTK+ for accelerator parsing under Wayland, since we
don't want to go through Xwayland to make that happen.
2014-04-07 11:14:35 -04:00
Jasper St. Pierre
0466fe9301 Move meta_ui_parse_accelerator into core/
We're currently using GTK+ for this, but we'll stop doing that fairly
quickly and instead just copy the GTK+ code in-tree.
2014-04-07 10:59:46 -04:00
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Jasper St. Pierre
75de29f5f7 errors: Remove vestigals of old error trap implementation 2014-04-07 10:37:03 -04:00
Jasper St. Pierre
e2b24092d6 events: Don't pass any X input events on to Clutter / GTK+ 2014-04-07 10:37:02 -04:00
Jasper St. Pierre
0e6570b09b events: Early exit when we get a SN notification event
Nothing else needs to see this.
2014-04-07 10:37:02 -04:00
Jasper St. Pierre
be02fa1120 xwayland: Switch to the new Xwayland DDX 2014-04-02 13:24:57 -04:00
Jasper St. Pierre
3c404c5db3 wayland: Replace make_toplevel / window_unmanaging with set_window
The make_toplevel / window_unmanaging interface has never made
a lot of sense to me. Replace it with set_window, which does
effectively the same thing.

It's still not perfect in the case of XWayland, but I don't think
XWayland will ever make me happy.
2014-04-02 11:41:07 -04:00
Jasper St. Pierre
ab6bc76bfd Move edid-parse to backends/ 2014-04-01 14:35:04 -04:00
Jasper St. Pierre
bce1d5117b Start creating different subdirectories for each backend 2014-03-31 23:44:47 -04:00
Jasper St. Pierre
5bcc78498f Move MetaLauncher to meta-backend 2014-03-31 23:44:46 -04:00
Jasper St. Pierre
89b931435d Move meta_clutter_init into a new file
We'll use this to get the initialization between the Wayland and
X11 compositor codepaths back in sync.
2014-03-31 23:44:25 -04:00
Jasper St. Pierre
e22e9f5df5 main: Refactor some code slightly 2014-03-31 22:55:13 -04:00
Jasper St. Pierre
2cf185b4e4 Move mutter-Xatomtype to x11/ 2014-03-31 22:13:12 -04:00
Jasper St. Pierre
229360b248 Start molding out a new src/backends/ dir
Right now this just has all of the files in one directory. We'll
be introducing more structure to this in the future, and build
a proper backend system.
2014-03-31 22:11:00 -04:00
Jasper St. Pierre
ccced506ed Rename monitor => meta-monitor-manager 2014-03-31 22:05:24 -04:00
Jasper St. Pierre
28b9160c01 Rename monitor-config => meta-monitor-config 2014-03-31 22:05:22 -04:00
Jasper St. Pierre
ba6584a0d7 Move monitor-config to its own header file 2014-03-31 22:04:38 -04:00