Commit Graph

6894 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
62e5faeb0c wayland: Remove the explicit surface commit for Xwayland
It's not needed anymore; we always keep the actor up-to-date.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
03cfe602d9 wayland: Always keep the MetaSurfaceActorWayland up-to-date
The MetaSurfaceActorWayland should always accurately reflect
the state of the MetaWaylandSurface, even if it's a cursor
surface.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
e1b0c9c756 wayland: Make synchronous subsurface a very special case in commit
Really, it is a special case. When the subsurface is synchronous,
commit changes meaning from being applied immediately to being
queued up for replay later. Handle this explicit special case
with an explicit special case in the code.

This means that in all other paths, we can unconditionally
apply the actor immediately.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
dbe4fc0e45 wayland: Always set the new buffer on the surface on commit
Even when it doesn't have a role.

This fixes cursors not quite working right, as they're a "detached"
surface without a role since nobody called set_cursor on them yet.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
f0bf9c7fc3 wayland: Check for newly_attached everywhere
Instead of using commit_attached_buffer / actor_surface_commit.

We want to kill the return values of these methods because we
really should always be calling them, even if the surface doesn't
have a role.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
d0f0be8b03 wayland: Only set newly_attached if the buffer changes
This cleans up the check to determine if the buffer changed,
meaning we shouldn't have to pass it around like we needed
to do before.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
f5e77d7f63 wayland: Remove some extraneous code
This is already handled by the double_buffered_state_reset at the end.
2014-04-11 23:55:37 -07:00
Jasper St. Pierre
277879c11b wayland: Small code style fix-up 2014-04-11 23:55:36 -07:00
Jasper St. Pierre
1a4c16659f wayland: Remove an old comment
wl_buffer_release semantics are centrally managed, and the comment
is above something completely unrelated.
2014-04-11 23:55:36 -07:00
Jasper St. Pierre
239195c1d1 wayland: Rename commit_attached_surface to commit_attached_buffer
The buffer is the thing that's attached here, not the surface.
2014-04-11 23:55:28 -07:00
Jasper St. Pierre
7c4f4c6f36 wayland: Rename set_transient_for to set_parent
This is also something that we did upstream. Since we want to
introduce an explicit "xdg_transient" window type for tooltips
and popovers, and since "transient_for" is a confusing dumb
80s term lifted from the ICCCM spec, just rename it.
2014-04-11 23:54:11 -07:00
Jasper St. Pierre
e8447ad9bb wayland: Rename the delete event to the close event
This was changed upstream a little while ago for C++ compatibility.

It's also the more common term for the operation: you close a window,
you don't delete one. In fact, a delete event might seem like it
would be about resource management instead.
2014-04-11 23:52:48 -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
Fran Diéguez
d1173ce860 Updated Galician translations 2014-04-10 13:27:53 +02:00
Daniel Mustieles
df733c9cee Updated Spanish translation 2014-04-10 11:04:37 +02:00
Piotr Drąg
6054a3ce76 Updated POTFILES.in 2014-04-10 00:40:16 +02:00
Jasper St. Pierre
3ba8532bdc Revert "wayland: make parallel installable with regular mutter"
This reverts commit ea3d2b4759.
2014-04-09 15:14:11 -07:00
Jasper St. Pierre
912cf8ee5f Merge branch 'wayland'
This has one regression: the basic touch support added by
Carlos Garnacho in 991c85f is now partially reverted, since
we ported to Clutter events for this. We'll need to either
port his changes to Clutter, or restructure event handling
in mutter directly.
2014-04-09 14:54:13 -07:00
Jasper St. Pierre
85eab49b53 window-actor: Rearrange MetaWindowActorPrivate
This matches the wayland branch better, which makes it easier to merge.
2014-04-09 12:49:31 -07: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
Alexander Larsson
d7c4f57aae ui: Disable scaling support in Gtk+
We can't really support the Gtk+ automatic scaling, as to much
code relies on the GdkWindow and XWindow sizes, etc to match.
In order to keep working we just disable the scaling, meaning
we will pick up the larger fonts, but nothing else. Its not
ideal but it works for now.

