1
0
Fork 0
Commit graph

500 commits

Author SHA1 Message Date
Florian Müllner
5defe574d7 window: Treat CurrentTime as legal timestamp in activation
Effectively we have been accepting CurrentTime timestamps for years,
but still complained about "stupid pagers" when encountering them;
just accept that we will never limit treating 0 timestamps as current
time to pagers.

https://bugzilla.gnome.org/show_bug.cgi?id=728018
2014-04-15 17:23:22 +02:00
Jasper St. Pierre
59541dfa14 window: Initialize the result here
The vfuncs simply |= their results into the result variable, so we
need to make sure we start out with nothing.
2014-04-12 10:08:36 -07:00
Bastien Nocera
d53e04f4c8 Name all timeouts and idles
Better names can be used once we make more use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=727979
2014-04-10 18:59:46 +02:00
Nirbheek Chauhan
b37223b9bb window: Use guint8 for opacity internally
Except while reading _NET_WM_WINDOW_OPACITY, opacity is between 0 and 255. With
guint8, we'll get compiler warnings if arbitrary int values are passed.

https://bugzilla.gnome.org/show_bug.cgi?id=727874
2014-04-10 18:15:25 +02:00
Jasper St. Pierre
954677dcbd window: Make sure to end the grab even if the last action was a snap
This seems to be a cherry-pick failure while we were switching event
handling around. This matches what the master branch does.
2014-04-09 12:40:13 -07:00
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Jasper St. Pierre
3c404c5db3 wayland: Replace make_toplevel / window_unmanaging with set_window
The make_toplevel / window_unmanaging interface has never made
a lot of sense to me. Replace it with set_window, which does
effectively the same thing.

It's still not perfect in the case of XWayland, but I don't think
XWayland will ever make me happy.
2014-04-02 11:41:07 -04:00
Jasper St. Pierre
b367965f6c window: Track known_to_compositor and visible_to_compositor separately
Really, visible_to_compositor means that the window is shown, e.g.
not minimized. We need to be using a boolean tracking whether we've
called meta_compositor_add_window / meta_compositor_remove_window.

This fixes a jump during window placement when a window appears.
2014-03-28 13:52:59 -04:00
Jasper St. Pierre
ed9dbf6aa2 window: Ensure that visible_to_compositor is set when unmanaging
visible_to_compositor should always be in sync with show_window /
hide_window calls, even when unmananging.

This fixes a crash where we call sync_window_state when the window
is unmanaging, since we use visible_to_compositor to determine whether
the compositor will crash.

This is actually wrong; we should be using the knowledge about
whether we have called add_window / remove_window. We'll introduce
this with a new boolean next time.
2014-03-28 13:51:34 -04:00
Jasper St. Pierre
d7519f4ebc Remove any possibility for zaphod mode
We previously separated out MetaDisplay and MetaScreen. mutter
would only manage one screen, but we still kept a list of screens
for simplicity.

With Wayland support, we no longer care about the ability to
manage more than one screen at a time. Remove this by killing
the list of screens, in favor of having just one MetaScreen
in MetaDisplay.

We also kill off active_screen at the same time, since it's
not necessary anymore.

A future cleanup should merge MetaDisplay and MetaScreen. To avoid
breaking API, we should probably keep MetaScreen around as a dummy
type.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
42491f7724 window: Actually interpret the FRAME_SHAPE_CHANGED result
When I refactored this out into a vfunc, I forgot to change the
code that interprets the result flags to actually respect the
new FRAME_SHAPE_CHANGED result flag.

Since we weren't ever clearing the frame bounds, this meant that
the "shadow clip" wasn't ever updated as a result. Since right now
all Wayland surfaces are considered ARGB32, we always clip shadows
under frames, and thus shadows had this weird "punch-out" from the
first frame shape.
2014-03-20 18:03:35 -04:00
Jasper St. Pierre
337db2a660 window: Kill off the rest of colormaps
I removed the XInstallColormap / XUninstallColormap but forgot
to remove the fields in MetaWindow and the code to set them.
2014-03-20 16:27:22 -04:00
Jasper St. Pierre
054c307353 window: Remove support for colormaps
While the ICCCM mandates the use of this, it's not necessary under
a composited environment from my understanding, and it's a flat
out no-op under XWayland.

