1
0
Fork 0
Commit graph

4459 commits

Author SHA1 Message Date
Owen W. Taylor
9c6e527d4b Add ::first-frame signal to MetaWindowActor
This signal is emitted the first time a frame of contents of the
window is completed by the application and has been drawn on the
screen. This is meant to be used for performance measurement of
application startup.

https://bugzilla.gnome.org/show_bug.cgi?id=732343
2014-06-27 10:37:42 -04:00
Jasper St. Pierre
077606c057 window-wayland: Correct the buffer rect for frame extents 2014-06-26 13:58:11 -04:00
Jasper St. Pierre
a615f93060 window: Set custom frame extents to 0 if we don't have any
This is just a quick code cleanup.
2014-06-26 13:58:11 -04:00
Giovanni Campagna
c562657f1e main: kill custom log handler
It just gets in the way of gnome-shell's log handler (which
includes gjs backtraces optionally), it requires people to understand
what 8 or 16 mean as log levels, and it loses the log domain.
2014-06-26 19:10:28 +02:00
Marek Chalupa
c14382181f wayland window: update buffer_rect when moving
Update both - rect and buffer_rect positions when moving wayland window

https://bugzilla.gnome.org/show_bug.cgi?id=731237
2014-06-26 10:50:29 -04:00
Marek Chalupa
b2183dfda7 wayland-pointer: fix condition for grabbing
It returns FALSE when button_count is not 0. But grabbing for
move/resize is activated by clicking the button, so this condition
disallows the wayland clients to be moved/resized.

https://bugzilla.gnome.org/show_bug.cgi?id=731237
2014-06-26 10:50:29 -04:00
Jasper St. Pierre
bb92054c86 window: Use g_object_notify_by_pspec 2014-06-26 10:31:22 -04:00
Jasper St. Pierre
4e4a6eb5d7 window: Use g_object_class_install_properties 2014-06-26 10:31:01 -04:00
Tom Beckmann
692acbd986 window: Add a property for on_all_workspaces
Some plugins and extensions want to be able to know when the sticky
field of a window changes, so add a property for it and allow them
to connect to the notify::on-all-workspaces signal.
2014-06-26 10:31:00 -04:00
Florian Müllner
967b6c33df window: Add user_op parameter to update_monitor()
When workspaces-only-on-primary is set and a window is moved back to the
primary, we also move it to the active workspace to avoid the confusion
of a visible window suddenly disappearing when crossing the monitor border.
However when the window is not actually moved by the user, preserving the
workspace makes more sense - we already do this in some cases (e.g. when
moving between primary monitors), but miss others (unplugging the previous
monitor); just add an explicit user_op parameter as used elsewhere to cover
all exceptions.

https://bugzilla.gnome.org/show_bug.cgi?id=731760
2014-06-24 23:42:06 +02:00
Florian Müllner
00c7a27732 window: Keep track of preferred output
Remember the last monitor a window was moved to by user action and
try to move it back on monitor changes; this should match user
expectations much better when a monitor is unplugged temporarily.

https://bugzilla.gnome.org/show_bug.cgi?id=731760
2014-06-24 23:42:06 +02:00
Florian Müllner
048ba353c4 window: Don't make windows on non-primaries sticky on restart
When workspaces-only-on-primary is set, a window can be on all
workspaces either because it is on a non-primary workspace, or
because it was explicitly made sticky. Only the latter is reflected
in _NET_WM_STATE, but both will result in a "magic" _NET_WM_DESKTOP,
which we (and probably other WMs) use to set the initial sticky state.
So to avoid confusing other WMs (or ourselves), make sure to only
have _NET_WM_STATE_STICKY reflected in _NET_WM_DESKTOP when unmanaging.
2014-06-24 23:01:59 +02:00
Florian Müllner
555e2f6de2 Revert "window: Move placement code from the constraints path"
Window state like maximization and minimization should be preserved
over restarts - in a patch review, this would qualify as "needs-work",
so revert the cleanup until the issues are fixed.

