1
0
Fork 0
Commit graph

193 commits

Author SHA1 Message Date
Jasper St. Pierre
2345b9c6ad xprops: Fix syntax error 2015-06-17 18:19:53 -07:00
Jasper St. Pierre
af7cc87bfa xprops: More XFree => g_free compatibility 2015-06-17 18:18:43 -07:00
Jasper St. Pierre
af3b599cbb xprops: Remove cvtINT32toInt
These are awful compatibility hacks for systems without native 64-bit
support. We can trash these now.
2015-06-17 18:18:03 -07:00
Jasper St. Pierre
0e73ceb4bd x11: Remove async-getprop
xcb can do this for us now.
2015-06-17 18:08:11 -07:00
Carlos Garnacho
4fc1811c15 wayland: Add X11/wayland selection interoperation
This piece of code hooks in both wl_data_device and the relevant X
selection events, an X11 Window is set up so it can act as the clipboard
owner when any wayland client owns the selection, reacting to
SelectionRequest events, and returning the data from the wayland client
FD to any X11 requestor through X properties.

In the opposite direction, SelectionNotify messages are received,
which results in the property contents being converted then written
into the wayland requestor's FD.

This code also takes care of the handling incremental transfers through
the INCR property type, reading/writing data chunk by chunk.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-15 17:43:53 +02: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
Florian Müllner
67a30b7a89 window-x11: Fix height computation of shaded windows
Since commit 6e06648f7, we start out with the invisible frame parts
only, and then add the unconstrained rect's height (which consists of
the visible parts of both frame and client window) *unless* the window
is shaded. While we indeed don't want to add the client height in that
case, we need to explicitly include the visible frame parts now.

https://bugzilla.gnome.org/show_bug.cgi?id=746145
2015-03-13 14:08:12 +01:00
Carlos Garnacho
68ba45bcb2 Revert "x11: Cut some slack to clients doing slow draws/resizes"
As per https://bugzilla.gnome.org/show_bug.cgi?id=740424#c12

This reverts commit 94c3c8f412.
2015-03-12 18:41:57 +01:00
Carlos Garnacho
94c3c8f412 x11: Cut some slack to clients doing slow draws/resizes
The timer to blacklist the window from frame sync is set at the time of
issuing the sync request, but not removed until the client replies to
the most recent wait serial.

This means that if the client is slowly catching up, the timeout would
fire up regardless of the client slowly updating the alarm to older
values.

Fix this by ensuring the timeout is reset everytime the sync request
counter is updated, to acknowledge the client is not irresponsive,
just slow.

https://bugzilla.gnome.org/show_bug.cgi?id=740424
2015-03-05 17:07:32 +01: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
Jasper St. Pierre
9b903e93e3 iconcache: Fix the icon of Kerbel Space Program
Kerbel Space Program, and perhaps some other SDL-based programs, use
a really dumb way of specifying icons, which is totally
non-standards-compliant.

The ICCCM specifies that the icon_pixmap field of WM_HINTS should be a
1-bit-deep Pixmap, but we've seen applications set it to a pixmap of the
root depth as well, so we support that.

Kerbel Space Program seems to use it with a 32-bit depth Pixmap,
signifying ARGB32 (which it is), along with a 1-bit icon_mask, which
crashes us.

Keep in mind that Pixmaps, by definition, have no Visual attached, so
we simply have to make a guess at the correct visual based on the
depth. Do that by assuming that a depth-32 visual always means ARGB32,
which is a pretty safe bet.
2015-02-17 23:45:02 -08:00
Jasper St. Pierre
7966f00a18 iconcache: Fix a dumb thinko
This is an xlib surface, not an image surface.
2015-02-17 23:45:02 -08:00
Cosimo Cecchi
11a9b4baa0 window-props: use memcmp() to compare GtkBorder structs
Saves some code.

https://bugzilla.gnome.org/show_bug.cgi?id=744500
2015-02-13 15:49:03 -08:00
Florian Müllner
e294f6df8c window-x11: Fix typo 2015-01-21 13:27:09 +01:00
Florian Müllner
422ddeddb9 window-x11: Remove duplicated condition
The outer block already checks for window->frame, so don't repeat
it.
2015-01-21 13:27:09 +01: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
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
6609d9c6a4 iconcache: Fix icon data copy into cairo surface
The stride is in bytes but we're copying ints.