https://bugzilla.gnome.org/show_bug.cgi?id=706388
2014-04-09 12:34:10 -07:00
Florian Müllner
333d78f338 Update .gitignore 2014-04-09 12:29:15 -07:00
Seán de Búrca
814b2dbda9 build: Create m4 directory
Due to changes in gnome-common git, an implicit m4 directory is no
longer created during autogen. The attached patch explicitly and
correctly specifies a macro directory.

https://bugzilla.gnome.org/show_bug.cgi?id=706787
2014-04-09 12:28:45 -07:00
Owen W. Taylor
ebbdfabed6 window-props.c: React to changes to _GTK_FRAME_EXTENTS
When _GTK_FRAME_EXTENTS changes, we need to redo constraints on
the window - this matters in particular if the toolkit removes
invisible borders when a window is maximized, since otherwise
the maximized window will be positioned as if it still has
invisible borders.

https://bugzilla.gnome.org/show_bug.cgi?id=714707
2014-04-09 12:20:45 -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
Colin Guthrie
c2b9155979 MonitorXrandr: Mask a BadValue error on VirtualBox.
https://bugzilla.gnome.org/show_bug.cgi?id=707563
2014-04-09 12:19:11 -07:00
Robert Ancell
f68d65a5ae xrandr: Use specified output property name for backlight control
Backlight controls are set using the "BACKLIGHT" XRANDR output property.
This should be "Backlight" according to the XRANDR spec [1].

Some drivers (Intel) export both properties and some only the specified property (nvidia).
Users of drivers that only export the specified property cannot change their backlight using XRANDR.

[1] http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt section 9.1

https://bugzilla.gnome.org/show_bug.cgi?id=723606
2014-04-09 12:17:58 -07:00
Giovanni Campagna
42f267bb50 MonitorManager: make sure to pass the right sizes to vararg functions
A gulong is not enough to get 64 bits in all arches, so we must
cast it, or we can corrupt the stack.

This was downstream bug bugzilla.redhat.com/show_bug.cgi?id=1002055

https://bugzilla.gnome.org/show_bug.cgi?id=707267
2014-04-09 12:14:26 -07:00
Giovanni Campagna
e215f3f5eb monitor-config: prevent assert that at least one output is connected
Apparently some connector technologies don't distinguish between
on and off, and there might be valid use cases for running without
any connected monitor.
In that case, just avoid any configuration at all.

https://bugzilla.gnome.org/show_bug.cgi?id=709009
2014-04-09 12:13:32 -07:00
Florian Müllner
7ac66faa72 tower: Fix erroneous return value
The function's return value is void, not gboolean.
2014-04-09 12:10:24 -07:00
Robert Bragg
d0b870d3a9 tower: make sure not to blend when updating tower
Each level in the tower is initialized by binding the texture for that
level to an offscreen framebuffer and rendering the previous level as a
textured rectangle. The problem was that we were blending the previous
level with undefined data so argb32 windows with transparencies would
result in artefacts. This makes sure to disable blending when drawing
the textured rectangle.
2014-04-09 12:10:17 -07:00
Jasper St. Pierre
99ad5c00a7 texture-tower: Remove CPU codepath for mipmap generation
The CPU codepath for mipmapping is unusably slow, and we expect modern
graphics cards with modern TFP/FBO support.
2014-04-09 12:10:00 -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
Nirbheek Chauhan
ab0bd59f5e window-props: _NET_WM_WINDOW_OPACITY range is 0xffffffff to 0
After reading the atom, scale the value from 0xffffffff to 0xff. Not doing so
causes Clutter to truncate the opacity value, and only read the last two digits.
Hence, 0x7fffffff (50%) becomes 0xff (100%).

https://bugzilla.gnome.org/show_bug.cgi?id=727874
2014-04-09 16:40:10 +02:00
Nirbheek Chauhan
0c0973bbd8 window-props: _NET_WM_WINDOW_OPACITY range is 0xffffffff to 0
After reading the atom, scale the value from 0xffffffff to 0xff. Not doing so
causes Clutter to truncate the opacity value, and only read the last two digits.
Hence, 0x7fffffff (50%) becomes 0xff (100%).

https://bugzilla.gnome.org/show_bug.cgi?id=727874
2014-04-09 16:39:08 +02:00
Rui Matos
feca0fb512 xwayland: Re-sync input focus when associating a surface to a window
When the MetaWindow is created we don't have the surface yet and thus
we can't set input focus to it so we need to try again when we get the
surface.
2014-04-09 11:20:28 +02: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