This reverts commit dc6decefb5.
2014-06-24 22:59:06 +02:00
Jasper St. Pierre
ff8d5281f0 frames: Simplify the clip region calculation
Since GTK+ already clips to the extended region for us, there's no need
to combine the two. This does lose the fast-path, but I don't actually
expect this to fire, as when we're composited, we really won't ever get
partial exposes.
2014-06-21 13:50:44 -04:00
Jasper St. Pierre
4f9b994e73 frames: Don't bother painting the background
GDK (and also GTK+!) do this for us already.
2014-06-21 13:50:43 -04:00
Jasper St. Pierre
b8b0dc5c78 frames: Hackily adapt to GTK+ drawing changes
mutter is quite bad at using GTK+ correctly, relying on dumb things
like the single-buffering stuff. Hack up a temporary fix for the
newer GTK+ rendering changes.
2014-06-21 13:50:36 -04:00
Nikita Churaev
d0cafab836 Change shadow radiuses to match new Adwaita more or less
Exact simmilarity is not possible yet due to different blurring algorithms.

https://bugzilla.gnome.org/show_bug.cgi?id=731866
2014-06-19 11:55:24 +02:00
Jasper St. Pierre
24d7c5ebe3 compositor: Simplify meta_window_actor_set_updates_frozen
Since we always call it with the same value, just push that
value into the implementation.
2014-06-17 13:10:42 -04:00
Jasper St. Pierre
dc6decefb5 window: Move placement code from the constraints path
This way, it's implemented as a special case in move_resize_internal,
which makes it a lot easier to manage.
2014-06-17 11:40:49 -04:00
Jasper St. Pierre
25d7e48077 constraints: Clean up logical operations
The logical version of the bitwise XOR operator ^ is !=. I don't
know why XOR was even used in the first place.
2014-06-17 11:21:25 -04:00
Jasper St. Pierre
b0b8f37240 window: Save the buffer_rect internally
Rather than calculate it speculatively with the current properties
which may be too new or too out of date, make sure it always fits
with the proper definition. We update it when we update the toplevel
window for X11, and when a Wayland surface is committed with a newly
attached buffer.
2014-06-17 11:15:32 -04:00
Jasper St. Pierre
188e4e1b92 window: Rename get_input_rect to get_buffer_rect
With get_input_region existing, get_input_rect is a misnomer. Really,
it's about the geometry of the output surface, and it's only used that
way in the compositor code.

Way back when in GNOME 3.2, get_input_rect was added when we added
invisible borders. get_outer_rect was always synonymous with server-side
geometry of the toplevel. get_outer_rect was used for both user-side
policy (the "frame rect") and to get the geometry of the window.

Invisible borders were meant to extend the input region of the frame
window silently. Since most users of get_outer_rect cared about the
frame rect, we kept that the same and added a new method, get_input_rect
to get the full rect of the framed window with all invisible borders for
input kept on.

As time went on and CSD and Wayland became a reality, the relationship
between the server-side geometry and the "frame rect" became more
complicated, as can be evidenced by the recent commits. Since clients
don't tend to be framed anymore, they set their own input region.

get_buffer_rect is also sort of a poor name, since X11 doesn't really
have buffers, but we don't really have many other alternatives.

This doesn't change any of the code, nor the meaning. It will always
refer to the rectangle where the toplevel should be placed.
2014-06-17 10:33:52 -04:00
Jasper St. Pierre
9d5273bb15 window: Fix get_input_rect in a hacky way
All of the users of get_input_rect don't actually want a synthesized
input rect based off of the current margins. What they really want is
the last-configured size of the toplevel window.