https://bugzilla.gnome.org/show_bug.cgi?id=742825
2015-01-13 16:01:13 +01:00
Jasper St. Pierre
90111c03a1 Only poke the frames UI code from inside frame.c
Add frame.c wrappers for the missing calls, then adapt.
2014-12-31 22:35:29 -08:00
Jasper St. Pierre
23681800d9 frame: Remove extra argument from sync_to_window 2014-12-31 22:35:29 -08:00
Jasper St. Pierre
af7f51b992 x11: Change the iconcache / window icons to being cairo surfaces
This simplifies the drawing codepath and makes us able to delete
a bunch of GdkPixbuf manipulation.
2014-12-31 21:11:21 -08:00
Jasper St. Pierre
2dd1f37820 Move the resizepopup to a compositor-side feature
This is the last big feature that requires X11 on Wayland, so let's just
trash it and make GNOME Shell reimplement it.
2014-12-29 17:44:41 -08:00
Jasper St. Pierre
b10a017446 events: Don't bother free-guarding
free already takes NULL just fine.
2014-12-28 19:51:22 -08:00
Jasper St. Pierre
d393cba39e events: Add a quick method to return a spewed event
For easy gcc debugging
2014-12-28 19:51:21 -08:00
Jasper St. Pierre
578f593d56 events: Remove unnecessary G_GNUC_UNUSED from spew subfunctions
Being used by an unused function is good enough for gcc to not complain.
2014-12-28 19:43:11 -08:00
Jasper St. Pierre
c782078e00 Rename MetaMoveResizeFlags items to fit with the theme
Use a proper prefix, even if more wordy, instead of META_IS.
2014-12-15 13:30:39 -08:00
Jasper St. Pierre
c408cf7aac window-x11: Fix windows that set empty input shapes
Windows that set empty input shapes get n_rects of 0 when querying them
later, which makes sense, but the code that interpreted the result
translated it into a NULL input shape, which meant it was the same as
the bounding region. As such, an empty input shape would actually get
interpreted as a full input shape!

We, ourselves, set an empty input shape on tray icon windows in
gnome-shell since we would handle the picking ourselves. This meant that
we'd actually get the MetaSurfaceActorX11 when hovering over the tray
icon, instead of the ShellGTKEmbed that we capture events on and react
to.

This fixes weird tray icon behavior in gnome-shell.
2014-11-26 12:51:35 -08:00
Jasper St. Pierre
5c80c4b006 window-x11: Update the input region after setting the client rect
We clip the input region to the client rect, so the client rect should
be up to date before we fetch the input region.

This fixes popup windows not working in GTK+2 under Wayland.

We should also update the shape / input regions when the window is
reconfigured for a complete fix, so that making an O-R window bigger
doesn't confuse mutter, but let's leave that to a future commit.
2014-10-12 16:14:17 -07:00
Jasper St. Pierre
461aea47dd window: Adjust the frame rect when _GTK_FRAME_EXTENTS is set on map 2014-09-19 17:35:38 -06:00
Jasper St. Pierre
d87093fe29 window: Don't queue move/resizes if the extents are the same
GTK+ sets the frame extents on every allocation, so don't bother doing
any extra work if things are the same.
2014-09-19 17:35:38 -06:00
Jasper St. Pierre
0cde7879d6 window: Move set_custom_frame_extents to be X11-only
Wayland doesn't use custom frame extents anymore -- it uses a full
geometry description.
2014-09-19 17:35:38 -06:00
Owen W. Taylor
89ffcee7ca Fix computation of window positions for StaticGravity
When adjust_for_gravity() was simplified (01b6445708), the correct
handling of StaticGravity dropped out - fix adjust_for_gravity() to do
nothing in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=736719
2014-09-19 15:41:22 -04:00
Owen W. Taylor
1250afef7b Revert "window-x11: Fix the coordinates we use in the synthetic ConfigureNotify"
The coordinates in ConfigureNotify *should* be the coordinates of the
client window; using the coordinates of the frame window compensated for
a problem with the interpretation of StaticGravity for some clients but
broke other clients.

This reverts commit f4f70afe31.

https://bugzilla.gnome.org/show_bug.cgi?id=736719
2014-09-19 15:41:22 -04:00
Jasper St. Pierre
c8cc4344f2 events: Only process Enter/Leave events when in the normal route
This prevents issues from happening when processing Enter/Leave events
while in another kind of grab op like a Wayland popup or resizing a
window.