Looking at the other rootless servers like Xwin/Xquartz, it seems
that they contain code for colormap emulation, but they're actually
never used -- a bug prevents the code from ever being called. Given
that it's been this way since 2003, I'm going to hazard a guess that
not many apps using colormaps. Kill them off.
2014-03-20 16:25:09 -04:00
Jasper St. Pierre
852589897e Move send_icccm_message to window-x11 2014-03-20 16:22:15 -04:00
Jasper St. Pierre
0808adefaf Move focus to be a vfunc 2014-03-20 15:20:15 -04:00
Jasper St. Pierre
a53e094fcd window: Move move_resize_internal logic to protocol-specific directories 2014-03-20 11:02:50 -04:00
Jasper St. Pierre
a377a1a110 window: Move client-type-specific managing / unmanaging to a vfunc 2014-03-20 10:51:32 -04:00
Jasper St. Pierre
74a1e00e30 window: MetaWindow is now abstract 2014-03-20 10:50:27 -04:00
Jasper St. Pierre
1c41f71eef window: Add a type for Wayland windows 2014-03-20 10:50:27 -04:00
Jasper St. Pierre
63350c52cc window: Remove code for static gravity resizes
It was never turned on for all the years it's been there.
2014-03-20 10:50:27 -04:00
Jasper St. Pierre
a1427c7130 Revert "Move MetaGroup to be X11-specific"
This reverts commit f940292cfe.

Turns out MetaGroup was public API and was used by gnome-shell.
Ugh.
2014-03-19 09:12:48 -04:00
Jasper St. Pierre
5fa5ace5e6 Move session to x11/
XSMP code is X11-specific, of course.
2014-03-18 22:04:36 -04:00
Jasper St. Pierre
044c06bff3 Don't include wayland/ by default either 2014-03-18 22:04:36 -04:00
Jasper St. Pierre
a3ccc4fd1c Remove x11/ directory from default include path 2014-03-18 22:04:36 -04:00
Jasper St. Pierre
0a20f7458c window: Remove support for _NET_WM_ICON_NAME
We don't seem to use it anywhere.
2014-03-18 22:04:36 -04:00
Jasper St. Pierre
f940292cfe Move MetaGroup to be X11-specific 2014-03-18 21:23:36 -04:00
Jasper St. Pierre
48a36356dd window: Make window->desc a bit clearer
And remove the hack for the "broken GNU libc". It works fine on
my system here.
2014-03-18 21:23:34 -04:00
Jasper St. Pierre
f05983be42 window: Move type_atom to window-x11 2014-03-18 21:15:49 -04:00
Jasper St. Pierre
43a409dec4 window: Don't sync window geometry when we haven't shown it yet 2014-03-18 18:55:32 -04:00
Jasper St. Pierre
8b2b65246a Assume the compositor always exists
At one point, it was supported to run mutter without a compositor,
but we don't allow that any longer. A lot of code already assumes
display->compositor exists and doesn't check for a NULL pointer,
so just kill the rest of the checks.
2014-03-18 18:25:32 -04:00
Jasper St. Pierre
da48b18188 window: Fix build
A bad rebase on top of some other GObject cleanups I had made
this go sour.
2014-03-18 16:45:53 -04:00
Jasper St. Pierre
a5f1790828 window: Rename wm_hints_urgent to urgent
The flag and setter is now decoupled from the WM_HINTS state.
2014-03-18 15:44:11 -04:00
Jasper St. Pierre
6efcf2526d window: Move urgency to a setter 2014-03-18 15:44:11 -04:00
Jasper St. Pierre
d6a27195d3 Move more fields to MetaWindowX11 2014-03-18 15:44:11 -04:00
Jasper St. Pierre
6f7023bc6b Start splitting the X11-specific stuff of MetaWindow out into a subclass
This is fairly simple and basic for now, with just skip_taskbar /
skip_pager, but eventually a lot of "WM policy" like this, including
move-resize, will be in subclasses for each individual surface.
2014-03-18 15:44:11 -04:00
Jasper St. Pierre
63b158e4da window: Split out recalc of skip_taskbar / skip_pager
This will be our first attempt for the MetaWindowX11Private
2014-03-18 15:44:11 -04:00
Jasper St. Pierre
3de58189c0 window: Remove an unused bit 2014-03-18 13:18:52 -04:00
Jasper St. Pierre
5270c469a3 window: Remove meta_window_set_gravity as "public" API 2014-03-18 11:24:24 -04:00
Jasper St. Pierre
7504f16e59 Replace wm_state_modal usage with META_WINDOW_TYPE_DIALOG 2014-03-18 11:24:24 -04:00
Jasper St. Pierre
cdb7947dd1 window: Remove meta_window_is_modal
It relies on EWMH concepts. Wayland simply has a MODAL_DIALOG type.
2014-03-18 11:24:24 -04:00
Jasper St. Pierre
cdfc6f5b53 window: Remove vfunc slots for signals
These aren't used currently, and we're going to be adding
more vfuncs.
2014-03-18 11:24:24 -04:00
Jasper St. Pierre
fcb2ab41b2 window: Remove another bogus comment
It's not referring to anything!
2014-03-18 11:24:16 -04:00
Jasper St. Pierre
cb549154aa window: Move meta_window_configure_notify to window-x11 2014-03-18 11:24:16 -04:00
Jasper St. Pierre
1f15c85c00 window: Make window_is_terminal private 2014-03-18 10:25:54 -04:00
Jasper St. Pierre
8b4c5459c0 window: Remove transient_for_as_xid
It's unused, and it exposes an X11-specific property to API.
2014-03-18 10:07:07 -04:00
Jasper St. Pierre
3c6dd5bf6d window: Export a bunch of state flags as accessor methods
This is necessary to reimplement window menus in gnome-shell.
2014-03-15 09:49:56 -04:00
Jasper St. Pierre
0f85986340 Add a META_MAXIMIZE_BOTH
Which has the value of META_MAXIMIZE_VERTICAL |
META_MAXIMIZE_HORIZONTAL.

