1
0
Fork 0
Commit graph

912 commits

Author SHA1 Message Date
Bastien Nocera
56fb8a81b3 display: Export the timestamp of the event as well
When passing on keybindings, make sure to pass the timestamp
of the event as well as the deviceid and the action.

https://bugzilla.gnome.org/show_bug.cgi?id=704858
2013-07-25 14:23:51 +02:00
Jasper St. Pierre
b0cf0b2442 display: Fix compilation error
Whoops, I didn't mean to push that last commit, but let's
not break the build.
2013-07-17 21:04:55 -04:00
Jasper St. Pierre
1c569c2d0e Remove application-based preference
It's hardcoded to FALSE.
2013-07-17 21:03:59 -04:00
Jasper St. Pierre
21fe5be026 display: Ignore _NET_WM_USER_TIME PropertyNotifies
These are spammy as well.

https://bugzilla.gnome.org/show_bug.cgi?id=703970
2013-07-15 12:47:46 -04:00
Jasper St. Pierre
57bc974a57 display: Ignore XSyncAlarmNotify in meta_spew_event
https://bugzilla.gnome.org/show_bug.cgi?id=703970
2013-07-15 12:47:46 -04:00
Florian Müllner
2103ff6a5c window: Don't force attached dialogs to be border-only
Originally attached dialogs did not have a titlebar, which the code
still assumes though it hasn't been true for a while; nowadays, the
actual look of attached dialogs is controlled by the theme.
As GTK+ recently gained the ability to set custom titlebars, we need
to support attached dialogs with either full borders (WM decorations)
or border-only (GTK+ titlebar).
Just remove the left-over assumption to make it work as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=702764
2013-06-24 20:19:33 +02:00
Adel Gadllah
8ab136b7ea window: Make sure override_redirect window have correct monitor info
We need to update window->monitor on override_redirect windows as well, other
wise they may end up with an invalid struct which triggers and assert when
meta_window_is_monitor_sized is called.

https://bugzilla.gnome.org/show_bug.cgi?id=702564
2013-06-24 17:32:22 +02:00
Adel Gadllah
5205821fb9 window: Reuse current pointer position for monitor checks
Avoid a round trip to the xserver we already have the current position
anyway. Querying from the server on every move can cause the compositor to
stall during movement.
2013-06-23 21:24:41 +02:00
Adel Gadllah
7187206ef5 screen: Allow reusing the current position when quering the monitor
Add new api (meta_screen_get_current_monitor_for_pos and
meta_screen_get_current_monitor_info_for_pos) that allow querying the monitor
without a roundtrip by reusing the passed in cursor position.
2013-06-23 21:24:41 +02:00
Jasper St. Pierre
96221e6c04 compositor: Add an API to query if the stage is focused
gnome-shell needs to know whether the stage window is focused so
it can synchronize between stage window focus and Clutter key actor
focus. Track all X windows, even those without MetaWindows, when
tracking the focus window, and add a compositor-level API to determine
when the stage is focused.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-06-20 17:21:54 -04:00
Jasper St. Pierre
7fdfbad6d4 display: Ensure that we ignore our own focus events for focus predictions
When we set the input focus, we first set the predicted window,
and then try to process focus events. But as XI_FocusOut on the
existing window comes before XI_FocusIn on the new window, we'll
see the focus out on the old window and think the focus is going
to nothing, which makes mutter think the prediction failed.

This didn't really matter as nothing paid attention to the focus
window changing, but with gnome-shell's focus rework, we'll try
and drop keyboard focus in events like these.

Fix this by making sure that we ignore focus window changes of our
own cause when updating the focus window field, by ignoring all
focus events that have a serial the same as the focus request or
lower. Note that if mutter doens't make any requests after the
focus request, this could be racy, as another client could steal
the focus, but mutter would ignore it as the serial was the same.
Bump the serial by making a dummy ChangeProperty request to a
mutter-controlled window in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=701017
2013-06-20 17:21:54 -04:00
Rui Matos
c119f98bac keybindings: Make sure events are always reported to the grab window
We have no need for normally reported events during grabs. In fact, it
might be harmful. A plugin might grab the keyboard through
meta_begin_modal_for_plugin() and then expect events to be reported to
the grab window they provide. If meanwhile this XIGrabDevice is
issued, events might start being reported normally to one other of our
windows breaking the plugin event processing.

In particular, on an empty workspace, we set input focus to our
no_focus_window. Then, if gnome-shell calls
meta_begin_modal_for_plugin() and meta_display_freeze_keyboard(), in
that order, input events will start being reported to no_focus_window.

There are two issues with this. One is that no_focus_window isn't
selecting for XI input events and thus the server discards them
completely. But even if that is fixed, events being reported to any
window other than the one gnome-shell expects - the clutter stage
window - means that events will stop reaching it.

https://bugzilla.gnome.org/show_bug.cgi?id=701219
2013-05-29 21:36:09 +02:00
Rui Matos
2af49e503f keybindings: Grab and emit a signal when XK_ISO_Next_Group is pressed
This will make it possible to implement input source switching in
gnome-shell using the popular modifiers-only keybinding that's
implemented on the X server through an XKB option.

https://bugzilla.gnome.org/show_bug.cgi?id=697002
2013-05-27 13:56:04 +02:00
Rui Matos
6ea6af6eb4 prefs: Track the XKB 'grp:' option in gsettings as a keybinding pref
We'll use the value of this option to establish a passive grab on the
keycode/modifier combos generating XK_ISO_Next_Group.

https://bugzilla.gnome.org/show_bug.cgi?id=697002
2013-05-27 13:55:57 +02:00
Rui Matos
10df80762c keybindings: Add API to freeze/unfreeze the keyboard
We'll use this in gnome-shell to freeze the keyboard right before
switching input source and unfreeze it after that's finished so that
we don't lose any key events to the wrong input source.