Since we don't properly track this anymore in the generic MetaWindow,
use XGetWindowAttributes to fetch a server-side rectangle. This is a
bad layer violation, but since the window geometry code will have to
be rewritten anyway for the Wayland set_window_geometry, let's just
push a hacky fix for now.
2014-06-16 18:34:07 -04:00
Jasper St. Pierre
3c0fae74f1 window: Move get_toplevel_xwindow to window-x11 2014-06-16 18:29:38 -04:00
Jasper St. Pierre
86dae6d4c7 theme: Replace char array element comparisons with strncmp
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2014-06-14 14:12:53 -04:00
Jasper St. Pierre
d06600aeb0 theme: Remove dead code
While the comment claims that we may want to keep this around
for optimization purposes, the operations are raw bitmap operations
that would be cleaner done in cairo.

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2014-06-14 14:12:52 -04:00
Jasper St. Pierre
895a3d1f39 theme: Properly indent code
s/tabs/spaces/

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2014-06-14 14:11:32 -04:00
Jasper St. Pierre
381ef5c683 theme: Consolidate unused ops
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2014-06-14 14:11:00 -04:00
Jasper St. Pierre
62097897be theme: Remove unused RECTANGLE code
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2014-06-14 14:04:59 -04:00
Jasper St. Pierre
2d2c47ba49 display: Remove unused variable 2014-06-12 17:46:23 -04:00
Jasper St. Pierre
89cdfc9194 display: Use G_SOURCE_CONTINUE / G_SOURCE_REMOVE 2014-06-12 17:46:23 -04:00
Jasper St. Pierre
ad60ea9e0e display: Use meta_window_has_pointer instead of XQueryPointer 2014-06-12 17:46:23 -04:00
Florian Müllner
a7350475e8 workspace: Extend builtin struts to screen edge when possible
Struts are defined in terms of screen edges, so expand the rectangles
we get via set_builtin_struts() accordingly. However we do want to
allow chrome on edges between monitors, in which case the expansion
would render an entire monitor unusable - don't expand the rectangles
in that case, which means we will only use them for constraining
windows but ignore them for the client-visible _NET_WORKAREA property.

https://bugzilla.gnome.org/show_bug.cgi?id=730527
2014-06-12 15:28:46 +02:00
Florian Müllner
f3d7c9cff9 testboxes: Update test cases
Who cares? We do now ...

https://bugzilla.gnome.org/show_bug.cgi?id=730527
2014-06-12 15:28:46 +02:00
Florian Müllner
906cbeed61 boxes: Ignore struts that don't attach to the side they claim
Like the _NET_WM_STRUT/_NET_WM_STRUT_PARTIAL client properties,
_NET_WORKAREA is defined in terms of screen geometry rather than
taking individual monitors into account. However we do want to
allow system chrome to be attached to a monitor edge rather than
a screen edges under some circumstances. As not all clients can
be assumed to deal gracefully with the resulting workarea, use
those "struts" only internally for constraining windows, but
ignore them when exporting _NET_WORKAREA.

https://bugzilla.gnome.org/show_bug.cgi?id=730527
2014-06-12 15:28:42 +02:00
Florian Müllner
0fccb0fc86 testboxes: Fix find_closest_point_to_line() test
Eeeks, testing floating points for equality ...
2014-06-12 01:39:54 +02:00
Florian Müllner
8100cefd4c screen: Split workspace initialization from meta_screen_new()
Since commit 8b2b65246a, we assume that the compositor always
exists. Alas, the assumption is wrong - the compositor is currently
initialized after the screen, but meta_screen_new() itself may
call a compositor function if initialization involves a workspace
switch (which will happen when meta_workspace_activate() is called
more than once and for different workspaces - or in other words,
when _NET_CURRENT_DESKTOP is set and not 0).
So carefully split out the offending bits and only call them after
the compositor has been initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=731332
2014-06-11 23:35:34 +02:00
Florian Müllner
d7e99a3f86 prefs: Queue change notification when app menu visibility changed
Toggling the option should have an immediate effect, not only on
frame/state changes.
2014-06-11 23:34:09 +02:00
Jasper St. Pierre
6af944fe2c native: Add a warp_pointer implementation
Use the new clutter_evdev_warp_pointer method to implement it.
2014-06-11 16:42:05 -04:00
Jasper St. Pierre
12fc394b92 display: Fix the logic for moving attached dialogs
If we have a tree of a window, a non-attached dialog, and then an
attached dialog, we want to move the second window, not the attached
dialog or the topmost. In other words, we want to move the first
non-attached window, or the first "freefloating window".