This is an obvious code cleanup.
2014-03-15 09:49:56 -04:00
Jasper St. Pierre
a9d8107c3d window: Replace meta_window_type_changed with meta_window_set_type
Which does the equality checking for us.
2014-03-13 17:14:28 -04:00
Jasper St. Pierre
a5d2c51392 window: Move recalc_type to window-x11.c
It's only used by the X11 codepath.
2014-03-13 17:14:28 -04:00
Jasper St. Pierre
b37ad66e9d xdg-shell: Update for new state change mechanism
We're still not properly going through the request system. This
will require a dense investigation of the code, but it will happen
soon...
2014-03-12 23:42:55 -04:00
Owen W. Taylor
2cf80bc647 Fix identification of CSD windows when checking whether to force fullscreen
We try to exempt CSD windows from being forced fullscreen if they are
undecorated and the size of the screen; however, we also catch almost
all windows that *do* need to be forced fullscreen in this check, since
they also have decorations turned off.

Identify actual CSD windows by checking whether _GTK_FRAME_EXTENTS is set -
GTK+ will always set this on CSD windows even if they have no invisible
borders or shadows at the current time.

We explicitly turn off the legacy-fullscreen check for native wayland windows
so we don't start legacy-fullscreening them if the new
meta_window_is_client_decorated() is later made more accurate.

https://bugzilla.gnome.org/show_bug.cgi?id=723029
2014-03-11 13:02:19 -04:00
Owen W. Taylor
40c15f6e2a Fix meta_window_titlebar_is_onscreen() for titlebar-less windows
Make the code correspond to the comment - the titlebar can't be
offscreen if there's no titlebar.

https://bugzilla.gnome.org/show_bug.cgi?id=723580
2014-03-11 13:02:19 -04:00
Jasper St. Pierre
a8849621c9 window: Always save the user_rect when resizing Wayland windows
The user_rect represents the unconstrainted window size, and lots
of code in mutter assumes it can resize to the user_rect at any
time. If we wait for an attach to ACK and save the user rect, we'll
see lots of flickering as code is resizing to the old user_rect
at any time.
2014-03-11 12:29:11 -04:00
Giovanni Campagna
bee59ec0e1 Use MetaCursorTracker to query the pointer position
Functionally equivalent in the X11 case, but also correct for
Wayland (where the X server doesn't have the updated pointer
position).