https://bugzilla.gnome.org/show_bug.cgi?id=697001
2013-05-27 13:55:52 +02:00
Rui Matos
f86032d700 prefs: Fix binding remaining grabbed after clearing all strokes
If a binding is updated with a clear set of strokes (effectively
disabling it) we aren't signaling that the binding changed and thus
the previous strokes will continue to be grabbed.

This fixes that and tries to do a better effort at checking if the
binding changed or not.

https://bugzilla.gnome.org/show_bug.cgi?id=697000
2013-05-27 13:55:33 +02:00
Jasper St. Pierre
bd19de9429 compositor: Add an API to focus the stage X window
gnome-shell has traditionally just called XSetInputFocus when wanting to
set the input focus to the stage window, but this might cause strange,
hard-to-reproduce bugs because of an interference with mutter's focus
prediction. Add API to allow gnome-shell to focus the stage window that
also updates mutter's internal focus prediction state.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-24 17:43:37 -04:00
Jasper St. Pierre
2ca2838548 display: Consolidate code calling XSetInputFocus into a new function
At the same time, rename set_focus_window and add a comment so we're
not confused about which function does what.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-24 17:43:37 -04:00
Jasper St. Pierre
df8234c5e3 window: Properly handle focusing override redirect windows
If an app pops up an OR window and sets input focus to it, like
Steam does, we'll think the focus window is null, causing us to
think the app is not focused.

OR windows should not be special if they get input focus, where
the input focus would be set to NULL. Instead, the window should
be marked as focused.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 13:46:15 -04:00
Jasper St. Pierre
d03ffd801e display: Use XI2 constants for mode/detail focus event values
This makes no functional difference, except conceptual clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 13:46:15 -04:00
Dan Winship
7a4c808e43 display: clean up focus_window vs expected_focus_window
Mutter previously defined display->focus_window as the window that the
server says is focused, but kept display->expected_focus_window to
indicate the window that we have requested to be focused. But it turns
out that "expected_focus_window" was almost always what we wanted.

Make MetaDisplay do a better job of tracking focus-related requests
and events, and change display->focus_window to be our best guess of
the "currently" focused window (ie, the window that will be focused at
the time when the server processes the next request we send it).

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 13:46:15 -04:00
Jasper St. Pierre
e430e051b7 window: Clean up the set_focused_internal function
Move things out of an indentation layer, and reshuffle
things around.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 12:35:04 -04:00
Jasper St. Pierre
696d9d2fa9 window: Merge got_focus/lost_focus to a new function
Make it a static function for now, but this will be a private
function soon, replacing meta_window_lost_focus. This should
contain no functional changes, only cosmetic indentation changes,
so best viewed with ignorews=1 or -w or -b, you know the drill.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 12:35:04 -04:00
Jasper St. Pierre
f6dd081acd window: Refactor "got focus" code
Just move this out to a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 12:35:04 -04:00
Jasper St. Pierre
a487d4dd01 window: Eliminate a potential race condition with _NET_WM_MOVERESIZE
Clients using _NET_WM_MOVERESIZE to start a drag operation may encounter
a race condition if the user presses and releases a mouse button very
fast, getting "stuck" in a grab state. While this is easily fixed with
the user pressing the button or hitting Escape as the EWMH spec suggests,
its's still a bit of annoyance for users.

After starting a grab operation, check that the button is actually pressed
by the client, and if not, cancel the grab operation. This prevents the
stuck grab in a race-free way, although it requires an extra round-trip
to the server.

With client-side decorations becoming more popular, the use of
_NET_WM_MOVERESIZE is on the rise, thus this bug is seen more frequently
than before.

https://bugzilla.gnome.org/show_bug.cgi?id=699777
2013-05-14 14:46:20 -04:00
Florian Müllner
c2ecdd0524 prefs: Add support for string-array preferences
As we only had one string-array preference so far, we didn't bother
with adding a generic way to handle string-array preferences, and
just handled the preference in question explicitly. However we are
going to parse another string-array setting, so generalize the
existing code to make it reusable for that case.

https://bugzilla.gnome.org/show_bug.cgi?id=700223
2013-05-13 22:15:13 +02:00
Jasper St. Pierre
50b9042ac2 window: Add an accessor for whether the window can close
The shell will use this to determine whether to show a close
button in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=699269
2013-05-09 15:34:37 -04:00
Pavel Vasin
970a446bd8 window: Add missing chain-up for finalize()
https://bugzilla.gnome.org/show_bug.cgi?id=698710
2013-04-29 14:58:31 +02:00
Pavel Vasin
5b6621811c barrier: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=698710
2013-04-29 14:58:28 +02:00
Simon McVittie
c2a9ccb7e2 Let the UI layer (via the core) construct the frame mask
This essentially just moves install_corners() from the compositor, through
the core, into the UI layer where it arguably should have been anyway,
leaving behind stub functions which call through the various layers. This
removes the compositor's special knowledge of how rounded corners work,
replacing it with "ask the UI for an alpha mask".

The computation of border widths and heights changes a bit, because the
width and height used in install_corners() are the
meta_window_get_outer_rect() (which includes the visible borders but not
the invisible ones), whereas the more readily-available rectangle is the
MetaFrame.rect (which includes both). Computing the same width and height
as meta_window_get_outer_rect() involves compensating for the invisible
borders, but the UI layer is the authority on those anyway, so it seems
clearer to have it do the calculations from scratch.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-04-17 13:35:06 +01:00
Stef Walter
4608cb6027 Fix use of uninitialized variables
If mutter is going to -Werror by default, then it can play footloose
and fancy free with this sorta stuff.

https://bugzilla.gnome.org/show_bug.cgi?id=698179
2013-04-17 11:58:43 +02:00
Rui Matos
c7dc6928a9 keybindings: Fix ungrabbing of keys
XUngrabKey() doesn't work for XI2 grabs and XI2 doesn't provide API
with similar functionality. As such, we have to refactor the code a
bit to be able to call XIUngrabKeycode() for each key binding, then
reload keybindings and finally grab the new ones.

