Florian Müllner
c54a19825b
keybinding: Implement keybindings for moving windows between monitors
...
Currently the only way to move a window to another monitor via
keyboard is to start a move operation and move it manually using
arrow keys. We do have all the bits of a dedicated keybinding in
place already, so offer it as a more comfortable alternative.
https://bugzilla.gnome.org/show_bug.cgi?id=671054
2013-12-12 09:13:17 +01:00
Jasper St. Pierre
8131f34eb6
Move _NET_WM_WINDOW_OPACITY handling to the standard window-props interface
2013-12-09 15:53:23 -05:00
Jasper St. Pierre
f29241d90e
compositor: Remove atom_x_root_pixmap
...
It's unused
2013-12-09 15:53:23 -05:00
Rui Matos
bad48ea815
introspection: Make MetaKeyHandlerFunc compatible with master
...
This allows gnome-shell's JS handlers work on the wayland branch.
2013-12-09 21:34:53 +01:00
Jasper St. Pierre
66af41f4a9
window-actor: Remove outdated code path
...
The shadow is added in the paint step, not as a separate actor,
so the raise is a no-op. It also gets rid of an annoying misspelling
that's driving me crazy.
2013-12-09 14:10:44 -05:00
Jasper St. Pierre
e30be380dd
window-actor: Move signal handler connections to the meta-window setter
2013-12-09 14:08:01 -05:00
Jasper St. Pierre
65f2e29375
window-actor: Make the meta-window property construct-only
...
We don't deal with setting this property at all, and it's unlikely
to come up in future settings, so just don't allow setting it at all.
https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:08:01 -05:00
Jasper St. Pierre
98dbba1e17
window-actor: Remove meta-screen property
...
This can be inferred from the window. Don't allow anybody to set it.
https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
422648e2eb
window-actor: Remove (private) xwindow property
...
This should make it easier to construct a MetaWindowActor from bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
f0fa4d831a
window: Add a simple meta_window_get_toplevel_xwindow utility
...
To replace all the places where we do:
window->frame ? window->frame->xwindow : window->xwindow
or similar...
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
1b600f5867
window-actor: Use g_signal_connect_object
...
To make our signal connections a bit more manageable...
2013-12-09 13:57:33 -05:00
Jasper St. Pierre
fd8cc9b7a8
xwayland: Remove outdated code
...
Now that focus management goes through the central display.c,
we don't need to do this separately. Wayland and X clients
should just behave as one.
2013-12-09 13:57:32 -05:00
Jasper St. Pierre
ca5b5e6bc4
surface-actor: Reindent
2013-12-06 20:28:39 -05:00
Jasper St. Pierre
ee683ff187
window: Fix meta_window_ping some more
...
Make sure to actually add the pings to the list... and don't
remove it from the list twice.
2013-12-06 20:23:00 -05:00
Jasper St. Pierre
57602adfe7
surface-actor: Don't use self->priv->foo directly
...
I don't like it...
2013-12-06 20:10:21 -05:00
Jasper St. Pierre
1481836ed6
surface-actor: Move work out of _new constructor
...
If we want to have any chance at creating subclasses of MetaSurfaceActor,
we can't do work in the constructor...
2013-12-06 20:10:21 -05:00
Jasper St. Pierre
309f78ff52
display: Fix window pings
...
These are 32-bit values, not longs. Treat them as such.
2013-12-06 20:03:46 -05:00
Alberto Milone
6436459381
xrandr: ignore the error if setting the primary output fails
...
Some drivers which support RandR 1.4 may not support setting
or getting the primary output, therefore mutter should trap
and ignore any relevant errors.
The modesetting driver exposes this problem when used in
combination with the nvidia binary driver using RandR 1.4
offloading.
Also use a local display variable instead of calling
meta_get_display () every time.
2013-12-06 15:30:53 -05:00
Jasper St. Pierre
65b39212d5
meta-wayland: Remove undefined variable
2013-12-05 18:32:11 -05:00
Jasper St. Pierre
283649b8d7
Support keybindings again, too
2013-12-05 17:18:49 -05:00
Jasper St. Pierre
fa65c380db
Support X button events again
...
Do this by duplicating the current code and porting it to use
X again. A better approach would involve our own event structures,
and I really don't want to do that right now. We can clean this up
later.
2013-12-05 17:18:49 -05:00
Jasper St. Pierre
58b39233f5
display: Correct the detection of a grab
...
The grab_window might be NULL, in which case we have a full-screen
grab, but we might still in a grab. Correct the check by asking
whether we're in a grab op or not.
2013-12-05 17:18:49 -05:00
Jasper St. Pierre
82066e02c5
display: Set the cursor when calling XIGrabDevice again
2013-12-05 17:18:49 -05:00
Jasper St. Pierre
c36aa5e696
cursor-tracker: Don't assume we're a Wayland compositor
2013-12-05 17:18:49 -05:00
Jasper St. Pierre
29197d40c6
compositor: Don't assume we're a Wayland compositor
2013-12-05 17:18:49 -05:00
Owen W. Taylor
8d5ab6b5b3
Use the correct frame size during unmaximize
...
When unmaximizing, we changed bits of window state, then called out
to code that used the frame extents *before* we cleared old cached
extents. Clear the cache up-front as soon as we change the window
state.
https://bugzilla.gnome.org/show_bug.cgi?id=714707
2013-12-05 11:17:32 -05:00
Owen W. Taylor
a796938b39
MetaWindowGroup: fix paint volume
...
In the past, MetaWindowGroup was allocated the size of the screen and
painted the size of the screen because it contained the screen background,
but now we also have the "top window group" which contains only popup
windows, so the allocation doesn't properly reflect the paint bounds
of the window group. Compute the paint bounds accurately from the
children.
https://bugzilla.gnome.org/show_bug.cgi?id=719669
2013-12-05 09:06:33 -05:00
Owen W. Taylor
3813113f1a
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
2013-12-05 09:06:26 -05:00
Jasper St. Pierre
1be117e430
wayland-surface: Properly set the window type
...
We need to make sure to call meta_window_type_changed after updating
the type...
2013-12-04 10:41:58 -05:00
Jasper St. Pierre
622c7a021b
window-actor: Update shape at construction time
...
When we attach an existing surface actor, the allocation may not
change, so we need to ensure that the shape region and geometry is
valid...
2013-12-04 10:26:06 -05:00
Lionel Landwerlin
4d2d2f285b
core: window: enable create effect for new wayland windows
...
https://bugzilla.gnome.org/show_bug.cgi?id=719833
2013-12-04 11:14:30 +00:00
Jasper St. Pierre
0924c7d61b
wayland: Use a stage paint callback instead of a signal handler on "paint"
...
This is much more appropriate...
2013-12-03 14:49:40 -05:00
Jasper St. Pierre
2746608eb2
background-actor: Remove custom get_paint_volume
...
The paint volume should be based on what we paint, not what the content
wants to be painted as. Thus, it should be the allocation.
2013-12-03 14:36:29 -05:00
Jasper St. Pierre
fe26cb5989
wayland-surface: Unmanage the window when destroying xdg_surface/xdg_popup
...
Also, unparent the actor when destroying a subsurface, as well, and
don't free the surface when we destroy the MetaWindow.
2013-12-03 11:45:50 -05:00
Jasper St. Pierre
602307e694
Revert "pointer: Remove focus listener"
...
This reverts commit a8ac2cc275
.
2013-12-03 11:45:50 -05:00
Jasper St. Pierre
b2c18c4a78
Revert "keyboard: Remove focus listener"
...
This reverts commit 0ac142d39e
.
2013-12-03 11:45:50 -05:00
Jasper St. Pierre
1e211722c7
wayland-surface: Set popups transient to their parents
2013-12-03 11:45:50 -05:00
Rui Matos
461f74ef18
wayland: Fix setting keyboard/pointer focus for new clients
...
When we have a new client, we potentially set the focus on one of its
surfaces when we map it but the client might not have called
wl_seat.get_keyboard/pointer yet. When it finally calls
get_keyboard/pointer we must then register its resource as the
focus_resource which means that we can only return early if
focus_resource is already set.
https://bugzilla.gnome.org/show_bug.cgi?id=719725
2013-12-03 15:56:15 +01:00
Rui Matos
3f022ca963
window: Possibly set the pointer focus on newly mapped wayland windows
...
Windows showing up under the pointer must get the pointer focus.
https://bugzilla.gnome.org/show_bug.cgi?id=719725
2013-12-03 15:56:15 +01:00
Rui Matos
20e92c5a72
wayland: Set the clutter stage focus when we focus a window
...
Otherwise clutter events don't have their source actor properly set
and we aren't able to determine the MetaWindow to which a given
keybinding applies.
https://bugzilla.gnome.org/show_bug.cgi?id=719724
2013-12-03 13:58:27 +01:00
Jasper St. Pierre
0850da44d7
shaped-texture: Prevent a critical when setting a NULL cogl texture
2013-12-02 21:34:23 -05:00
Lionel Landwerlin
37ba264190
compositor: meta-surface-actor: upload texture changes at the correct position
...
https://bugzilla.gnome.org/show_bug.cgi?id=719695
2013-12-02 16:41:29 +00:00
Colin Walters
6c12c928df
compositor: Update to latest cogl API
...
See https://git.gnome.org/browse/cogl/commit/?id=c76c1d136d2cac7f3d1331a4d1dc0dd0f06e812c
https://bugzilla.gnome.org/show_bug.cgi?id=719557
2013-11-29 11:08:51 -05:00
Rico Tzschichholz
9c5733caf0
prefs: Properly add new META_KEYBINDING_ACTION_* value
...
In addition to 4373916d9d
(cherry picked from commit 3b2506851c
)
2013-11-29 16:33:42 +01:00
Rico Tzschichholz
21d8b8310a
window: Proper argument naming for meta_window_client_rect_to_frame_rect
...
(cherry picked from commit 9b88059e55
)
2013-11-29 16:33:37 +01:00
Rico Tzschichholz
c46af91d54
window: Fix deprecated version of get_outer_rect
...
(cherry picked from commit 59168b2c64
)
2013-11-29 16:32:15 +01:00
Jasper St. Pierre
d44574f738
wayland-surface: Process damage even if the buffer didn't change
2013-11-26 12:32:41 -05:00
Jasper St. Pierre
a9424255a5
wayland-surface: Add support for subsurfaces
...
The state for a subsurface isn't double-buffered yet, though...
2013-11-25 18:33:03 -05:00
Jasper St. Pierre
5089a63d76
wayland-surface: Create the surface actor ourselves
...
Otherwise, we can't rely on a surface_actor being around to add
ourselves to...
2013-11-25 18:29:58 -05:00
Jasper St. Pierre
f9a2c64460
wayland-surface: Don't require a MetaWindow to process damage...
...
and ClutterActor will clip to the actor bounds, anyway...
2013-11-25 18:15:20 -05:00
Jasper St. Pierre
7841042a85
wayland-surface: Restructure code flow in wl_surface_attach a bit more...
2013-11-25 18:15:20 -05:00
Jasper St. Pierre
ea1b8cdc22
wayland-surface: Fix copy/paste typo
2013-11-25 18:15:19 -05:00
Jasper St. Pierre
52b48cfbef
wayland-surface: Return after posting errors back to the client
2013-11-25 18:15:03 -05:00
Jasper St. Pierre
644f3e1275
window: Make setters for shape/input/opaque regions private again
...
Wayland now pushes these to the surface actor rather than the toplevel
MetaWindow...
2013-11-25 17:25:56 -05:00
Jasper St. Pierre
304005e04f
wayland-surface: Replace MetaWindowActor with MetaSurfaceActor
...
Since subsurfaces won't have toplevel MetaWindowActors, we need to
use MetaSurfaceActor instead. These are embedded in the MetaWindowActor,
just like MetaShapedTexture was (in fact, MetaSurfaceActor now contains
a MetaShapedTexture)
2013-11-25 17:25:55 -05:00
Jasper St. Pierre
025ab35af7
surface-actor: Add setters for set_input_region / set_opaque_region
...
Subsurfaces won't have a MetaWindow or MetaWindowActor to fetch these from,
so they need to be tied directly to the MetaSurfaceActor.
2013-11-25 17:25:47 -05:00
Jasper St. Pierre
a27744503b
shaped-texture: Make Cullable
...
Make MetaWindowActor chain up to the generic default MetaCullable
implementation, and remove the helper methods for MetaSurfaceActor
and MetaShapedTexture.
2013-11-25 17:25:47 -05:00
Jasper St. Pierre
1011331caf
cullable: Use relative actor coordinates for culling
...
This ensures that nested cullables work fine.
2013-11-25 17:25:47 -05:00
Jasper St. Pierre
0ccef81789
wayland-surface: Rework flow control for wl_surface_commit
2013-11-25 17:25:46 -05:00
Jasper St. Pierre
4780f74a40
wayland-surface: Properly allow setting the cursor to a NULL buffer
2013-11-25 17:18:22 -05:00
Jasper St. Pierre
57866fb267
wayland-surface: Don't rewrite input/opaque regions if the client doesn't attach any
2013-11-25 17:18:22 -05:00
Jasper St. Pierre
d3bc7570d0
window-actor: Update the shape region when the surface actor changes size
2013-11-25 17:18:22 -05:00
Jasper St. Pierre
74e43a4702
cullable: Turn cull_out / reset_culling into a separate interface
...
Instead of hardcoded knowledge of certain classes in MetaWindowGroup,
create a generic interface that all actors can implement to get parts of
their regions culled out during redraw, without needing any special
knowledge of how to handle a specific actor.
The names now are a bit suspect. MetaBackgroundGroup is a simple
MetaCullable that knows how to cull children, and MetaWindowGroup is the
"toplevel" cullable that computes the initial two regions. A future
cleanup here could be to merge MetaWindowGroup / MetaBackgroundGroup so
that we only have a generic MetaSimpleCullable, and move the "toplevel"
cullability to be a MetaCullableToplevel.
https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:21:36 -05:00
Jasper St. Pierre
0764b2058a
window-actor: Move the operations we need to do when we cull out here
...
Soon, we'll move this into a generic MetaCullable interface, but for
now, just put hardcoded knowledge in MetaWindowGroup.
https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:19:08 -05:00
Jasper St. Pierre
7a787d7946
window-group: Decompose culling operations into two methods
...
This also fixes a bug in the translation of clip_region.
We will add an interface for this soon, so we can recursively cull like this...
https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:18:09 -05:00
Jasper St. Pierre
eec0f5df47
display: Fix logic for determining whether our focus was successful
...
In some cases, we can focus the frame window instead of the client
window, so make sure that our checks include that as well.
https://bugzilla.gnome.org/show_bug.cgi?id=715030
2013-11-25 15:14:18 -05:00
Rui Matos
ba3968a822
keybindings: Fix typo in port to Clutter events
...
We always want to trigger on key press.
2013-11-25 14:15:28 +01:00
Rui Matos
762fa0e116
compositor: Also redirect windows in wayland compositor mode
...
XWayland was doing this for us but now it isn't anymore.
2013-11-25 12:00:55 +01:00
Jasper St. Pierre
0be57b621b
window-actor: Fix a copy/paste typo
2013-11-21 17:35:52 -05:00
Jasper St. Pierre
7d88b3593b
surface-actor: Remove unused field
2013-11-21 17:29:41 -05:00
Jasper St. Pierre
858db7081a
background-group: Fix cast warning
2013-11-21 15:14:40 -05:00
Jasper St. Pierre
5af7f619c8
background-group: Use the Clutter iteration APIs
2013-11-21 14:24:32 -05:00
Jasper St. Pierre
e5e35e5a7f
background-group: Remove some unnecessary cruft
2013-11-21 14:24:32 -05:00
Jasper St. Pierre
6d639ac528
window: Support pinging Wayland surfaces as well
2013-11-21 14:24:04 -05:00
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
8a3501ffe1
xwayland: Fix a couple of small leaks
...
https://bugzilla.gnome.org/show_bug.cgi?id=712833
2013-11-21 19:22:26 +01: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
a37a8c6497
wayland-surface: Fix transient_for
...
It takes a wl_surface resource, not an xdg_shell_surface resource,
and the argument is allowed to be NULL.
2013-11-21 13:09:21 -05:00
Jasper St. Pierre
ebf6862a10
wayland-surface: Don't mark popup windows as override-redirect
2013-11-21 13:09:21 -05: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
1c0e6f26e2
mutter-launch: Don't test the argument name to validate launching things
...
Somebody could do:
$ mv my-evil-program mutter-wayland
$ PATH=.:$PATH mutter-launch mutter-wayland
It's not secure, and it's hard to test with, so just drop it for now
We'll be relying on logind to hand us permissions in the future.
2013-11-20 17:07:03 -05:00
Jasper St. Pierre
f4fc498e65
wayland-surface: Properly destroy extension resources on the destroy request
...
Otherwise, the resource IDs will linger around and be destroyed again
on client close...
2013-11-19 23:34:03 -05:00
Jasper St. Pierre
a8632c2546
Revert "wayland-surface: Allow extension resources to be double-destroyed"
...
This reverts commit 2ebecc5370
.
2013-11-19 23:34:03 -05:00
Jasper St. Pierre
600a0f836f
keyboard: Don't send leave events to dying surfaces
2013-11-19 20:26:28 -05:00
Jasper St. Pierre
0ac142d39e
keyboard: Remove focus listener
2013-11-19 20:26:28 -05:00
Jasper St. Pierre
abd368be00
pointer: Don't send leave events to dying surfaces
...
It's invalid and will crash the client.
2013-11-19 20:26:03 -05:00
Jasper St. Pierre
a8ac2cc275
pointer: Remove focus listener
...
It's added too late to matter -- by the time we've destroyed the
resource, we've already repicked and re-set the focus.
2013-11-19 20:26:03 -05:00
Jasper St. Pierre
2f14b5cc3f
wayland: Set a log handler
...
To see error messages and such
2013-11-19 20:26:02 -05:00
Jasper St. Pierre
2930612e64
pointer: Remove dead and incorrect code
...
Now that we can never pick a destroying actor, we can remove these
bad asserts.
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
2952d3671d
window-actor: Set as unreactive when hiding
...
This means that we should never pick the actor when it's being destroyed.
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
1b5ace8256
window-actor: Don't set ourselves as reactive twice
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
2ebecc5370
wayland-surface: Allow extension resources to be double-destroyed
...
As they will be on shutdown... I'm not sure if this is a wayland-server
bug or not, but we should guard against it anyway.
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
02144d17e9
wayland-surface: Fill in the maximized/fullscreen hints to the configure event
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
594b15abf1
pointer: Fix crash when we have the pointer over nothing during a popup grab
2013-11-19 18:51:30 -05:00
Jasper St. Pierre
bbe3641844
wayland-surface: Add support for xdg_popup
2013-11-19 18:44:21 -05:00
Jasper St. Pierre
0cc5cf940b
wayland-surface: Remove some properties from the double-buffered state
...
Now that we can always set them on the MetaWindow...
2013-11-19 18:44: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
be744775c1
wayland-surface: Support xdg_surface.destroy
...
Cool.
2013-11-19 17:48:19 -05:00
Jasper St. Pierre
5959457c73
wayland-surface: Embed MetaWaylandSurfaceExtension in MetaWaylandSurface
...
This makes it easier to support xdg_surface.destroy, which we're
going to add support for next commit...
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