https://bugzilla.gnome.org/show_bug.cgi?id=725525
2014-03-05 23:09:48 +01:00
Jasper St. Pierre
268a4c92ba window: Fix meta_window_get_client_area_rect
The shaded logic here was backwards.
2014-02-27 10:33:10 -05:00
Giovanni Campagna
5c99eae8a9 display: clean up event handling
The only events we handle as XIEvents are FocusIn/Out, Enter and
Leave.  Motion, ButtonPress/Release, KeyPress/Release are handled
through clutter instead.
Among other things, this means we don't need to fake motion compression
by peeking over gdk event queue...
2014-02-27 14:57:52 +01:00
Jasper St. Pierre
ec2c3e1438 window: Add meta_window_get_client_area_rect 2014-02-26 19:54:41 -05:00
Giovanni Campagna
060e60f2a0 window: fix loading the window type initially
This code was lost in the window/window-x11 split.
2014-02-26 00:21:52 +01:00
Jasper St. Pierre
9b24ae2033 Revert "compositor: Delay meta_compositor_add_window until the first show"
This reverts commit 4efe4483fb.
2014-02-24 14:46:18 -05:00
Stefano Facchini
4de3f7ca29 Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-19 21:55:35 +01:00
Jasper St. Pierre
7615d17293 wayland: Tie activate / deactivate to appears-focused
... rather than actual focus. This makes things behave better.
2014-02-18 23:21:06 -05:00
Jasper St. Pierre
e62fe956fd window: Enable pinging on Wayland windows
I implemented pinging, but never actually enabled the feature
properly on Wayland surfaces by setting the net_wm_ping hint to
TRUE, causing the fallback path to always be hit.

Rename net_wm_ping to can_ping so it doesn't take on an
implementation-specific meaning, and set it for all Wayland windows.
2014-02-18 20:30:52 -05:00
Jasper St. Pierre
2a145262c7 wayland: Rework how surface destruction works
To prevent the MetaSurfaceActor from being destroyed, we normally
unparent it before we unmanage the window. However, this doesn't
work for XWayland windows, which we unmanage when we get UnmapNotify
or DestroyNotify, not when we get the wl_surface_destroy.

To solve this, add an early hook in meta_window_unmanage that
unparents the surface actor if we have one. At the same time, clean
up the destruction code to remove old comments and assumptions about
how wl_shell behaves.
2014-02-18 17:01:33 -05:00
Jasper St. Pierre
a66060e21a Revert "Move window pings to MetaWindow"
This was a bad idea, as ping/pong has moved to a client-specific
request/event pair, rather than a surface-specific one. Revert
the changes we made here and correct the code to make up for it.

This reverts commit aa3643cdde.
2014-02-16 10:21:22 -05:00
Jasper St. Pierre
a0ef7c7142 Move position-changed / size-changed signals to the MetaWindow
They fit more appropriately over here...

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:44:39 -05:00
Jasper St. Pierre
4efe4483fb compositor: Delay meta_compositor_add_window until the first show
In order for the compositor to properly determine whether a client
is an X11 client or not, we need to wait until XWayland calls
set_window_id to mark the surface as an XWayland client. To prevent
the compositor from getting tripped up over this, make sure that
the window has been fully initialized by the time we call
meta_compositor_add_window.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:44:38 -05:00
Jasper St. Pierre
aec3edb1cc Always map the client and frame windows
Traditionally, WMs unmap windows when minimizing them, and map them
when restoring them or wanting to show them for other reasons, like
upon creation.

However, as metacity morphed into mutter, we optionally chose to keep
windows mapped for the lifetime of the window under the user option
"live-window-previews", which makes the code keep windows mapped so it
can show window preview for minimized windows in other places, like
Alt-Tab and Expose.

I removed this preference two years ago mechanically, by removing all
the if statements, but never went through and cleaned up the code so
that windows are simply mapped for the lifetime of the window -- the
"architecture" of the old code that maps and unmaps on show/hide was
still there.

Remove this now.

The one case we still need to be careful of is shaded windows, in which
we do still unmap the client window. In the future, we might want to
show previews of shaded windows in the overview and Alt-Tab. In that
we'd also keep shaded windows mapped, and could remove all unmap logic,
but we'd need a more complex method of showing the shaded titlebar, such
as using a different actor.

At the same time, simplify the compositor interface by removing
meta_compositor_window_[un]mapped API, and instead adding/removing the
window on-demand.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:19:41 -05:00
Jasper St. Pierre
def5e86673 wayland: Add support for the set_margin request 2014-02-07 19:28:36 -05:00
Jasper St. Pierre
912a0abd26 wayland: Remove edges
This is an upstream change to xdg-shell.
2014-02-07 19:28:36 -05:00
Marek Ch
d6396cf2c4 window: fix coerced value
(int) 0.5 = 0, so there always was 0 instead of 50%
2014-02-02 15:17:29 +01:00
Jasper St. Pierre
8905bd2280 window-x11: Move meta_window_new to window-x11.c and rename 2014-02-01 19:19:22 -05:00
Jasper St. Pierre
b09e1399c0 window: Centralize WM_STATE management 2014-02-01 19:18:01 -05:00
Jasper St. Pierre
59c8b949ad window: Delay the showing of XWayland clients until set_window_id
Use our new "surface_mapped" field to delay the showing of XWayland clients
until we have associated together the window's XID and the Wayland surface ID.