https://bugzilla.gnome.org/show_bug.cgi?id=697003
2013-04-10 10:49:24 +02:00
Tomeu Vizoso
58496de595 Give a title to the MetaWorkspace page in the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=695935
2013-03-18 23:08:24 +01:00
Jasper St. Pierre
eefa62bcd4 screen: Fix a copy/paste error from the fullscreen tracking
This was causing a warning on shutdown.
2013-03-18 16:29:25 -04:00
Owen W. Taylor
8a33880c00 Don't configure a window before it responds to _NET_WM_SYNC_REQUEST
In 97a4cc8c, we accidentally lost the check that kept us from
sending multiple configures to a window before it responds to
_NET_WM_SYNC_REQUEST. So _NET_WM_SYNC_REQUEST stopped working
properly. Add a check back with the same effect.

https://bugzilla.gnome.org/show_bug.cgi?id=696091
2013-03-18 15:10:18 -04:00
Owen W. Taylor
7a8c45dda8 Handle spontaneous frames during a resize
During a resize, if we don't have a configure pending, then a counter
change shouldn't trigger anything other than the normal drawing:
it's just a spontaneous frame from the application. So don't try
to update the position or remove our timeout ID.

https://bugzilla.gnome.org/show_bug.cgi?id=696091
2013-03-18 15:10:18 -04:00
Owen W. Taylor
5ceffe86ee MetaScreen: Add tracking of whether there are fullscreen windows
Trying to track the fullscreen status outside of Mutter, as GNOME Shell
was doing previously, was very prone to errors, because Mutter has a
very tricky definition of when a window is set to be fullscreen and
*actually* acting like a fullscreen window.

 * Add meta_screen_get_monitor_in_fullscreen() and an
   ::in-fullscreen-changed signal. This allows an application to
   track when there are fullscreen windows on a monitor.

 * Do the computation of fullscreen status in a "later" function that
   runs after showing, so we properly take focus into account.

 * To get ordering of different phases right, add more values
   to MetaLaterType.

 * Add auto-minimization, similar to what was added to GNOME Shell
   earlier in this cycle - if a window is set to be fullscreen, but
   not actually fullscreen, minimize.

