When the window being hidden/mimimized has focus, is modal, but is not on the
currently active workspace (e.g., during workspace switch before the new
focus window is activated), we must prevent focus being passed to the modal
window ancestor (otherwise the ancestor ends up being forcefully moved onto
the active workspace).
Make meta_window_get_icon_geometry() public, so that it can be used
to from plugins to animate windows minimizing to the correct
position.
Based on a patch from Cosimo Cecchi <cosimoc@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=571109
The MetaDirection enumeration had META_SIDE_* values in it that
were used in some places where an enum with only four directions
was needed. Split this off into a separate enum called MetaSide
and use that enum name where appropriate.
Expose restacking and a window's stack layer to allow a compositor
to insert elements into the window stack in the right location.
(See Bug 571827 – hide panel when screensaver is active)
src/core/stack.h src/include/common.h: Move MetaStackLayer to
a public header.
src/core/screen.c src/core/screen-private.h src/core/stack.c:
Add a ::restacked signal emitted after we finish restracking.
src/core/window.h src/include/window.h: Add meta_window_get_layer()
In particular, make it so that we call meta_compositor_add_window() on
a new window before calling meta_compositor_sync_stack() to position
it. The list returned by mutter_plugin_get_windows() is only updated
by sync_stack(), but sync_stack() only pays attention to windows that
add_window() has already been called on. So without this change, a
newly-mapped window will not be returned by
mutter_plugin_get_windows() until after the *next* restacking.
http://bugzilla.openedhand.com/show_bug.cgi?id=1512
window property handlers. The ones which remain don't
actually look up the new value in the ordinary way, and
so are a little trickier to merge. Added an "initial"
flag to be on the safe side that the behaviour is the
same as before (so we don't do things when a window's
first mapped that we only used to do when a property
changed). Partial fix for bug #549886.
* src/core/window-props.c:
* src/core/window-props.h:
* src/core/window.c:
svn path=/trunk/; revision=4089
Requiring the compositor private object to be a GObject allows the
return value of meta_window_get_compositor_private() to be used
via gobject-introspection, since the type and memory management
can be determined.
This allows a reverse mapping from MetaWindow to MutterWindow.
- Change meta_window_get/set_compositor_private to use GObject
rather than void *
- Adapt code in compositor-mutter.c to match.
* src/core/window.c: windows which attempt to present themselves
but are offscreen end up demanding attention, unless they
are transient, when they move to the current workspace
as before. Closes#482354.
svn path=/trunk/; revision=4060
property and client message. This allows client applications to request
that a fullscreen window cover more than one monitor.
* src/include/boxes.h:
* src/core/boxes.c: Add meta_rectangle_union
* src/core/window-private.h:
* src/core/window.c:
(meta_window_new_with_attrs, meta_window_free, set_net_wm_state,
meta_window_update_fullscreen_monitors, meta_window_client_message): Add
MetaWindow property to store fullscreen monitors field, update
_NET_WM_FULLSCREEN_MONITORS property on windows, and handle client
message.
* src/core/atomnames.h: Add _NET_WM_FULLSCREEN_MONITORS atom.
* src/core/constraints.c (setup_constraint_info): If
_NET_WM_FULLSCREEN_MONITORS is interesting, use the data stored in
MetaWindow::fullscreen_monitors to determine the fullscreen area instead
of the basic xinerama_info area.
svn path=/trunk/; revision=4021
The metacity core is now directly aware of override redirect windows.
- They get MetaWindows like normal windows, so mutter no longer need to special
case them. The net wm types applicable to override redirects are also
recognised.
- The original positioning/stacking semantics of metacity with respect to OR
windows are maintained, but now it's easier to synchronize the stacking
between the core and mutter.
- mutter no longer needs to manualy track UnmapNotify, MapNotify,
ReparentNotify, CreateNotify and DestroyNotify events; instead map, unmap,
add and remove events can now be consistently delivered via the
MetaCompositor callbacks.
Make MetaWindow into a GObject so that it is accessible to
gobject-introspection (also allows for signals to be added.)
Renames:
meta_window_free() => meta_window_unmanage()
meta_window_get_type() => meta_window_get_window_type()
meta_window_get_type_atom() => meta_window_get_window_type_atom()
src/core does some things depending on window->mapped, but since we now
leave the window mapped for hidden windows we might get some wrong
descisions.
Also instead of calling meta_window_show when in meta_window_hide for
the case that the window isn't currently mapped, we now simply
XMapWindow.
It's more awkward and error prone, considering plugin ininteractions, to simply
show/hide the actors of hidden windows, and it seems to be more reliable to
reparent them to a hidden group instead.
We can't easily use a metacity layer to hide windows as that means we
loose our original stacking position. (Metacity's stack positions are
only valid within a single layer) We now have a "guard window" per
screen that is a fullscreen override redirect that is lowered to the
bottom of the stack. Hidden windows now remain in their original layer
so the stacking position remains valid, but all hidden windows get
XRestacked under the guard window.
A new compositor hook is also added to inform it when a window becomes
hidden/unhidded, this lets us map/unmap the corresponding actor.
missing files in preview commit (TODO: rebase -i and squash this later)
ClutterActors for hidden windows (such windows on different than active
workspaces and windows that are minimized) are available, and reflect the
actual state of the window. This is intended for use in task-switchers etc.
This feature is disabled by default (due to increased demand on resources),
and can be enabled through the metacity/general/live_hidden_windows gconf key.
A trivial sample window switcher is included in the scratch plugin (activated
by clicking on the slide out panel).
2008-10-23 Thomas Thurman <tthurman@gnome.org>
Support _NET_WM_STATE_STICKY (i.e. allow third-party apps to decide
whether a window is on all workspaces). Bug found by Ka-Hing
Cheung. Closes#557536.
* src/core/window.c (set_net_wm_state): report it
* src/core/window.c (meta_window_client_message): set sticky
if we receive it
* src/core/window-props.c: set sticky if we find it
* src/core/atomnames.h: add _NET_WM_STATE_STICKY
svn path=/trunk/; revision=3991
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* src/core/window.c (meta_window_set_demands_attention): minimised
windows are necessarily obscured.
svn path=/trunk/; revision=3971
2008-10-06 William Lachance <wrlach@gmail.com>
Pass modified mouse button events down to panel windows
instead of dealing with them ourselves. Closes#554428.
* src/core/display.c (prefs_changed_callback): don't grab mouse
buttons on panels
* src/core/window.c (meta_window_new_with_attrs): ditto
svn path=/trunk/; revision=3942
2008-08-30 Thomas Thurman <tthurman@gnome.org>
* src/core/window.c (process_property_notify): moving all
messages about properties to the top, as a start at #549886
svn path=/trunk/; revision=3837
2008-08-16 Ted Percival <ted@midg3t.net>
Ensure the user_rect is set sanely for windows that start maximized.
Prevents maximized windows from warping across the screen.
Fixes bug #504692.
* src/core/window.c (save_user_placement): renamed version of
meta_window_save_user_rect().
* src/core/window.c (force_save_user_placement): similar, but will
always save user_rect even if the window is maximised or fullscreen.
* src/core/window.c (meta_window_move_resize_internal): unplaced
windows have force_save_user_placement() called instead of
save_user_placement().
svn path=/trunk/; revision=3816
2008-07-12 Thomas Thurman <tthurman@gnome.org>
* src/core/group.c (meta_window_get_group): This function can now
officially return NULL.
* src/core/window.c (meta_window_same_application): Two windows can't
belong to the same application unless they both belong to some
application. (Both belonging to no application is not the same.)
Closes#453022.
svn path=/trunk/; revision=3785
2008-06-28 Thomas Thurman <tthurman@gnome.org>
Some refactoring, simplifying, and commenting of the non-composited
effects code. effects.c could still do with some polish, which will
come along later.
* src/core/effects.h (meta_push_effect_handler): removed since it's
never used and does nothing very useful.
* src/core/effects.h (meta_pop_effect_handler): removed since its
only effect is to crash the program.
* src/core/effects.h (META_MINIMIZE_ANIMATION_LENGTH,
META_SHADE_ANIMATION_LENGTH): move to effects.c because they're used
nowhere else.
* src/core/effects.c: there were three versions of the box-zoom effect.
Remove the one which was never used, and make only the ones which
are used with certain configure settings be compiled.
* src/core/effects.h (meta_effect_end): move to effects.c, make static,
and rename to effect_free.
* src/core/effects.h (meta_effects_draw_box_animation): move to
effects.c, make static, and rename to draw_box_animation.
* src/core/effects.h (MetaEffectType): remove the values which weren't
used.
* src/core/window.c (meta_window_shade): remove commented-out code to
call effect for shading.
* src/core/effects.h (MetaEffectFinish): remove useless MetaEffect
parameter.
* src/core/window.c (finish_minimize): remove MetaEffect parameter.
svn path=/trunk/; revision=3771
2008-05-19 Iain Holmes <iain@gnome.org>
* src/include/frame.h
* src/include/display.h
* src/include/xprops.h
* src/include/compositor.h
* src/include/types.h
* src/include/window.h
* src/include/errors.h
* src/include/screen.h: New basic public API for compositor.
* src/compositor/*: Separate the compositor out into its own
separate
directory and set it up for backends. Initial XRender backend.
* src/core/compositor.[ch]: Remove
* src/core/frame.h
* src/core/screen.h
* src/core/display.h
* src/core/window.h: Rename to -private.h so as not to clash
with the
new files in include
* src/core/delete.c
* src/core/workspace.h
* src/core/stack.[ch]
* src/core/keybindings.[ch]
* src/core/errors.c
* src/core/effects.[ch]
* src/core/core.c
* src/core/group.h
* src/core/edge-resistance.[ch]
* src/core/window-props.[ch]
* src/core/constraints.h
* src/core/bell.[ch]
* src/core/iconcache.h
* src/core/session.[ch]
* src/core/main.c
* src/core/place.h
* src/core/xprops.c
* src/ui/tabpopup.c: Use the new -private headers
* src/core/display.c
* src/core/frame.c
* src/core/window.c
* src/core/screen.c: Add the API functions required by the
compositor
* src/Makefile.am: Relocate the new files
svn path=/trunk/; revision=3715
2008-05-02 Thomas Thurman <tthurman@gnome.org>
All information should live in exactly one place. This means
that the list of atoms should not be replicated anywhere.
Therefore, we include it via x-macros. Closes#530843.
* src/core/atomnames.h: added list of atom names
* src/Makefile.am: added reference to new file
* src/core/display.h
* src/core/display.c (twice)
* src/core/screen.c: #included atomnames.h instead of having
an enormous list of atoms
* src/core/group-props.c
* src/core/window.c
* src/core/compositor.c
* src/core/window-props.c
* src/core/delete.c
* src/core/workspace.c
* src/core/stack.c
* src/core/keybindings.c
* src/core/iconcache.c
* src/core/group.c
* src/core/xprops.c: changed to new, simpler identifiers
for atoms
svn path=/trunk/; revision=3702
2008-04-29 Chris Wang <chris.wang@sun.com>
* src/core/window.c (meta_window_new): XGetWindowAttributes
can return an error value, and if it does its other results
are invalid! (#530485)
svn path=/trunk/; revision=3698
2008-03-19 Iain Holmes <iain@gnome.org>
* src/core/compositor.c (meta_compositor_set_active_window): Add
a
screen argument.
(process_property_notify): Damage the whole screen when the
background
changes. Fixes 522599
(add_repair): Use the idle instead of the timeout. Fixes 522166
(unmap_win): If the window is also focus window NULLify it.
* src/core/window.c (meta_window_notify_focus): Notify when a
window
has lost focus, pass in screen as well.
svn path=/trunk/; revision=3654
2008-03-18 Iain Holmes <iain@gnome.org>
* src/core/compositor.c (window_has_shadow): Allow shaped
windows
_with frames_ to have shadows.
(meta_compositor_set_active_window): Watch for the focus of
windows
and change the size of the drop shadows.
(generate_shadows): Create differently sized shadows.
(meta_compositor_get_window_pixmap): Get the xwindow correctly.
* src/core/window.c (meta_window_notify_focus): Set the active
window
in the compositor.
svn path=/trunk/; revision=3653
2008-03-18 Marco Pesenti Gritti <mpgritti@gmail.com>
* src/core/window.c (window_would_be_covered): newly created windows
can't be considered to be above themselves; fixes bug #519188.
svn path=/trunk/; revision=3650
2008-02-18 Thomas Thurman <tthurman@gnome.org>
* src/core/window.c (warp_grab_pointer): When
resizing a window with the keyboard, stay one
pixels from the edges so that the cursor remains
resting on a window edge even if we escape,
whatever side it was on. Closes#436257.
svn path=/trunk/; revision=3578
2008-02-01 Alex R.M. Turner <armtuk@gmail.com>
* src/core/display.c (meta_get_tab_entry_list): Have the list also pull
windows that are in other workspaces that have the
wm_state_needs_attention flag set
* src/core/window.c (meta_window_set_demands_attention): Make windows that
are on other workspaces that demand attention that aren't obscured
count as being obscured
Bug #333548.
svn path=/trunk/; revision=3533
2007-12-19 Havoc Pennington <hp@redhat.com>
* src/ui, src/core, src/include: sort source files into these
directories according to which part of the WM they are supposed to
be in. In an eventual plan, we should also create
src/compositor/render, src/compositor/fallback and move some of
the compositor stuff into that.
* autogen.sh: require a newer automake, so we don't have to use
a recursive build
* src/ui/tabpopup.c: put in a hack to make the build temporarily
work, want to commit the large rearrangement before fixing this
not to include workspace.h or frame.h
* src/core/iconcache.c (meta_read_icons): temporarily break this
to get the build to work, want to commit the large rearrangement
before fixing this file not to include theme.h
svn path=/trunk/; revision=3491