This happens in Firefox, whose Preferences dialog is freefloating,
but suboptions of those are modal dialogs.
2014-06-11 16:42:05 -04:00
Jasper St. Pierre
53814fefc1 Move all X11 event processing to a new file in x11/ 2014-06-11 16:28:45 -04:00
Jasper St. Pierre
e87a01c80b wayland-touch: Rearrange header slightly 2014-06-11 16:28:45 -04:00
Jasper St. Pierre
21d7c1a850 wayland-pointer: Remove useless initialization
There is no way this value will ever be read, because we set the
cursor_surface to NULL, this is set at the same time as cursor_surface,
and it's only read if cursor_surface is non-NULL.
2014-06-11 15:15:58 -04:00
Jasper St. Pierre
e33c58297d wayland-surface: Subsurfaces start out in synchronous mode 2014-06-11 12:34:44 -04:00
Jasper St. Pierre
5350120db4 wayland-surface: Fix whitespace 2014-06-11 12:34:17 -04:00
Florian Müllner
af3aae7295 meta-window-actor: Don't add shadows to popups if the toolkit already does
GTK+ will add its own shadows client-side, so we don't need to anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=731353
2014-06-10 13:40:33 +02:00
Florian Müllner
98e219da4b shadow-factory: Make sure to never use a negative spread
The smallest possible spread corresponds to an unblurred shadow, which
neither grows nor shrinks - thus the spread should be zero not negative
as returned by our current calculation.

https://bugzilla.gnome.org/show_bug.cgi?id=731353
2014-06-10 13:40:32 +02:00
Florian Müllner
fba022cc06 window-x11: Handle legacy fullscreen requests
Doing this on the actual resize requests makes more sense than
handling it as a window-manager imposed constraints, so move
the code accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=730681
2014-06-09 22:27:33 +02:00
Florian Müllner
3f6c6f1dd9 constraints: Translate frame to client rect for legacy fullscreen check
Stupid apps fullscreen themselves by resizing the client window to
monitor size. A monitor-sized frame rect on the other hand is perfectly
normal on monitors without struts - stop force-fullscreening those
and catch the real baddies instead.

https://bugzilla.gnome.org/show_bug.cgi?id=730681
2014-06-09 21:28:50 +02:00
Florian Müllner
ebc2e7221b window-x11: Fix silly regression
First we figure out the window type, then we ignore it - ouch.
2014-06-07 12:00:17 +02:00
Rico Tzschichholz
8734477d52 meta: Add generated meta-version.h
Avoid populating *_VERSION constants through cflags in pkg-config-file
which could be overridden by the project using it. Properly prefix the
defines with META_ to make gi-scanner happy.
2014-06-05 14:05:16 +02:00
Rico Tzschichholz
ec8ba4b5f9 build: Move data files to their dedicated subfolder 2014-06-05 10:50:15 +02:00
Carlos Garnacho
2250865eb6 wayland: Implement the server side bits of wl_touch_interface
Clutter touch events are translated into events being sent down
the interface resource, with the exception of FRAME/CANCEL events,
which are handled directly via an evdev event filter.

The seat now announces invariably the WL_SEAT_CAPABILITY_TOUCH
capability, this should be eventually updated as devices come and
go.

The creation of MetaWaylandTouchSurface structs is dynamic, attached
to the lifetime of first/last touch on the client surface, and only
if the surface requests the wl_touch interface. MetaWaylandTouchInfo
structs are created to track individual touches, and are locked to
a single MetaWaylandTouchSurface (the implicit grab surface) determined
on CLUTTER_TOUCH_BEGIN.