This can't ever really happen except outside of a race condition,
with the X server, since we won't ever pass input events to the
X server in any of these cases, but it can't hurt to be more correct
about what the intended operation is.
2014-09-16 20:31:13 -06:00
Jasper St. Pierre
ae292c856b events: Ignore normal FocusIn events on the root window
GTK+ focuses its own windows with RevertToParent, which means that when
a GTK+ CSD window is destroyed, the X server will set the focus back to
the root window. The event stream that we is an UnmapNotify followed by
a FocusOut event. Our own UnmapNotify-handling code unmanages the window
and forcibly changes the focus to the next default window in the stack.

Since UnmapNotify events don't come with timestamps, we query for one,
and set the window focus using that.

But there's *still* a FocusOut event in the stack, with an older
timestamp and serial than our own focusing. We see this, throw it out
since it's older than the most recent focus, but then our own code that
notices the root has been focused kicks in and tries to focus the
default window... using a timestamp older than our most recent focusing.

meta_display_sanity_check_timestamps notices this, and (rightly so)
puts a warning in our face, telling something is awry.

Only let our workarounds kick in when the event is new enough, otherwise
our code will get confused over old events.

This stops the:

Window manager warning: last_focus_time (367917173) is greater than comparison timestamp (367917170).  This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW.  Trying to work around...

warning spam when closing a CSD window.
2014-09-16 20:25:51 -06:00
Jasper St. Pierre
35dd1e644d events: Remove our workarounds for broken libXi versions
We now depend on a recent enough libXi that fixes broken locking in
XIGrabTouchBegin, so we don't need to carry this around anymore.
2014-09-16 20:10:59 -06:00
Jasper St. Pierre
be85ead2f8 events: Fix a typo preventing the None detection from working properly
XINotifyDetailNone is a value for detail, not for mode.
2014-09-16 19:53:33 -06:00
Owen W. Taylor
611f6741c2 windows-x11.c: Fix leaked error trap
The merge of the commit af46ef3b 'meta_window_new: clean up error handling'
to the wayland branch accidentally added an extra call to meta_error_trap_push(),
meaning that we leaked one level of error traps for each new window.

Fixes warning:
  Gdk-WARNING **: XSetErrorHandler() called with a GDK error trap pushed.

https://bugzilla.gnome.org/show_bug.cgi?id=736589
2014-09-12 17:28:53 -04:00
Owen W. Taylor
df2587a61c Don't pass configure events on the composite overlay window to MetaStackTracker
When the screen resizes, we get a configure event for the composite overlay
window - don't pass that to MetaStackTracker, since the COW isn't in the
stack.

Fixes warning:
 mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x65 not in stack
2014-09-12 16:37:20 -04:00
Owen W. Taylor
44ecb1c050 Add meta_display_set_alarm_filter()
Add a private hook for the test framework to get XSyncAlarmEvent events -
this will be used to implement XSyncCounter based synchronization
so that the test framework can deterministically wait until Mutter
has seen actions performed by an X11 client.

https://bugzilla.gnome.org/show_bug.cgi?id=736505
2014-09-12 11:00:55 -04:00
Jasper St. Pierre
96bee8e60d Conditionalize some more Wayland support 2014-09-03 19:51:02 -07:00
Jasper St. Pierre
f4f70afe31 window-x11: Fix the coordinates we use in the synthetic ConfigureNotify
Before, we were using the root window coordinates of the client window,
rather than the toplevel frame window. This caused various Java programs
and programs like VirtualBox and WINE to get confused about where their
window actually is, and make bad ConfigureRequests when trying to
position their windows in the future.

Remove the mass of code here by just using window->rect.
2014-08-18 14:41:36 -04:00
Jasper St. Pierre
527c53a2a0 workspace: Rewrite workspace management code
The existing workspace management code is quite hairy, with plenty of
logic inline in all of window.c, workspace.c, and screen.c, making it
hard to understand or make changes to, since you might forget to change
several of the other places the code was around.

Rewrite the internal workspace management logic so that it's
centralized and all in window.c. Document the invariants we need to
maintain, and ensure that these invariants are properly kept, with
asserts in various places.