This ensures that when we show this window to the compositor, it will properly
use the Wayland surface for rendering, rather than trying to use COMPOSITE and
crash.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 19:18:01 -05:00
Jasper St. Pierre
6dbb3fddce window: Fix build once more
Bad syntax here...
2014-02-01 19:08:27 -05:00
Jasper St. Pierre
f166240225 window: Clean up is_our_xwindow 2014-02-01 18:59:27 -05:00
Jasper St. Pierre
91b789c707 window: Split out logic for determining whether an X window is ours 2014-02-01 18:59:27 -05:00
Jasper St. Pierre
14db280fab window: Fix build
The proper function name is "meta_window_recalc_features"
2014-02-01 18:58:58 -05:00
Jasper St. Pierre
f7097e6f66 Start moving X11-specific code to window-x11.c
The goal here is to make MetaWindow represent a toplevel, managed window,
regardless of if it's X11 or Wayland, and build an abstraction layer up.
Right now, most of the X11 code is in core/ and the wayland code in wayland/,
but in the future, I want to move a lot of the X11 code to a new toplevel, x11/.
2014-02-01 18:39:12 -05:00
Jasper St. Pierre
ff89f1e271 window: Use window-props interface to load role/net_wm_type on init 2014-02-01 18:39:12 -05:00
Jasper St. Pierre
6a8a4bfdcd window: Remove internal recalc_window_type / recalc_window_features
Just use the public symbols for them.
2014-02-01 18:39:12 -05:00
Florian Müllner
cd35982d4e window: Remove duplicated function declaration 2014-02-01 18:38:54 -05:00
Florian Müllner
55b18f9671 window: Add "skip-taskbar" property
We currently only have a method to query the skip-taskbar hint.
Add a corresponding property to allow listening for change
notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=723307
2014-01-31 13:33:38 +01:00
Jasper St. Pierre
20545941fa Revert unintentional merge from wip/surface-content to wayland
This reverts a lot of commits.
2014-01-22 09:18:13 -05:00
Jasper St. Pierre
ac32b9ef95 get xwayland working again 2014-01-21 19:06:06 -05:00
Jasper St. Pierre
7ea537fad7 Move position-changed / size-changed signals to the MetaWindow
They fit more appropriately over here...

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
bfc906cbc4 compositor: Remove meta_compositor_window_[un]mapped
We no longer unmap the toplevel windows during normal operation. The
toplevel state is tied to the window's lifetime.

Call meta_compositor_add_window / meta_compositor_remove_window instead...
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
8e6f8087e8 Always map the client and frame windows
Traditionally, WMs unmap windows when minimizing them, and map them
when restoring them or wanting to show them for other reasons, like
upon creation.

However, as metacity morphed into mutter, we optionally chose to keep
windows mapped for the lifetime of the window under the user option
"live-window-previews", which makes the code keep windows mapped so it
can show window preview for minimized windows in other places, like
Alt-Tab and Expose.

I removed this preference two years ago mechanically, by removing all
the if statements, but never went through and cleaned up the code so
that windows are simply mapped for the lifetime of the window -- the
"architecture" of the old code that maps and unmaps on show/hide was
still there.

Remove this now.

The one case we still need to be careful of is shaded windows, in which
we do still unmap the client window. Theoretically, we might want to
show previews of shaded windows in the overview and Alt-Tab, so we remove
the complex unmap tracking for this later.
2014-01-21 19:01:18 -05:00
Andika Triwidada
9b21346427 Changed obsolete FSF postal address into generic URL.
Fix https://bugzilla.gnome.org/show_bug.cgi?id=721517 #2
2014-01-13 11:35:47 -05:00
Jasper St. Pierre
7a4adce44f window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage
When GDK sends an unmaximize _NET_WM_STATE ClientMessage, it tells us to remove
the _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT states. Before
this time, it would independently call:

  meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL);
  meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL);

Which, besides being foolishly inefficient, would also mess up our saved_rect
tracking, causing the window to only look like it was unmaximized vertically.

Make this code more intelligent, so it causes us to unmaximize in one call.

https://bugzilla.gnome.org/show_bug.cgi?id=722108
2014-01-13 11:35:47 -05:00
Daniel Drake
a5f0db5ecb window: don't grab server during calc_showing
This grab was added in commit caf43a123f
https://bugzilla.gnome.org/show_bug.cgi?id=381127
to minimize window flickering when switching workspaces.