https://bugzilla.gnome.org/show_bug.cgi?id=724442
2014-06-04 23:37:45 +02:00
Rico Tzschichholz
847a3bbee3 build: Fix some warnings and clean up a bit 2014-06-04 19:31:37 +02:00
Rico Tzschichholz
410a002ddd build: Do not distribute generated desktop-files 2014-06-04 16:13:11 +02:00
Rico Tzschichholz
8766db2593 common: Do not leak MetaResizePopup to the public api 2014-06-04 15:53:29 +02:00
Jasper St. Pierre
e362227514 window-x11: Don't ever send ConfigureNotifies for OR windows
There's a race here. If an OR window hides itself, moves, and then shows
itself, we will send a ConfigureNotify for the old size of the window
and might receive it after the client moves itself, causing us to show
the window at the wrong location.

Simply not sending the ConfigureNotify is the easiest thing to do.
2014-06-03 11:35:20 -04:00
Jasper St. Pierre
da311f266d window: Make sure to update client_rect for OR windows too
Before we unmanage, we send a ConfigureNotify to clients to let them
know if their frame is destroyed. We do this for OR windows too, even if
we really probably shouldn't.

This is based off of the client_rect. Since we listen to ConfigureNotify
on OR windows, we'll receive the event. If we don't ever update the
client_rect when moving or resizing OR windows, then we'll send
ourselves a ConfigureNotify for a 0x0 size and then think that the
client chose a new size for itself. Since our get_paint_volume is based
on that rectangle, but the TFP code inside Cogl uses XGetGeometry
itself, we get weird flickering artifacts.
2014-06-03 11:35:19 -04:00
Rico Tzschichholz
f5a4e996a8 display: Remove the screen from get_tab_list 2014-06-03 14:40:15 +02:00
Florian Müllner
a7f083897f frames: Only skip updating prelight when both control and state match
prelit_control is used for both prelight and pressed states, so the early
return in update_prelit_control() misses the case where prelit_control
already matches the control we are updating, but its state is PRESSED
rather than PRELIGHT. Fix the condition to not have pressed controls
linger around erroneously.

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:49:48 +02:00
Florian Müllner
e2105dc721 frames: Fix pressed state of window menu buttons
Since window menus have been moved to the compositor, the pressed
state of the corresponding window buttons is messed up, as it is
reset immediately when getting a LeaveNotify event due to the
compositor taking a grab. Fix this by ignoring that particular
event.

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:49:48 +02:00
Florian Müllner
b64548ee1f Pass button_rect when opening window menu from button
When opening the window menu without an associated control - e.g.
by right-clicking the titlebar or by keyboard - using coordinates
for the menu position is appropriate. However when the menu is
associated with a window button, the expected behavior in the
shell can be implemented much easier with the full button geometry:
the menu will point to the center of the button's bottom edge
rather than align to the left/right side of the titlebar as it
does now, and the clickable area where a release event does not
dismiss the menu will match the actual clickable area in mutter.

So add an additional show_window_menu_for_rect() function and
use it when opening the menu from a button.

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:49:48 +02:00
Jasper St. Pierre
53425fa721 window: Make sure not to respond to input events on OR windows
This can happen since we select for events on the root window, and
clients themselves might not select for input, meaning the X server
will bubble up. Just do nothing and ignore the event in this case.

This should hopefully fix some of the

Window manager warning: Log level 8: meta_window_raise: assertion '!window->override_redirect' failed
Window manager warning: Log level 8: meta_window_focus: assertion '!window->override_redirect' failed

spam that people have been seeing.
2014-06-02 15:51:41 -04:00
Jonas Ådahl
048f035d30 wayland: Scale smooth scroll events to pointer motion coordinate space
Smooth scroll event vectors from clutter have the same dimensions as the
ones from from Xi2, i.e. where 1.0 is 1 discrete scroll step. To scale
these to the coordinate space used by wl_pointer.axis
vertical/horizontal scroll events, multiply the vector by 10.

https://bugzilla.gnome.org/show_bug.cgi?id=729601
2014-05-31 14:22:10 +02:00
Jasper St. Pierre
b32c837df9 window: Fix placement not actually placing windows
Since we often call meta_window_move_resize_now immediately after
mapping a window, we need to make sure that the placed coordinates
are saved in the unconstrained_rect. Ideally, placement positions
wouldn't be part of the constraints system, but instead are just
done inside meta_window_move_resize_internal as part of a special
path.

