1
0
Fork 0
Commit graph

1802 commits

Author SHA1 Message Date
Jonas Ådahl
14b0a83f64 Don't calculate the main window monitor every time it`s needed
The main monitor of a window is maintained as 'window->monitor' and is
updated when the window is resized or moved. Lets avoid calculating it
every time it`s needed.

https://bugzilla.gnome.org/show_bug.cgi?id=744934
2015-07-16 11:54:14 +08:00
Jasper St. Pierre
4d3419607a window: Don't reference a dead function
meta_window_move_resize has been gone for a while now.
2015-07-06 00:52:49 -07:00
Jasper St. Pierre
9f04c58ffe Implement a generic "size change" mechanism
A much less hacky version of maximize / unmaximize is reimplemented
in terms of this, but it could also eventually be used for fullscreen /
unfullscreen, and tile / untile.
2015-07-05 23:03:36 -07:00
Jasper St. Pierre
8979e52a6c Install enum types 2015-07-05 22:01:59 -07:00
Jasper St. Pierre
1ea8efdeda stack: Don't prefer windows in the same group as not_this_one
The only time we ever execute this code is when we're minimizing or
hiding a window, in which case we should respect stacking order.

This fixes weird "bugs" where windows from the same app magically pop up
over other windows.
2015-07-05 14:33:08 -07:00
Jasper St. Pierre
a3fbbaabe8 delete: Remove old code
It doesn't compile
2015-07-05 14:29:56 -07:00
Jasper St. Pierre
91b7dedf36 Remove the ability to grab resize unmaximize
This is an extremely niche feature, and conflicts with the rest of our
interface being consistent about not allowing resizing while tiled or
maximized.
2015-07-01 16:27:19 -07:00
Florian Müllner
6c05eb583e stack: Don't try to focus hidden windows
A window may be hidden even if not minimized itself, for instance
when an ancestor is minimized. As meta_window_focus() will refuse
to actually focus the window in that case, don't pick it in the first
place.

https://bugzilla.gnome.org/show_bug.cgi?id=751715
2015-06-30 15:06:56 +02:00
Jasper Lievisse Adriaanse
3fe281ada9 Prevent redefinition of MetaKeyCombo
Fixes bug 747326
2015-06-26 21:40:44 -07:00
Jasper St. Pierre
d74b0d5be8 window: Clear the frame borders before calculating the unfullscreen rect
Going from fullscreen to unfullscreen involves a frame border size, so
in order to properly interpret the saved rect size, we need to make sure
that the frame borders are fully up to date.
2015-06-23 17:05:27 -07:00
Ting-Wei Lan
6b82f61dba build: Fix non-wayland build
This fixes error introduced in 09120132ef.

https://bugzilla.gnome.org/show_bug.cgi?id=750552
2015-06-23 16:37:40 -07:00
Jasper St. Pierre
7f3ada7831 xprops: Some more cardinal-related hygiene 2015-06-23 15:32:07 -07:00
Jasper St. Pierre
92d6a69153 xprops: Fix more gulong / 64-bit fallout from the xcb port 2015-06-23 15:09:32 -07:00
Carlos Garnacho
09120132ef core: Refrain from showing wayland windows when we don't have a buffer yet
The "calc showing" operation is queued in a few places alongside MetaWindow
creation, we should be ignoring these until there is a buffer to show.

https://bugzilla.gnome.org/show_bug.cgi?id=750552
2015-06-16 20:35:25 +02:00
Jasper St. Pierre
4d80a4cc31 Use more g_autofoo throughout mutter 2015-05-29 17:18:35 -07:00
Rui Matos
b39c00f344 window: Fix meta_window_set_alive() not working if first ping fails
window->is_alive isn't initialized explicitly so it defaults to FALSE
meaning that if the first ping fails we'd short circuit and not show
the delete dialog as we should.

We could initialize the variable to TRUE but in fact we don't even
need the variable at all since our dialog management is enough to
manage all the state we need, i.e. we're only interested in knowing
whether we're already displaying a delete dialog.

This does change our behavior here since previously we wouldn't
display the dialog again if the next ping failed after the dialog is
dismissed but this was arguably a bug too since in that case there
wouldn't be a way to kill the window after waiting for a while and the
window kept being unresponsive.

https://bugzilla.gnome.org/show_bug.cgi?id=749711
2015-05-22 16:53:42 +02:00
Rui Matos
d478d8f143 core/events: Invalidate monitor cache when we're a wayland compositor
When running as an X11 compositor we do this for every event we see on
the X event stream. As a wayland compositor we don't go through that
code path but since we see all events we can easily do this on motion
events.

In fact, we don't even need this caching when we're a wayland
compositor since we can always find where the pointer is without a
round trip but we're sharing the current monitor logic with the X
path so let's keep it as is for now.

https://bugzilla.gnome.org/show_bug.cgi?id=748478
2015-04-30 14:01:23 +02:00
Jasper St. Pierre
0de3869656 core: Remove unused function 2015-04-27 18:14:15 -07:00
Jasper St. Pierre
9f13033f15 window-wayland.[ch] => meta-window-wayland.[ch]
This finishes off the meta- prefix for wayland/.
2015-04-27 18:09:16 -07:00
Jasper St. Pierre
ca6e799b97 Move atomnames.h to x11/
This should *not* be part of the public API.
2015-04-27 16:36:56 -07:00
Rui Matos
d62c595e51 events: Ignore some event types when reseting idle time
These events don't result from actual hardware events so we shouldn't
use them to reset idle time.

https://bugzilla.gnome.org/show_bug.cgi?id=748541
2015-04-27 19:44:58 +02:00
Florian Müllner
2e3086e2aa screen: Add public method to get neighboring monitor
The existing private get_monitor_neighbor() function returns a
MetaMonitorInfo, which is private as well. Add a public wrapper
that returns a monitor index instead, as we do for other public
monitor-related methods.

https://bugzilla.gnome.org/show_bug.cgi?id=633994
2015-04-14 23:13:19 +02:00
Jasper St. Pierre
f3fecd478d frame: Always use the client window's visual for our frame
Since the frame is the window that's redirected, there's no reason for
it to match the root window. There *is*, however, a big incentive to
match the window's visual, since not doing so might trigger automatic
redirection.

On a specific platform, we construct a depth-32 root window, and stick a
depth-24 child window inside it. The frame ends up being created
depth-32, not depth-24, so we get automatic redirection.
2015-04-01 15:02:20 -07:00
Ray Strode
9f17c05a15 wayland: manually activate/deactivate stage when taking/dropping grab
clutter currently never emits activated or deactivated signals on
the stage object when using the EGL backend. Since the stage never
gets activated, accessibility tools, like orca, don't work.

This commit makes mutter take on the responsibility, by tracking
when the stage gains/loses focus, and then synthesizing stage
CLUTTER_STAGE_STATE_ACTIVATED state events.

A limitation of this approach is that clutter's own notion of
the stage activeness won't reflect mutter's notion of the
stage activeness.  This isn't a problem, in practice, and can
be addressed in the medium-term after making changes to
clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=746670
2015-03-28 11:20:48 -04:00
Giovanni Campagna
a13f906ed1 prefs: connect to changed:: before reading the value of a setting
Otherwise glib might skip registering to change notifications

https://bugzilla.gnome.org/show_bug.cgi?id=746509
2015-03-27 13:15:30 -07:00
Jasper St. Pierre
4fc684b2ed window: Don't use C++-style comments 2015-03-14 16:03:44 -07:00
Carlos Garnacho
d63b9a1797 core: Unset all input events on the GDK connection
With all input events being handled through clutter, this only confuses
things, and most nominally, coerces touch events through places we didn't
intend to, like the window frame.

This makes again all touch events only handled in the passive grab on X11,
while the rest stays pointer (emulated) only.

https://bugzilla.gnome.org/show_bug.cgi?id=745335
2015-03-14 16:03:44 -07:00
Carlos Garnacho
a30ca3e62f core: Update cursor visibility on display events
https://bugzilla.gnome.org/show_bug.cgi?id=712775
2015-03-13 21:01:11 +01:00
Jasper St. Pierre
0bc6cb2aeb window: Remove the legacy get_outer_rect
It's unused in gnome-shell, and we don't care about compatibility in the
API. Don't expose it.
2015-03-08 20:38:30 -07:00
Jonas Ådahl
fffb863f37 wayland: Sync surface actor state when changing main monitor
In order to switch to the correct surface actor scale given the monitor
the surface is on, without relying on the client committing a new state
given some other side effect, sync the surface actor state when the main
monitor associated with the corresponding window changed.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Ray Strode
96b202c80d wayland: add keybindings for VT8-VT12
We currently only support switching to 1-7.
This commit brings us parity with X, and let's
us switch to all 12.

https://bugzilla.gnome.org/show_bug.cgi?id=744800
2015-02-19 16:42:58 -05:00
Jasper St. Pierre
0ac2f61a2c screen: Don't map the COW on Wayland
This is unnecessary, and since we don't shape it, we get a giant input
window covering the rest of our windows.
2015-02-18 12:42:32 -08:00
Rui Matos
3f2d658f20 monitor-manager: Expose MetaMonitorManager to introspection
This just exposes the type and the singleton getter necessary to make
it available to introspection. We'll expose more functionality as it
becomes needed.

https://bugzilla.gnome.org/show_bug.cgi?id=743745
2015-01-30 13:13:49 -05:00
Jasper St. Pierre
05353c1f7e frame: Don't redraw immediately when we resize
We're locked to frame sync anyway, so it doesn't make sense to try to
redraw early. In casual testing, this seems to actually make things
faster, as well.
2015-01-30 13:13:49 -05:00
Florian Müllner
a2ff8f4e1e stack: Fix a leak 2015-01-21 14:52:55 +01:00
Rui Matos
764c3dd137 display: Fix moving grab op check
We were regarding META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN as a move.

https://bugzilla.gnome.org/show_bug.cgi?id=743254
2015-01-20 17:49:27 +01:00
Jasper St. Pierre
d561b3b18f frames: Clutterify frame event handling
This lets us remove our horrible X11-based, GDK-based hacky frame event
handling in favor of a more sane one in Clutter.
2015-01-19 21:56:08 -08:00
Florian Müllner
b91461ee39 place: Fix workspace check when collecting relevant windows
When looking for space to place a new window, other non-minimized
windows on the same workspace should be taken into account. However
the current check does not work correctly when the placed window is
located on all workspaces, so handle that case explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=743217
2015-01-20 00:00:32 +01:00
Jonas Ådahl
db384a656c backends/native: Implement support for pointer barriers
When running as a dispay server pointer barriers are a server side
feature and requires no client interaction of any sort. This patch
implements pointer barriers that can be used when running as a display
server on the native backend. Running as a display server using the X11
backend is currently not supported.

https://bugzilla.gnome.org/show_bug.cgi?id=706655
2015-01-19 02:27:59 -08:00
Jasper St. Pierre
5c66bee84b display: Remove ungrab_should_not_cause_focus_window
It's been unused ever since we removed tabpopup.c
2015-01-17 17:55:36 -08:00
Jonas Ådahl
5f91a62f6f barriers: Separate implementation from public API
This patch removes the X11 specific code from MetaBarrier and creates an
abstraction layer MetaBarrierImpl. The existing X11 implementation is
moved to a new GObject MetaBarrierImplX11 implementing the abstract
interface MetaBarrierImpl which is instantiated by MetaBarrier when
supported.

While at it, move it to backends/ and properly name the files.

https://bugzilla.gnome.org/show_bug.cgi?id=706655
2015-01-17 17:22:57 -08:00
Jonas Ådahl
152b2dab59 barrier: Make X related hook more clearly named
https://bugzilla.gnome.org/show_bug.cgi?id=706655
2015-01-17 17:22:56 -08:00
Rui Matos
0484ef142d MetaWindow: Change icon properties to be of pointer type
Follow up to commit af7f51b992 .

https://bugzilla.gnome.org/show_bug.cgi?id=742824
2015-01-13 16:01:13 +01:00
Jasper St. Pierre
5c60ea6635 keybindings: Consistently use slice allocation for MetaKeyBinding 2015-01-09 14:15:17 -08:00
Jasper St. Pierre
9abcf424b8 prefs: Remove per_window flag from MetaKeyPref
It's unused.
2015-01-09 14:15:17 -08:00
Jasper St. Pierre
cc7af83f8a prefs: Correct the MetaPreference value for workspace names 2015-01-09 14:15:17 -08:00
Jasper St. Pierre
a1d8110221 keybindings: Merge rebuild_binding_index into reload_combos
The two are always called at the same time.
2015-01-08 14:36:47 -08:00
Jasper St. Pierre
9d6357f05a keybindings: Rename MetaKeyDevirtCombo to MetaResolvedKeyCombo
rtcm thought this was less awkward of a name.
2015-01-08 14:36:47 -08:00
Jasper St. Pierre
5bc2bcd109 keybindings: Simplify our keycode/mask pairs with MetaKeyDevirtCombo 2015-01-06 19:24:29 -08:00
Jasper St. Pierre
d12390002a keybindings: Have meta_change_keygrab take a MetaKeyDevirtCombo 2015-01-06 19:13:03 -08:00