While this grab is held, some signals are emitted to the shell,
which can lead to deadlocks (reproduced under Mali binary OpenGLESv2
drivers).

Now that we are a compositing window manager, we do not have to
worry about flickers, this grab should no longer be necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=721709
2014-01-07 14:27:24 -06:00
Daniel Drake
577624adef Reduce server grabs during window creation
Remove some obvious server grabs from the window creation codepath,
also ones that are taken at startup.

During startup, there is no need to grab: we install the event handlers
before querying for the already-existing windows, so there is no danger
that we will 'lose' some window. We might try to create a window twice
(if it comes back in the original query and then we get an event for it)
but the code is already protected against such conditions.

When windows are created later, we also do not need grabs, we just need
appropriate error checking as the window may be destroyed at any time
(or it may have already been destroyed).

The stack tracker is unaffected here - as it listens to CreateNotify and
DestroyNotify events and responds directly, the internal stack
representation will always be consistent even if the window goes away while
we are processing MapRequest or similar.

Now that there are no grabs we don't have to worry about explicitly calling
display_notify_window after grabs have been dropped. Fold that into
meta_window_new_shared().

https://bugzilla.gnome.org/show_bug.cgi?id=721345
2014-01-07 07:53:16 -06:00
Daniel Drake
af46ef3b96 meta_window_new: clean up error handling
The return code of XGetWindowAttributes() indicates whether an error
was encountered or not. There is no need to specifically check the error
trap.

The trap around XAddToSaveSet() was superfluous. We have a global error
trap to ignore any errors here, and there is no need to XSync() as GDK
will later ignore the error asynchronously if one is raised.

Also move common error exit path to an error label.

https://bugzilla.gnome.org/show_bug.cgi?id=721345
2014-01-07 07:44:31 -06:00
Daniel Drake
384a34c27d Remove meta_window_new_with_attrs
The compositor code used to handle X windows that didn't have a
corresponding MetaWindow (see commit d538690b), which is why the
attribute query is separated.

As that doesn't happen any more, we can clean up. No functional changes.

Suggested by Owen Taylor.

https://bugzilla.gnome.org/show_bug.cgi?id=721345
2014-01-07 07:17:06 -06:00
Owen W. Taylor
0caf7381bb display: Don't leave focus on a window we are unmanaging when sending WM_TAKE_FOCUS
When we move focus elsewhere when unmanaging a window, we *need* to move
the focus, so if the target is globally active, move the focus to the
no-focus-window in anticipation that the focus will normally get moved
to the right window when the target window responds to WM_TAKE_FOCUS.

If the window doesn't respond to WM_TAKE_FOCUS, then focus will be left
on the no-focus-window, but there's no way to distinguish whether the
app will respond or not.

https://bugzilla.gnome.org/show_bug.cgi?id=711618
2013-12-24 11:30:14 -05:00
Owen W. Taylor
a42305edab Be willing to unfocus the grab window when we are unmanaging it
When we are unmanaging the grab window, we /need/ to unfocus it,
so we shouldn't bail out early from meta_window_focus().

https://bugzilla.gnome.org/show_bug.cgi?id=711618
2013-12-24 11:30:11 -05:00
Owen W. Taylor
cb33e1942a meta_window_move_resize_internal: handle border size changes
Initial placement during meta_window_constrain() can result in changes
to the borders, so we need to recompute our border sizes after
constraining. This fixes incorrect window borders on
initially maximized windows.

https://bugzilla.gnome.org/show_bug.cgi?id=720417
2013-12-18 09:30:22 -05:00
Jasper St. Pierre
8131f34eb6 Move _NET_WM_WINDOW_OPACITY handling to the standard window-props interface 2013-12-09 15:53:23 -05:00
Jasper St. Pierre
f0fa4d831a window: Add a simple meta_window_get_toplevel_xwindow utility
To replace all the places where we do:

  window->frame ? window->frame->xwindow : window->xwindow

or similar...
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
ee683ff187 window: Fix meta_window_ping some more
Make sure to actually add the pings to the list... and don't
remove it from the list twice.
2013-12-06 20:23:00 -05:00
Jasper St. Pierre
fa65c380db Support X button events again
Do this by duplicating the current code and porting it to use
X again. A better approach would involve our own event structures,
and I really don't want to do that right now. We can clean this up
later.
2013-12-05 17:18:49 -05:00