We're still working out the kinks of one large-scale refactor, so
it's best not to do another one while the first is going on. This
would be a great future cleanup, though: untangling constraints
and placement, alongside the force_placement state machine and
friends.
2014-05-29 14:09:57 -04:00
Jasper St. Pierre
dd03a76d51 place: Reindent 2014-05-29 13:58:08 -04:00
Jasper St. Pierre
806a666950 Make the native backend build-optional 2014-05-29 12:43:08 -04:00
Jasper St. Pierre
b240a5e819 keybindings: Only add VT keybindings if we're using the native backend 2014-05-29 12:43:07 -04:00
Jasper St. Pierre
fe823b3553 events: Improve check for native backend 2014-05-29 12:43:07 -04:00
Florian Müllner
d380d30ef4 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 21:55:03 +02:00
Jasper St. Pierre
1fe5b3e7d5 window: Construct the frame before the initial move_resize
This ensures sure that the initial ConfigureRequest we make is
correct.
2014-05-28 11:47:14 -04:00
Jasper St. Pierre
a8df208a5c window-x11: Keep flags where they're used
Just a simple code cleanup
2014-05-28 11:43:11 -04:00
Jasper St. Pierre
f3f3c94831 frame: Don't reset window->rect 2014-05-28 10:50:23 -04:00
Jasper St. Pierre
6e06648f7a window: Refactor all move/resize operations to be in frame rect space
For Wayland, we want to have everything possible in terms of the frame
rect, or "window geometry" as the Wayland protocol calls it, in order
to properly eliminate some flashing when changing states to fullscreen
or similar.

For this, we need to heavily refactor how the code is structured, and
make it so that meta_window_move_resize_internal is specified in terms
of the frame rect coordinate space, and transforming all entry points
to meta_window_move_resize_internal.

This is a big commit that's hard to tear apart. I tried to split it
as best I can, but there's still just a large amount of changes that
need to happen at once.

Expect some regressions from this. Sorry for any temporary regression
that this might cause.
2014-05-27 15:44:34 -04:00
Jasper St. Pierre
afb41f715b core: Make META_CORE_GET_FRAME_RECT return the "frame rect"
We have two different coordinate spaces here. One is the rectangle
returned by meta_window_get_frame_rect, which is called the "frame
rect" or "the window geometry", which includes visible frame borders
but not invisible frame borders. The other is "frame->rect" which
corresponds to the frame's server geometry. That is, it includes
both visible and invisible frame borders.

These two were of course the same until we introduced invisible
frame borders, and an executive decision was made to make
meta_window_get_frame_rect return the rectangle bounding the
visible portions of the frame.

As time went on, the "frame rect" turned out to be more useful when
making decisions upon, since the user often doesn't think about the
invisible window geometry as part of the window.