https://bugzilla.gnome.org/show_bug.cgi?id=649748
2013-03-18 13:05:22 -04:00
Florian Müllner
49df033b4e window: Remove obsolete code
Since the tile mode is now always reset on maximize(), this code
no longer does anything (not to mention that side-by-side tiled
windows haven't snapped back for a while now).

https://bugzilla.gnome.org/show_bug.cgi?id=682779
2013-03-18 16:43:08 +01:00
Florian Müllner
ac3465ffbb window: Reset tile-mode on maximization
We used to restore side-by-side tiling when unmaximizing, so we
kept the tile-mode during maximization. Since commit 10d53fc7d
there's no longer a good reason to do so, and it can result in
tile previews being shown erroneously on window drag operations
without motion (double-click on titlebar), so reset the tile
mode in maximize().

https://bugzilla.gnome.org/show_bug.cgi?id=682779
2013-03-18 16:43:08 +01:00
Florian Müllner
884ab602cb window: Force NORMAL layer for tile preview
The tile preview is expected to be shown underneath the focus window.
However the code that restacks the preview broke when override-redirect
windows were moved to a separate window group.
To fix, special-case tile previews to put them in the NORMAL layer.

https://bugzilla.gnome.org/show_bug.cgi?id=696053
2013-03-18 16:20:07 +01:00
Tomeu Vizoso
2efed44257 Add a meaningful name and description to all sections/files in the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=695641
2013-03-14 18:11:04 -04:00
Tomeu Vizoso
be46869782 docs: Fix cross-reference generation
https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 18:02:43 -04:00
Tomeu Vizoso
e0b698d365 Fix gobs of gtk-doc warnings
https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 18:02:43 -04:00
Tomeu Vizoso
edeac1de09 Remove meta_display_get_atom and MetaAtom
They aren't used and MetaAtom confused gtk-doc because it's defined
with a macro.

https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 17:56:36 -04:00
Tomeu Vizoso
9281a1c191 Escape a few < and > from the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 17:56:36 -04:00
Owen W. Taylor
97a4cc8c9b Make handling of windows that don't respond to _NET_WM_SYNC_REQUEST reliable
Previously, we were handling failure to respond to _NET_WM_SYNC_REQUEST
in the code path for throttling motion events. But this meant that
if a window didn't respond to _NET_WM_SYNC_REQUEST and there were no
motion events - for a keyboard resize, or after the end of the grab
operation - it would end up in a stuck state.

Use a separate per-window timeout to reliably catch the failure to respond
to _NET_WM_SYNC_REQUEST.

https://bugzilla.gnome.org/show_bug.cgi?id=694046
2013-03-14 08:01:28 -04:00
Owen W. Taylor
592374bc62 Fix freezing of windows with keyboard resizing
During resizing we froze window updates when configuring the
window, and unfroze the window updates when processing the
next resize. This wasn't absolutely reliable, because we might
not have a next resize. Instead tie window freezing more
directly to the current sync request value - a window is
frozen until it catches up with the last value we sent it
in _NET_WM_SYNC_REQUEST.

Testing with unresponsive clients showed that there was a bug
where window->disable_sync once set, would not actually disable
sync, but it *would* disable noticing that the client was
unresponsive for the next resize. Fix that by checking for
->disable_sync before sending _NET_WM_SYNC_REQUEST.

https://bugzilla.gnome.org/show_bug.cgi?id=694046
2013-03-14 07:59:57 -04:00
Adel Gadllah
381a9c2650 core: Remove the eventqueue
It is unused.

https://bugzilla.gnome.org/show_bug.cgi?id=695269
2013-03-06 09:17:12 +01:00
Owen W. Taylor
6e02fb80c4 Always send _NET_WM_FRAME_DRAWN for newly created windows
Send a _NET_WM_FRAME_DRAWN for each newly created window, as required
by the specification. This avoids a race where a window might be created
frozen but already unfrozen by the time we first see fetch the
counter value.

Remove a duplicate call to meta_compositor_set_updates_frozen() which
was called before the MetaWindowActor is created and hence did nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=694771
2013-03-04 15:36:13 -05:00
Pavel Vasin
98b0a37442 Free memory allocated by XIQueryPointer()
https://bugzilla.gnome.org/show_bug.cgi?id=695135
2013-03-04 19:07:23 +01:00
Ray Strode
377e2ed8a5 keybindings: filter overlay key even when not-modal
mutter currently only filters the overlay key through the shell
when there is a grab operation and that grab operation belongs to the
shell (because the shell is pushModal'd). This means the shell can't
filter out overlay key press events events at startup (since the shell
isn't normally modal).

This commit changes the code to always run the shell filtering code,
even when the shell is not modal.

https://bugzilla.gnome.org/show_bug.cgi?id=694837
2013-03-04 11:57:17 -05:00
Ray Strode
773ae8dc65 core: make session registration an explicit step
gnome-shell shouldn't announce to the session manager it's
"ready" until it's fully initialized.  It currently tells
the session manager it's ready as soon as it hits the main
loop. This causes nautilus in classic mode to start before
we have workspaces initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=694876
2013-03-01 11:30:07 -05:00
Florian Müllner
a39cabfadb keybindings: Add external grab API
During compositor grabs, all global keybindings that don't go
through mutter's keybinding system are blocked. To allow other
processes to make use of it, gnome-shell will expose a simple
grab API on DBus; for this, add API to grab key combos directly
instead of parsing accelerators stored in GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-03-01 16:11:43 +01:00
Florian Müllner
4df3e987c6 keybindings: Generalize mechanism to generate dynamic keybinding actions
https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-03-01 16:11:42 +01:00
Ray Strode
de36d51b91 screen: fix meta_screen_get_monitor_for_rect for 0x0 rects
meta_screen_get_monitor_for_rect will return the monitor that
a given rect belongs in (choosing the "best" monitor based on
overlap, if there are overlapping monitors).

It doesn't work with 0x0 rects, though.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=694725
2013-02-27 21:35:30 -05:00
Giovanni Campagna
e6d5e98c9d MetaWindow: fix annotation
caller-allocates makes sense only for structure, and gjs will complain
if used on anything else

https://bugzilla.gnome.org/show_bug.cgi?id=694801
2013-02-27 18:00:01 +01:00
Adel Gadllah
2a773e0c85 window: Add get_all_monitors
Add a method that returns the indices of the monitors a window
is on.

https://bugzilla.gnome.org/show_bug.cgi?id=646861
2013-02-25 22:05:42 +01:00
Ray Strode
2cafb8be2d window: fix meta_window_is_remote across hostname changes
meta_window_is_remote compares a cached copy of the system hostname
with the hostname of the client window
(as presented by the WM_CLIENT_MACHINE property).

Of course, the system hostname can change at any time, so caching
it is wrong. Also, the WM_CLIENT_MACHINE property won't necessarily
change when the system hostname changes, so comparing it with the
new system hostname is wrong, too.

This commit makes the code call gethostname() at the time
WM_CLIENT_MACHINE is set, check whether it's remote then, and cache
that value, rather than comparing potentially out of sync hostnames
later.

https://bugzilla.gnome.org/show_bug.cgi?id=688716
2013-02-20 16:02:10 -05:00
Ray Strode
64544fa0ed window: deduplicate is_remote logic
set_title_text does the equivalent of meta_window_is_remote on its
own.

This commit changes set_title_text to just use meta_window_is_remote.

https://bugzilla.gnome.org/show_bug.cgi?id=688716
2013-02-20 15:28:31 -05:00
Jasper St. Pierre
7e61ef0936 display: Don't put minimized windows at the back of alt-tab
Minimizing a window should not change its position in the alt-tab
list.

https://bugzilla.gnome.org/show_bug.cgi?id=693991
2013-02-18 13:11:55 -05:00
Adel Gadllah
e9709b7ff9 window: Add is_screen_sized method
Add a method that returns whether the window occupies
the whole screen (i.e all montiors).
2013-02-18 14:10:27 +01:00
Giovanni Campagna
027593faa5 Keybindings: reverse key combination read from settings
Window menus use the first key combination for a binding to show the
acceleration, so the list must be in the right configured order, which
is the opposite of what's built by g_slist_prepend()

https://bugzilla.gnome.org/show_bug.cgi?id=694045
2013-02-17 21:52:19 +01:00
Jasper St. Pierre
b0774d795c screen: Select for pointer events on the guard window
The guard window is effectively the background window, as it sits
in between live windows and minimized windows. This gives us a nice
easy place to allow users to allow users to right-click or long-press
on the wallpaper.

https://bugzilla.gnome.org/show_bug.cgi?id=681540
2013-02-17 15:43:38 -05:00
Adel Gadllah
a6a9d3f448 window: Add meta_window_is_monitor_sized
We duplicate this checks in multiple places so lets add this to
avoid code duplication.
2013-02-17 21:42:01 +01:00
Owen W. Taylor
d900d83522 MetaWindowActor: Go back to freezing affecting actor geometry
We do, in fact, need freezing to affect window geometry, so that
move-resize operations (such as an interactive resize from the
left, or a resize of a popup centered by the application) occur
atomically.

So to make map effects work properly, only exclude the initial
placement of a window from freezing. (In the future, we may want
to consider whether pure moves of a window being done in response
to a user drag should also be excluded from freezing.)

Rename meta_window_sync_actor_position() to
meta_window_sync_actor_geometry() for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=693922
2013-02-15 21:48:25 -05:00
Jasper St. Pierre
e8b0c11703 barrier: Add a time field to MetaBarrierEvent
This was used in gnome-shell, but last-minute changes and multiple
branch confusion on my part meant the field actually never got added.

https://bugzilla.gnome.org/show_bug.cgi?id=693854
2013-02-15 16:49:03 -05:00
Owen W. Taylor
3e38a48c40 meta_spew_xi2_event: fix crash-causing typo 2013-02-15 15:52:34 -05:00
Owen W. Taylor
5876f2e3e5 Fix corner cases where _NET_WM_FRAME_DRAWN might be missed
The WM spec requires _NET_WM_FRAME_DRAWN to *always* be sent when
there is an appropriate update to the sync counter value. We were
potentially missing _NET_WM_FRAME_DRAWN when an application did a
spontaneous update during an interactive resize and during effects.
Refactor the code to always send _NET_WM_FRAME_DRAWN, even when
a window is frozen.

https://bugzilla.gnome.org/show_bug.cgi?id=693833
2013-02-14 16:21:26 -05:00
Owen W. Taylor
aeb589c176 MetaWindow: fix detecting the response to an extended _NET_WM_SYNC_REQUEST
During resizing, An odd counter value (indicating the beginning of a frame)
shouldn't cause us to redraw and start a new frame, only an even counter
value. This was causing the frozen state for the window frame counter to
overlap the frozen state for the resize, causing the window not to be
updated.

https://bugzilla.gnome.org/show_bug.cgi?id=693833
2013-02-14 16:21:14 -05:00
Adel Gadllah
579bf2105e display: Pass timestamp to meta_display_end_grab_op
We need to pass the timestamp not the event detail to meta_display_end_grab_op

https://bugzilla.gnome.org/show_bug.cgi?id=690580
2013-02-13 18:32:57 +01:00
Owen W. Taylor
0503f6bb9a Consistently use meta_grab_op_is_resizing() for _NET_WM_SYNC_REQUEST
In different places we checked the grab op differently when determing
whether we are using _NET_WM_SYNC_REQUEST. This was somewhat covered
up previously by the fact that we only had a sync alarm when using
_NET_WM_SYNC_REQUEST, but that is no longer the case, so consistently
use meta_grab_op_is_resizing() everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:27 -05:00
Owen W. Taylor
87fe9685b5 Distinguish "no delay" frames from spontaneous drawing
When a client is drawing as hard as possible (without sleeping
between frames) we need to draw as soon possible, since sleeping
will decrease the effective frame rate shown to the user, and
can also result in the system never kicking out of power-saving
mode because it doesn't look fully utilized.

Use the amount the client increments the counter value by when
ending the frame to distinguish these cases:

 - Increment by 1: a no-delay frame
 - Increment by more than 1: a non-urgent frame, handle normally

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:27 -05:00
Owen W. Taylor
fcc178ee8c Use XSyncSetPriority()
Use XSyncSetPriority() to prioritize the compositor above applications
for X server priority. In practice, this makes little difference because
the Xorg "smart scheduler" will schedule in a single application for
time slices that exceed the frame drawing time, but it's theoretically
right and might make a difference if the X server scheduler is improved.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
790bfcad9a MetaWindow: always resize the frame first when we have synchronization
Resizing the frame triggers creation of a new backing pixmap for the
window, so we should do that first before we resize the client window
and mess up the contents of the old backing pixmap.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
fbfab93c63 Send _NET_WM_FRAME_DRAWN messages
When the application provides the extended second counter for
_NET_WM_SYNC_REQUEST, send a client message with completion
information after the next redraw after each counter update
by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
70c0d39fa7 Add support for an extended style of _NET_WM_SYNC_REQUEST_COUNTER
If an application provides two values in _NET_WM_SYNC_REQUEST_COUNTER,
use that as a signal that the applications wants an extended behavior
where it can update the counter as well as the window manager. If the
application updates the counter to an odd value, updates of the
window are frozen until the counter is updated again to an even value.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
7d43bde019 Support properties with lists of XSyncCounter
Add META_PROP_VALUE_SYNC_COUNTER_LIST for a property that contains
multiple XSyncCounter values.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
7743c70d47 Move sync alarms to be per-window and permanent
Instead of creating a new alarm each time we resize a window
interactively, create an alarm the first time we resize a window
and keep it around permanently until we unmanage the window.
Doing it this way will be useful when we allow the application to
spontaneously generate sync request updates to indicate
frames it is drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:25 -05:00
Owen W. Taylor
c9343e3ee3 Implement freezing of updates during resize
Replace the unused meta_compositor_set_updates() with
a reversed-meaning meta_compositor_set_updates_frozen(), and use
it to implement freezing application window updates during
interactive resizing. This avoids drawing new areas of the window
with blank content before the application has a chance to repaint.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:40:07 -05:00
Adel Gadllah
2942b22ccf screen: Don't try to move / resize OR windows on montior change
meta_screen_resize calls meta_window_update_for_monitors_changed for all
windows including OR windows when the monitors change (or screen size).

This calls meta_window_move_between_rects for the window which attempts to
move the OR window by calling meta_window_move_resize.

meta_window_move_resize refuses to do anything on OR windows (just returns
for OR windows).

This causes a storm of assert messages when the screen
resolution changes while an OR window is visible.
(like the one gnome-control-center displays with the monitor name).

Fix that by not calling meta_window_update_for_monitors_changed for OR windows
and let the applications handle them by themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=693540
2013-02-10 20:43:03 +01:00
Adel Gadllah
a362c08f4e Fix build error introduced by d482590c84 2013-02-09 17:02:36 +01:00
Rui Matos
380154af0a screen: Fix a potentially endless loop
We always need to move the list pointer forward.

https://bugzilla.gnome.org/show_bug.cgi?id=693475
2013-02-09 16:07:59 +01:00
Adel Gadllah
d482590c84 Fix button check in meta_window_client_message
Fixes a regression introduced in 3a3be74e37

https://bugzilla.gnome.org/show_bug.cgi?id=692718
2013-02-09 13:17:42 +01:00
Tim Lunn
b3c572b8e3 barrier: fix fallback for unsupported servers
add missing ifdef HAVE_XI23.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-09 11:27:22 +11:00
Jasper St. Pierre
c64eb94724 display: Remove an unused code path for enabling the compositor 2013-02-08 14:36:20 -05:00
Jasper St. Pierre
d8f569eaf5 display: Rename window_ids to xids
As the hash table no longer stores only window IDs, we should rename it so
that we make sure to check if something is actually a window before using it
as a window.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:23:38 -05:00
Jasper St. Pierre
57c31a56f4 barrier: Add support for new barrier features in XInput 2.3
XInput 2.3 adds support for "barrier events", which let us know when
a pointer barrier has been hit, and when the pointer has stopped
hitting the barrier, and lets us "release" the barrier, temporarily
letting the pointer pass through the barrier. These features can be
combined to allow for certain pointer gestures, such as "pushing"
against the bottom of the screen, or stopping the pointer on monitor
edges while dragging slowly for increased edge precision.

This commit should allow graceful fallback if servers with
XInput 2.3 aren't supported.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:23:38 -05:00
Jasper St. Pierre
8b21df92f0 barrier: Add a new Meta wrapper for pointer barriers
Currently, we have a few function wrappers in the shell for pointer
barriers. If we want to implement interactive features on barriers,
we need some sort of signal to be notified of the interactivity.
In that case, we need to make a more sophisticated object-based wrapper
for a pointer barrier. Add one, and stick it in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:23:38 -05:00
Adel Gadllah
a2a3188331 Fix compiler warnings 2013-02-08 00:22:54 +01:00
Jasper St. Pierre
453020c315 Make sure to include the old XI2 mask when selecting for events
Some windows may already have event masks on them that we've selected
for, especially if we're using GTK+ windows. In particular, this fixes
window menus in the XI2 port.

https://bugzilla.gnome.org/show_bug.cgi?id=690581
2013-02-07 18:13:40 -05:00
Jasper St. Pierre
d794db876a core: Add a helper function to grab the old event mask of a window
https://bugzilla.gnome.org/show_bug.cgi?id=690581
2013-02-07 17:53:53 -05:00
Jasper St. Pierre
a613a55658 Support _NET_WM_OPAQUE_REGION
This new hint allows compositors to know what portions of a window
will be obscured, as a region above them is opaque. For an RGB window,
possible to glean this information from the bounding shape region of
a client window, but not for an ARGB32 window. This new hint allows
clients that use ARGB32 windows to say which part of the window is
opaque, allowing this sort of optimization.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-06 00:08:04 -05:00
Jasper St. Pierre
32b7743735 screen: Add an introspectible wrapper for find_monitor_for_rect
Instead of returning a MonitorInfo, it returns a monitor index.

https://bugzilla.gnome.org/show_bug.cgi?id=692679
2013-02-06 00:04:15 -05:00
Jasper St. Pierre
093e101252 Make work_area calculation funcs public and introspectible
https://bugzilla.gnome.org/show_bug.cgi?id=692679
2013-02-06 00:03:47 -05:00
Jasper St. Pierre
6f873be7fa Revert "Make work_area calculation funcs public and introspectible"
This reverts commit d8058138ab.
2013-02-06 00:03:10 -05:00
Jasper St. Pierre
f37dd25e92 Revert "screen: Add an introspectible wrapper for find_monitor_for_rect"
This reverts commit 3900aa10f8.
2013-02-06 00:02:04 -05:00
Jasper St. Pierre
3900aa10f8 screen: Add an introspectible wrapper for find_monitor_for_rect
Instead of returning a MonitorInfo, it returns a monitor index.

https://bugzilla.gnome.org/show_bug.cgi?id=692679
2013-02-05 23:54:13 -05:00
Jasper St. Pierre
d8058138ab Make work_area calculation funcs public and introspectible
https://bugzilla.gnome.org/show_bug.cgi?id=692679
2013-02-05 23:54:13 -05:00
Adel Gadllah
9a57626556 meta-window-actor: Change unredirection hints to match spec changes
Change the bypass / dont_bypass compositor code to match the latest
spec.

https://bugzilla.gnome.org/show_bug.cgi?id=693064
2013-02-03 14:29:45 +01:00
Jasper St. Pierre
71055556ee display: Require XFixes 5.0
We want to put barrier wrappers in mutter, which requre XFixes 5.0.
XFixes 5.0 was released in March, 2011, which should be old enough
to mandate support for.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-01 13:13:51 -05:00
Florian Müllner
4d9d66da65 window: Add set_icon_geometry() method
Using a public method for setting the (cached) icon geometry rather
than accessing the struct members directly allows setting the icon
geometry from extensions.

https://bugzilla.gnome.org/show_bug.cgi?id=692997
2013-02-01 15:08:48 +01:00
Florian Müllner
30bdadb519 window: Cache _NET_WM_ICON_GEOMETRY
Rather than doing a server round trip each time when retrieving the
icon geometry, use the existing property mechanism to cache it.

https://bugzilla.gnome.org/show_bug.cgi?id=692997
2013-02-01 15:08:38 +01:00
Florian Müllner
c388ccf477 window: Fix get_icon_geometry() annotation
gjs has had support for (out) parameters for quite some time now ...

https://bugzilla.gnome.org/show_bug.cgi?id=692997
2013-02-01 15:08:36 +01:00
Colin Walters
cefadb55b1 display: Request XI2.3
This matches commit:

http://git.gnome.org/browse/clutter/commit/?h=clutter-1.14&id=3e1450ba17fce90a8034cc525c67a87ff3cdd53d

Since XIQueryVersion, the bad API that it is, chooses the first client
version that it gets, we need to ensure that we pass XIQueryVersion the
new XI2.3 version, knowing fully well that Clutter won't be confused
by the new features.

https://bugzilla.gnome.org/show_bug.cgi?id=692877
2013-01-31 04:22:10 -05:00
Jasper St. Pierre
df15843407 Use meta_window_located_on_workspace() in more places
https://bugzilla.gnome.org/show_bug.cgi?id=691744
2013-01-18 15:45:05 -05:00
Jasper St. Pierre
d8eb47e2b7 window: Make meta_window_located_on_workspace() public
We have some code in gnome-shell that does the equivalent of:

    window.get_workspace() == workspace || window.is_on_all_workspaces();

which is a bit unwieldy. We already have a method in mutter,
so use that and document it.

https://bugzilla.gnome.org/show_bug.cgi?id=691744
2013-01-18 15:45:05 -05:00
Florian Müllner
a6c51addac prefs: Annotate meta_prefs_get_button_layout()
https://bugzilla.gnome.org/show_bug.cgi?id=689263
2013-01-10 00:10:50 +01:00
Florian Müllner
5a8473e226 prefs: Do not leave junk values in unused button_layout fields
MetaButtonLayout is extremely unfriendly for introspection: its fields
are arrays of a fixed length, but the actual length is determined by
a custom stop value (e.g. not NULL / 0).
Without API changes this will never work nicely in introspection, but
we can at least make it work; start by filling up unused fields with
the stop value rather than leaving it at random values.

https://bugzilla.gnome.org/show_bug.cgi?id=689263
2013-01-10 00:10:50 +01:00
Jasper St. Pierre
3a3be74e37 Remove some server calls for core devices
These were missed in the first porting.

https://bugzilla.gnome.org/show_bug.cgi?id=691363
2013-01-08 15:54:50 -05:00
Jasper St. Pierre
f57d64337b display: Use XI2 constants for mode/detail focus event values
This makes no function difference, except conceptual clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=691363
2013-01-08 15:54:50 -05:00
Jasper St. Pierre
e69fcc860c display: Remove some more core events
I apparently forgot to remove these.

https://bugzilla.gnome.org/show_bug.cgi?id=691363
2013-01-08 15:54:50 -05:00
Jasper St. Pierre
afbca61524 main: Remove call to clutter_x11_enable_xinput
The call is deprecated and is called by default upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=691363
2013-01-08 15:54:50 -05:00
Jasper St. Pierre
90cf43da9f display: Expose the xinput opcode
This is needed by the shell to filter out certain events

https://bugzilla.gnome.org/show_bug.cgi?id=690590
2013-01-02 13:41:56 -05:00
Giovanni Campagna
6431abbc85 Check that the application is responding when activating a window
Currently, we ping windows only when attempting to delete them, but
if the application is not responding, we want to show the dialog
as soon as possible. Given that we cannot be passively notified that
the window stopped responding with the current X11 protocol, a good
workaround is to ping the window when activating it.
If the window stops responding while active, it is expected the user
will try to switch window or open the overview, and when coming back
he'll get the failure dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=684340
2012-12-25 18:39:10 +01:00
Giovanni Campagna
57ff0f7071 MetaWindow: add a public method for checking if the application is responding
Add meta_window_check_alive(), which is a simple wrapper over
meta_display_ping_window(), and takes care of showing the "Application
is not responding dialog" if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=684340
2012-12-25 18:39:09 +01:00
Adel Gadllah
2a2ac52726 automaximize: Make it optional
Make automaximize optional by adding a gsetting "auto-maximize"
(defaults to true).

https://bugzilla.gnome.org/show_bug.cgi?id=680990
2012-12-25 13:37:22 +01:00
Ray Strode
748064678f prefs: drop errnoneous semi-colon
This fixes a compiler warning and spurious
enqueuing of WORKSPACE_NAMES change.

https://bugzilla.gnome.org/show_bug.cgi?id=690573
2012-12-20 14:27:26 -05:00
Giovanni Campagna
6111d3ee4a window: recompute modal dialog attached status when the window type changes
We want to maintain the invariant that an attached modal dialog is always
of type MODAL_DIALOG, so recompute is_attached_dialog() when the window
type changes.

https://bugzilla.gnome.org/show_bug.cgi?id=690454
2012-12-18 23:18:58 +01:00
Adel Gadllah
3876a1a192 Support bypass compositor hints
Add support for _NET_WM_BYPASS_COMPOSITOR and _NET_WM_DONT_BYPASS_COMPOSITOR
as proposed here: https://mail.gnome.org/archives/wm-spec-list/2012-February/msg00010.html

https://bugzilla.gnome.org/show_bug.cgi?id=683020
2012-12-18 19:02:34 +01:00
Rui Matos
7d7b859b40 Fix 'comparison between signed and unsigned integer' compiler errors 2012-12-17 12:30:01 +00:00
Florian Müllner
d78de379cc keybindings: Give dynamic keybindings a keybindings action
https://bugzilla.gnome.org/show_bug.cgi?id=682315
2012-12-17 12:00:55 +00:00
Jasper St. Pierre
2fcbc467e8 keybindings: Fix whitespace and alignment
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 18:15:23 -05:00
Jasper St. Pierre
6139bc77ec Remove support for Core Events
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 18:15:23 -05:00
Jasper St. Pierre
945c530354 display: Add spew for XI2
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 18:15:22 -05:00
Jasper St. Pierre
774ceec243 Select for XI2 events everywhere else
In random places that are not grabs, we selected for events on
things like the root window, stage window, COW and more. Switch
these over to using the proper XI2 APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 17:14:06 -05:00
Jasper St. Pierre
7c20621112 keybindings: Grab keys with XI2
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 17:14:06 -05:00
Jasper St. Pierre
afcdfd158f keybindings: Grab keyboard with XI2
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 17:14:06 -05:00
Jasper St. Pierre
8fb9e0072c display: Grab buttons with XI2
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 17:14:06 -05:00
Jasper St. Pierre
c1b8e0ac8f display: Use XInput2 to grab the pointer
As calling XIGrabDevice multiple times will change it, just
drop the XChangeActivePointerGrab path and just go down the
XIGrabPointer path always.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 17:14:06 -05:00
Jasper St. Pierre
c90765370d window: Pass the grab timestamp when updating the resize grab
Since XChangeActivePointerGrab doesn't have a direct equivalent
in XI2, we need to make sure we don't re-grab with a newer
tiemstamp.
2012-12-13 17:06:00 -05:00
Jasper St. Pierre
55251aa986 compositor: Use XInput2 to grab the pointer/keyboard
https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 16:36:42 -05:00
Carlos Garnacho
946a42f13e core: enable XInput2 by default
Enable XI2 support in both Clutter and GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:57:31 -05:00
Jasper St. Pierre
0fd4059927 display: Only care about input events for the VCP/VCK
It's unlikely that we'll ever want to support multiple pointer
devices. Multiple keyboard devices may become useful in the future,
but for now, only care about the core keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:57:31 -05:00
Jasper St. Pierre
1d827049d6 Port mutter to use XInput2 events instead of Core Events
Mechanically transform the event processing of mutter to care
about XI2 events instead of Core Events. Core Events will be left
in the dust soon, and removed entirely.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:56:25 -05:00
Jasper St. Pierre
881d256ce0 window: Move grab op sync handling code out
This removes some duplicate event type checks, and will make
the code cleaner in the future when we want to make the grab_op_event
handler take an XIDeviceEvent directly.

Based on a patch by Owen Taylor <otaylor@fishsoup.net>

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:56:24 -05:00
Jasper St. Pierre
6b31bd402a display: Don't pass an event to a handler that will no-op
meta_window_handle_mouse_grab_op_event won't do anything on a
EnterNotify/LeaveNotify, so why are we passing something to it?

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:56:24 -05:00
Carlos Garnacho
129c729c50 display: separate input/non-input events handling in the event callback
In order to make the XI2 handling easier on us in the future, we now
split input events from non-input events. This will allow one code path
to use XIEvent, and the other to use XEvent in the future. This commit
has involved plenty of indenting changes, so it's better seen with
git diff -b or &ignorews=1

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:12:56 -05:00
Jasper St. Pierre
f0c1e39fb7 display: Initialize XInput2
Make sure it's the correct version.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:12:56 -05:00
Jasper St. Pierre
9d904f9a85 Increase typical icon size to 96
Since we want nice alt-tab applications for gnome-shell, we should up the
limit to 96. In the future, we probably want to get rid of the icon-cache,
and allow looking up a correctly sized icon directly from the window.

To prevent app breakage, set the legacy WM_HINTS pixmap size directly to
32x32.

https://bugzilla.gnome.org/show_bug.cgi?id=689651
2012-12-09 20:44:13 -05:00
Jasper St. Pierre
8830814d70 screen: Add a convenience method to focus the default window
This will be used for gnome-shell so that it can focus a window after
a keyboard grab or other things.

https://bugzilla.gnome.org/show_bug.cgi?id=689652
2012-12-07 13:01:49 -05:00
Florian Müllner
2282326f30 Add 'switch-applications' keybinding
Add an additional "switcher" keybinding for switching between
applications rather than windows (like the existing 'switch-windows'
and 'switch-group' bindings).
The purpose of the new keybinding is to be taken over by gnome-shell's
application-based alt-tab popup, so rather than actually implementing
an application switcher in mutter, let it duplicate the normal window
switcher when run standalone.

https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:45:22 +01:00
Florian Müllner
8703daccbe display: Make workspace parameter to get_tab_list() optional
Currently meta_display_get_tab_list() will only return windows on
a single workspace. Make the workspace parameter optional to allow
requesting windows from all workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:45:22 +01:00
Florian Müllner
3797ecaa65 display: Clean up meta_display_get_tab_list()
https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:45:22 +01:00
Jasper St. Pierre
c6fcc79e6a display: Kill a warning at shutdown
A small semicolon was causing us to always remove the focus
timeout ID.
2012-12-04 16:46:40 -05:00
Alban Crequy
e5b46747d6 Initialize window->user_rect in the initial placement
The window positioning is delayed in idle_move_resize() in case the application
resizes/maximizes its window quickly after its creation. The delayed
positioning uses window->user_rect because of bug 426519 comment 3 (see
meta_window_move_resize_now()).

user_rect was not set in the initial positioning, causing the delayed
positioning unable to know which monitor we use for this window. As a
consequence, the window could jump spontaneously from one monitor to another.

With this patch, the window does not jump anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=556696
2012-11-30 13:29:26 +00:00
Florian Müllner
6004197064 keybindings: Add is_builtin() method
https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:47:06 +01:00
Florian Müllner
aa43e715c0 keybindings: Add MetaKeyBinding for overlay-key
As the overlay key works differently from normal keybindings, it
requires special treatment. However, by adding a rudimentary
MetaKeyBinding for it, we will be able to confine the special
handling to mutter and treat it like any other keybinding in
the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:47:06 +01:00
Florian Müllner
424fc5245a Add compositor hook to process keybindings selectively
Currently keybindings are blocked while the compositor holds a grab; if
we want a keybinding to be available anyway, we use captured ClutterEvents
to determine the KeyBindingAction the event would have triggered and
run our own handlers (ugh).
Instead, provide a hook to allow the compositor to filter out keybindings
before processing them normally, regardless of whether the compositor
holds a grab or not.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:47:05 +01:00
Rico Tzschichholz
90952ac5c8 Fix naming of "user_data" arguments for better introspection 2012-11-16 21:23:47 +01:00
Florian Müllner
bdf47aeac4 keybindings: Import keybinding files from Metacity
Fallback mode is going away, so we should stop depending on Metacity
for keybinding files for common bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=687672
2012-11-12 19:27:35 +01:00