Extensive testing on gnome-shell did not bring up any issues, and this
is a considerable cleanup.
2014-08-16 14:59:13 -04:00
Jasper St. Pierre
f8dcea3975 window-x11: Simplify some grab op code 2014-08-15 13:46:54 -04:00
Jasper St. Pierre
b8c13cc426 window-x11: Fix stage window check when running under non-X11 backends
This code also runs when under the native backend for XWayland, so we
can't crash on an invalid cast there.
2014-08-15 12:38:15 -04:00
Adel Gadllah
38253a9f73 window-x11: The x11 backend window is our window as well
Since commit 467465c99c we use meta_stage even on x11 which sets
clutter_stage_set_user_resizable to FALSE.

This messes things up because we ought to ignore the properties on the window
but we apperently didn't.

There is no reason why we'd want to manage the stage window.

https://bugzilla.gnome.org/show_bug.cgi?id=734852
2014-08-15 17:53:27 +02:00
Jasper St. Pierre
39f65f9f86 backend: Add a keymap-changed signal 2014-08-14 17:36:29 -04:00
Jasper St. Pierre
e830b66604 Remove a few extra HAVE_XKBs 2014-08-14 14:19:31 -04:00
Jasper St. Pierre
5f0fab2156 Conditionalize Wayland support again 2014-08-13 20:28:22 -04:00
Jasper St. Pierre
879407c10c window: Kill off a now-unnecessary state variable 2014-08-13 18:25:46 -04:00
Rui Matos
513628e4ad wayland-keyboard: Use the backend's keymap
Instead of getting it from xwayland, let's just keep a reference to
the backend's keymap.

https://bugzilla.gnome.org/show_bug.cgi?id=734301
2014-08-07 11:24:24 +02:00
Florian Müllner
b7119c55a6 window-props: Add FORCE_INIT flag to force hooks for unset properties
Since commit a7b7213017, we rely on the standard property
system to initialize the window type (and likewise for the window
role since commit 031154a400). However as property hooks are
never run for properties that are not set, we end up not initializing
the window type correctly for windows with no _NET_WM_WINDOW_TYPE
property (which includes virtually all OR windows, causing them to
show up in pagers and the Shell overview and resulting in frequent
crashes due to breaking reasonable assumptions all over the place).