We already calculate what amounts to the "frame rect" in the theme
code, so just change META_CORE_GET_FRAME_RECT to consume that
directly.
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
19d26dde92 core: Convert GET_FRAME_WIDTH / GET_FRAME_HEIGHT to GET_FRAME_RECT
Since we're going to be calling meta_window_get_frame_rect in here
soon, I'd rather it be one method call, rather than two. We can't
put it at the toplevel, since that might cause infinite recursion
(e.g. meta_core_get calls meta_window_get_frame_rect calls
meta_ui_get_frame_borders calls meta_core_get, ...)
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
4acb902423 window: Correct the anchoring of drag moving / resizing
Now that meta_window_move_resize and friends act in frame rect
coordinates, we need to convert the initial grab_anchor_window_pos
storage to be in frame rect coordinates as well.
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
626516d12e window: Remove meta_window_move as well
Move to meta_window_move_frame everywhere...
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
1c94df2553 window: Replace meta_window_resize_with_gravity with a frame-rect variant
More low-hanging fruit for our window geometry cleanups...
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
266166a2d6 window: Make meta_window_unmaximize_with_gravity internal 2014-05-27 15:15:57 -04:00
Jasper St. Pierre
3a0af0faae window: Add a meta_window_get_titlebar_rect 2014-05-27 15:15:56 -04:00
Jasper St. Pierre
0890eaa3fe window: Rename get_geometry to get_session_geometry 2014-05-27 15:15:56 -04:00
Jasper St. Pierre
d4058d947b window: Remove meta_window_get_rect
It's a bad API that returns weird results you wouldn't expect.
2014-05-27 15:15:41 -04:00
Jasper St. Pierre
b704659899 backend: Add an XIWarpPointer wrapper
This makes Alt+F7 / Alt+F8 work respectively under X11 nested mode.
For the native backend implementation, we'll need a special Clutter
function, so don't implement that for now.
2014-05-27 14:28:35 -04:00
Florian Müllner
0a9187a6e9 window: Add accessor method for gtk_theme_variant
This is useful information for UI associated with a window, so add
a corresponding method.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
Florian Müllner
31db32e826 Actually implement opening the app menu
The last commit added support for the "appmenu" button in decorations,
but didn't actually implement it. Add a new MetaWindowMenuType parameter
to the show_window_menu () functions and use it to ask the compositor
to display the app menu when the new button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
Florian Müllner
c2ea650b3c Add support for app-menu button in window decorations
We want to synchronize the button layouts of our server side
decorations and GTK+'s client side ones. However each currently
may contain buttons not supported by the other, which makes this
unnecessarily tricky.
So add support for a new "appmenu" button in the layout, to display
the fallback app menu in the decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:05 +02:00
Jasper St. Pierre
969131f00e core: Reindent 2014-05-27 13:25:25 -04:00
Jasper St. Pierre
c98090c061 constraints: Remove improper frame_rect_to_client_rect for placement
Constriants are now in frame rect coordinates.
2014-05-26 13:27:54 -04:00
Jasper St. Pierre
3168d3b5e6 window: Move the extents storage above the rects
So all the rects are grouped together.
2014-05-24 20:47:56 -04:00
Jasper St. Pierre
efcd7d86e7 wayland: Add support for show_window_menu 2014-05-24 15:56:04 -04:00
Florian Müllner
04449923bd Remove MetaMenuIconType
Unused since 2006, quick, before we hit the 10-year mark!
2014-05-23 20:45:55 +02:00
Jasper St. Pierre
47b3336ffa monitor-manager-xrandr: Make sure to XFlush the XUngrabServer
Otherwise, the server may not receive our request, meaning that
we'll hang onto the server grab forever.
2014-05-22 17:39:46 -04:00
Jasper St. Pierre
0f37c1b58e keybindings: Replace the incomprehensible set of flags with a gravity param 2014-05-22 16:09:14 -04:00
Jasper St. Pierre
a3747725ed window-wayland: Don't use meta_window_get_position 2014-05-22 15:47:30 -04:00
Jasper St. Pierre
c448650a60 keybindings: Correct move_to_corner_backend
meta_window_get_position() returns the client rect position, which
we then pass to meta_window_move_frame. Just use the existing frame
rect coordinates.
2014-05-22 15:47:30 -04:00
Jasper St. Pierre
c45f616fdc keybindings: Fix code style 2014-05-22 15:47:30 -04:00
Jasper St. Pierre
9402691aaa window-x11: Remove a use of meta_window_get_position 2014-05-22 15:47:29 -04:00
Jasper St. Pierre
cbffbb0be0 window: Rename the requested_rect to the unconstrained_rect
The requested_rect is a strange name for it, because it's not actually
the rect that the user or client requested all the time: in the case of
a simple move or a simple resize, we calculate some of the fields
ourselves.

To the MetaWindow subclass implementations, it just means "the rect
before we constrained it", so just use the name unconstrained_rect.
This also makes it match the name of the MetaWindow field.
2014-05-22 15:39:10 -04:00
Jasper St. Pierre
9df5b17940 window: Allow passing garbage window sizes for move-only actions
We'll just fix them up in meta_window_move_resize_internal.
2014-05-22 15:39:10 -04:00