Introduce a new FORCE_INIT flag to allow forcing hooks to run
even when the corresponding property is unset, and use it for
both _NET_WM_WINDOW_TYPE and _NET_WM_WINDOW_ROLE.
2014-08-02 20:26:00 +02:00
Jasper St. Pierre
7159d3bc35 window: Remove the concept of surface_mapped
The implementation was just wrong. We now consider it an error to attach
a NULL buffer to an xdg_surface. Users should destroy the surface properly.
2014-07-14 14:49:58 -04:00
Jasper St. Pierre
941d202938 window: Move X11-specific icon code to MetaWindowX11 2014-07-14 12:15:23 -04:00
Jasper St. Pierre
5ea0cf8bab iconcache: Remove a useless icon_cache_free
All it does is poke a few fields. There is no point to it.
2014-07-14 12:02:58 -04:00
Jasper St. Pierre
06e4778072 iconcache: Group declarations where they're used 2014-07-14 11:30:03 -04:00
Jasper St. Pierre
92388892b3 iconcache: Remove dead code 2014-07-14 11:27:51 -04:00
Jasper St. Pierre
5d124ac00a iconcache: Remove commented out code 2014-07-14 11:27:51 -04:00
Jasper St. Pierre
a57c3ae105 iconcache: Remove want_fallback hint
It's unused, and if it was ever set, it would cause an assert fail.
2014-07-14 11:27:50 -04:00
Jasper St. Pierre
39357fc242 window-props: Don't make another round-trip to fetch the opaque region
We already have the property value from our property fetching.
2014-07-13 22:51:25 -04:00
Jasper St. Pierre
46361c3e28 events: Return early if we close the display
This is so we won't poke into the MetaDisplay, which is invalid memory,
and crash. This can sometimes work right now because GSlice might not
deallocate the object immediately, but it's still not a fun thing to do.
2014-07-13 11:43:28 -04:00
Jasper St. Pierre
bee97ab6a7 window-props: Make sure that recalc_window_type is always called 2014-07-10 17:07:52 -04:00
Jasper St. Pierre
b87db00fdb window-props: Fizzle out PropertyNotifies that happen after initial map
Properties like _NET_WM_DESKTOP and _NET_WM_STATE are supposed to be
ignored after the initial map of the window, so ignore any
PropertyNotifies for these.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
6190b65056 window-props: Use a flags-based approach for our prop hooks
This allows us to extend the table better with newer flags.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
10fe91d704 window-props: Don't load WM_STATE
Since we don't do anything with it.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
36bb05b10e window-props: Fix assert testing
I have *no* idea how this even compiled in the first place. What the hell?
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
a7b7213017 window-props: Use the standard property type system for _NET_WM_WINDOW_TYPE 2014-07-10 15:05:40 -04:00
Jasper St. Pierre
031154a400 window-props: Use the standard property type system for WM_WINDOW_ROLE
There seems to be no reason we can't just use this.
2014-07-10 14:56:23 -04:00
Jasper St. Pierre
463b50e746 screen: Fetch the COW window up-front
XGetCompositeOverlayWindow is a round trip to the X server. We shouldn't
be doing it on every MapWindow.
2014-07-10 14:18:02 -04:00
Jasper St. Pierre
1af9e92e91 Don't add in our old input event mask when we select input events
This causes a round-trip to the server, and just isn't necessary, since
we're always in charge of our event mask.
2014-07-10 13:30:05 -04:00
Jasper St. Pierre
203e5335ab window-x11: Fizzle out changes to the three different regions
GTK+ likes to set these, well, _NET_WM_OPAQUE_REGION in particular, to
the same value. Save some expensive and processing when this happens. We
should probably make GTK+ smarter.
2014-06-27 12:18:42 -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
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
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
3c0fae74f1 window: Move get_toplevel_xwindow to window-x11 2014-06-16 18:29:38 -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
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
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
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
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
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
0890eaa3fe window: Rename get_geometry to get_session_geometry 2014-05-27 15:15:56 -04: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
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
feae23506b window-x11: Move the comment about StaticGravity resizing down 2014-05-22 15:39:09 -04:00
Jasper St. Pierre
6513cbb470 Add back coordinates to the window menu
It looks weird to have Alt+Space pop up under the cursor instead
of the top-left corner of the window, and the Wayland request will
pass through the coordinates as well.

Add it to the compositor interface, and extend the
_GTK_SHOW_WINDOW_MENU ClientMessage to support it as well.
2014-05-22 10:50:57 -04:00
Jasper St. Pierre
50b81fe4b9 x11: Add support for a new _GTK_SHOW_WINDOW_MENU request
To show the window menu from a client-side decoration.
2014-05-21 18:55:47 -04:00
Jasper St. Pierre
3f1b6ddc8f window-x11: Rearrange locals a tiny bit 2014-05-21 13:03:39 -04:00
Jasper St. Pierre
aa84813400 window-x11: Calculate size_dx / size_dy before assigning to window->rect
This makes sure that we grow / shrink the frame and window in the
correct order.
2014-05-21 13:02:26 -04:00
Jasper St. Pierre
dd243813e1 window-x11: Simplify leftovers from the static gravity code removal 2014-05-21 12:52:44 -04:00
Jasper St. Pierre
d8c2933c58 window-x11: Don't bother calculating the actual deltas for the frame
It's not necessary. All we care about is whether the size / position
has changed.
2014-05-21 12:25:27 -04:00
Jasper St. Pierre
2b798511de window-x11: Consistently include the bottom border on shaded windows
We already do it in the theme code, but not the actual WM code. Since
we include the left/right borders, it only seems fair to include the
bottom border.

This effectively makes it so that shading a window means that the
client window "slot" has 0 height.
2014-05-21 12:21:05 -04:00
Jasper St. Pierre
e215c07439 window: Make border_width private to X11 2014-05-20 15:59:17 -04:00
Jasper St. Pierre
5b7dff7a57 window: Move constructors to the respective header files 2014-05-20 15:59:17 -04:00
Jasper St. Pierre
ecb4e09ec5 window-x11: Make sure to chain up in grab_op_began / ended
To make sure shaken_loose gets reset.
2014-05-20 15:59:16 -04:00
Jasper St. Pierre
d02505852d window: Move _NET_WM_DESKTOP setting to window-x11 2014-05-20 15:59:16 -04:00