1
0
Fork 0
Commit graph

3748 commits

Author SHA1 Message Date
Owen W. Taylor
67682a2683 Add a modal mode for plugins
mutter_plugin_begin_modal() and mutter_plugin_begin_modal() allow putting
a plugin into a "modal" state. This means:

 - The plugin has the keyboard and mouse grabbed
 - All keyboard and mouse events go exclusively to the plugin

mutter-plugin.[ch]: Add public API
compositor.c compositor-private.h: Implement the API
mutter-plugin-manager.c: When reloading plugins, make sure none of them
  are modal at that moment, and if so force-unmodal them.
common.h: Add META_GRAB_OP_COMPOSITOR
display: When display->grab_op is META_GRAB_OP_COMPOSITOR forward relevant
  events exclusively to the compositor.

http://bugzilla.gnome.org/show_bug.cgi?id=590754
2009-08-26 12:26:58 -04:00
Owen W. Taylor
b1776b5ae5 Enforce a policy of single-handling of key events
Only process each key event once. If all keys are grabbed, then
don't also look for handlers for a key shortcut after processing
the grab op. If all keys are grabbed or we find a key shortcut,
don't pass the event on to the compositing mananger.

http://bugzilla.gnome.org/show_bug.cgi?id=590754
2009-08-26 12:26:58 -04:00
Thomas James Alexander Thurman
7a6968cb46 Only skip the first window in the alt-tab chain if it's actually the
* src/core/display.c: Only skip the first window in
        the alt-tab chain if it's actually the current window
        (urgent windows on other workspaces may precede it).
        Fixes #535887.

http://bugzilla.gnome.org/show_bug.cgi?id=591913

(Metacity commit 92bfe34716)
2009-08-26 15:29:09 +01:00
Owen W. Taylor
d58c9a57c6 Avoid accessing freed memory when being replaced
If we are replaced via the window manager selection, then we close
the MetaDisplay before meta_finalize() runs. We should be careful
not to try to close the display again (and access already freed
memory) in that case, so clear the global 'the_display' variable.

See Metacity bug http://bugzilla.gnome.org/show_bug.cgi?id=588119

http://bugzilla.gnome.org/show_bug.cgi?id=592742
2009-08-24 14:29:16 -04:00
Frédéric Péters
d804a1f146 Remove deprecated Encoding key from desktop files 2009-08-22 14:24:22 +02:00
Colin Walters
01581dc61c [MetaWindow]: Always notify on title property change
The previous notification code was attempting to use the "modified"
boolean returned from set_title_text, but "that boolean doesn't mean
what you think it means".  It actually means "I truncated the title".

Just always notify, it's far simpler than trying to compute
when we don't need to, and callers can compress if they really need
to.
2009-08-21 12:38:30 -04:00
Colin Walters
9cc70a3fb6 Make meta_display_xwindow_is_a_no_focus_window public
Useful for window analysis in plugins.
2009-08-20 14:20:01 -04:00
Fran Dieguez
7396f5709e Updated Galician Translation 2009-08-15 10:05:52 +02:00
Colin Walters
41cf9134a6 Add meta_window_is_mapped, remove usage of window-private.h from mutter-window.c
mutter-window.c originally grew an #include "window-private.h" for
window->override_redirect, but that was just fixed.  However since
then it also ended up relying on a few other minor private bits.

To fix that, add meta_window_is_mapped, promote meta_window_toplevel_is_mapped
to public, and use the public MetaDisplay accessor.
2009-08-14 19:47:13 -04:00
Colin Walters
e960269653 Add meta_window_is_override_redirect
Trivial function, useful for plugins which are doing analysis
of windows.
2009-08-14 19:47:13 -04:00
Gabor Kelemen
5e581b409c Hungarian translation updated 2009-08-15 01:40:29 +02:00
Owen W. Taylor
f03d39eefb Check the opacity of the right actor
When determining if the window is opaque or not, look at it's opacity,
not the opacity of the window group.

Reported by Matthias Clasen
http://bugzilla.gnome.org/show_bug.cgi?id=591836
2009-08-14 15:58:07 -04:00
Owen W. Taylor
91baf552cf Remove meta_errors_register_foreign_display()
The functionality to propagate errors for other displays to other
a "foreign error handler" was Soeren's compositor and is no longer
being used. Remove it.

(Now that error.h is being installed and scanned, we need to either
do this or add XErrorEvent to xlib-2.0.gir and rename ErrorHandler
to MetaErrorHandler. This way is a bit simpler.)
2009-08-13 07:38:08 -04:00
Michael Meeks
16466cf7d6 install errors.h header, bug 591566 2009-08-13 09:46:15 +01:00
Tomas Frydrych
f3e6913d57 Added meta_window_is_modal()
Queries whether the window is in a modal state, as per the _NET_WM_STATE
protocol.
2009-08-12 07:49:08 +01:00
Tomas Frydrych
2c8df7d12e Do not run effects during WM startup
When we first start up, we do not want to run effects on any pre-exising
windows (this is either the case we are starting up and there are no windows,
or we are replacing an exisint window manager, or worse, we crashed, and we
just want to get to the desired desktop as quick as possible).

Dithered about where to place the check; putting into the plugin manager
reduces the number of places (and files) in which it needs to be done.
2009-08-12 07:45:03 +01:00
Owen W. Taylor
dafdecb4e8 Be silent by default
We might as well turn on the AM_SILENT_RULES by default if a new-enough
automake is found rather than requiring --enable-silent-rules.

http://bugzilla.gnome.org/show_bug.cgi?id=591367
2009-08-11 18:53:30 -04:00
Owen W. Taylor
c5874e0da5 Bump version to 2.27.2 2009-08-10 12:24:03 -04:00
Colin Walters
422cd1fbbf Fix use of uninitialized memory in edge-resistance.c
g_new bad, g_new0 good.
2009-08-09 23:40:22 -04:00
Colin Walters
8a9e2877da Export meta_screen_get_startup_sequences, add change signal
It's useful for plugins to be able to get access to the
startup-notification data that Mutter already has.  Add
an accessor and change signal when recieve an event.
2009-08-09 23:36:08 -04:00
Kjartan Maraas
ff84b35e5d Updated Norwegian bokmål translation. 2009-08-09 15:48:46 +02:00
Tomas Frydrych
ae32ac86b4 Use correct timestamp for focus stealing prevention
When window initially maps, use the more recent of NET_WM_USER_TIME and
startup notification timestamps to compare against last known user action to
decide whether to focus the window or not. Once we show the window, clear
the initial_timestamp_set flag, so the startup notification timestamp is not
taken into account again.

Based on patch for metacity by Alexander Larsson

http://bugzilla.gnome.org/show_bug.cgi?id=573922
2009-08-08 17:59:01 +01:00
Tomas Frydrych
bca3eaf709 Removed custom 'GIR' label for gir generation in silent-rules mode
http://bugzilla.gnome.org/show_bug.cgi?id=591120
2009-08-08 13:47:31 +01:00
Tomas Frydrych
0f64202a29 Added --enable-silent-rules if automake-1.11 is available 2009-08-07 17:58:02 +01:00
Tomas Frydrych
6b36e64e00 Take extra reference on the texture inside MutterWindow
We store a pointer to the texture independently of the ClutterContainer
internals, and rely on the pointer remaining valid until we run dispose.
Since we also provide public API to access this pointer, we should not
rely on the reference ClutterContainer holds to ensure that texture will
not be destroyed (e.g., some nasty developer could reparent the texture).
2009-08-07 17:38:11 +01:00
Tomas Frydrych
84059f1faa Free MutterWindow description string in finalize() not dispose()
We were freeing the description string in dispose and not setting it to NULL,
thus leaving around a dangling pointer for the duration of the disposal.
This commit moves the free into the finalize vfuction, where it belongs.
2009-08-07 16:47:43 +01:00
Owen W. Taylor
15376957f7 Don't allow override-redirect windows to be META_WINDOW_NORMAL
Many override-redirect windows (including the Metacity UI windows!)
will have NET_WM_WINDOW_TYPE_NORMAL set on them because of shared
code paths with normal windows in toolkits.

Some current Compositor plugins (default plugin and gnome-shell)
check type == NORMAL to determine if to run effects. While fixing
such plugins to also check if the window is override-redirect is
posisble, it seems cleanest to simply not allow any of the decorated
window types to be set on an override-redirect window and to force
these types to META_WINDOW_OVERRIDE_OTHER. This will prevent other
similar problems from showing up in the future.

http://bugzilla.gnome.org/show_bug.cgi?id=590971
2009-08-06 12:16:24 -04:00
Owen W. Taylor
da934be354 Elimitate use of arithmetic expansion for portability
Use expr rather than $(( <arithmetic> )) - this is needed at least
for the default Solaris shell.

Based on patch by Halton Huo
http://bugzilla.gnome.org/show_bug.cgi?id=590719
2009-08-04 11:18:43 -04:00
Tomas Frydrych
3eee6b4218 Handle FocusIn events for override redirect windows correctly
Do not try to insert / remove the window from the MRU list; just reset the
MetaDisplay focus window to NULL.

http://bugzilla.gnome.org/show_bug.cgi?id=590611
2009-08-04 14:31:13 +01:00
Tomas Frydrych
ff9400abde Remove deprecated GTK symbols
http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit 3f76affbd2,
original patch by Thomas Andersen)
2009-08-04 09:23:37 +01:00
Tomas Frydrych
e985bf0e7a use g_signal_handlers_disconnect_by_func instead of an old deprecated
http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit a8f8970601,
original patch by Matt Kraai)
2009-08-04 09:22:49 +01:00
Tomas Frydrych
245908909b Fix check for zero-sized textures in MutterShaped texture
Patch by Jon Nettleton <jon.nettleton@gmail.com>

http://bugzilla.openedhand.com/show_bug.cgi?id=1538
http://bugzilla.gnome.org/show_bug.cgi?id=590646
2009-08-04 08:47:46 +01:00
Xu Li
2f63d321d1 [constraints] Avoid overflow when window maximum size hint is set to INT_MAX
When calculating maximum permissible size of our frame window, we need to
avoid an overflow if the application set its max size hint to INT_MAX.

http://bugzilla.gnome.org/show_bug.cgi?id=590627
2009-08-04 08:38:56 +01:00
Tomas Frydrych
2222cb8fbf Added public prototype for meta_window_is_ancestor_of_transient()
http://bugzilla.gnome.org/show_bug.cgi?id=590439
2009-08-04 08:32:36 +01:00
Tomas Frydrych
897814a153 Added MetaWindow::window-type property
Read-only property for querying the type of MetaWindow.

http://bugzilla.gnome.org/show_bug.cgi?id=588230
2009-08-04 08:06:30 +01:00
Tomas Frydrych
8b7b41df41 Accessors for pid and name of client machine associated with MetaWindow
http://bugzilla.gnome.org/show_bug.cgi?id=590388
2009-08-04 07:58:11 +01:00
Tomas Frydrych
8f9a174f0a Fixed warnings due to missing casts 2009-08-01 11:11:11 +01:00
Colin Walters
df90187e06 Add focus-window property to MetaDisplay
Useful mainly for notify::focus-window.
2009-08-01 04:38:26 -04:00
Tomas Frydrych
c9e0613b53 Set up correct initial values for override redirect windows
As a sideffect of commit a576f7a1ea, override
redirect windows of type _NET_WM_WINDOW_TYPE_NORMAL do not have their
features recalculated during MetaWindow construction (same as regular
windows of type _NET_WM_WINDOW_TYPE_NORMAL), so we need to set the initial
values accordingly.
2009-08-01 09:11:06 +01:00
Tomas Frydrych
a576f7a1ea Tolerate all standard _NET_WM_WINDOW_TYPE types for managed windows
Although the spec designates some window types as typically used for
override redirect windows, it does not prohibit the use of these with
managed windows, so we should not abort if we encounter one of these.

http://bugzilla.gnome.org/show_bug.cgi?id=583870
2009-07-31 19:11:54 +01:00
Owen W. Taylor
239b39cf52 Pass through all scroll events to compositor
As with other events, we want to pass through scroll events (button 4/5 presses)
to the compositor, whether or not they are associated with a particular MetaWindow;
do this by simply falling through to the normal code path instead of
separately delivering the events to the compositor.

http://bugzilla.gnome.org/show_bug.cgi?id=588232
2009-07-31 10:37:26 -04:00
Thomas Wood
1f90529365 Don't explicitly set the size of the MutterWindow texture
Setting the size of the texture causes the minimum and preferred width and
height values to be fixed at the set value. The normal requisition functions
of ClutterTexture will already report the size of the texture pixmap as the
natural size, but also allow scaling down as needed if less space is
available. We don't need that here, but we want to allow someone to make
a ClutterClone of the texture actor.
2009-07-31 13:36:59 +01:00
Colin Walters
acfc498344 Also update Clutter 1.0 pkg-config requirement and README
We need to also change the pkg-config requirement to be 1.0.
2009-07-29 13:04:18 -04:00
Colin Walters
a1ac1f4b2e Build using Clutter 1.0
Clutter just released 1.0, sync to that.
2009-07-29 12:08:53 -04:00
Owen W. Taylor
d91d503eb2 Pass event to clutter when the plugin doesn't have xevent_filter
With recent changes, Clutter no longer sets up the viewport correctly,
unless it receives ConfigureNotify events. If there is a plugin with
an xevent_filter function, then it's that plugins responsibility to pass
the event to Clutter if it doesn't want it. If there is no plugin,
or the plugin doesn't have an xevent_filter function, then we should
call clutter_x11_handle_event() ourselves.

http://bugzilla.gnome.org/show_bug.cgi?id=589419
2009-07-28 16:00:24 -04:00
Owen W. Taylor
e84bf7144c Queue redraws on MutterWindow's MutterShapedTexture
When a windows contents or shape changes, we schedule a redraw
with clutter_actor_queue_redraw(); we need to queue the redraw
on the shaped texture rather than on the window actor to support
cloning of just the shaped texture without the shadow: that
is, the shaped is what is really changing and it may be
visible via a clone even if the MutterWindow itself is not
visible.

http://bugzilla.gnome.org/show_bug.cgi?id=589429
2009-07-28 15:50:28 -04:00
Owen W. Taylor
ec2c197e1f Fix confusion about MetaPreview in introspection build
MetaPreview is only built into libmutter-private, and not included in
the mutter executable. Linking mutter against libmutter-private was
inadvertently added when the introspection build process was set up,
but isn't actually needed, and if -Wl,-as-needed is added during the
build process, then the libmutter-private dependency will be skipped.

* Don't link mutter (or the test programs) against libmutter-private

* Exclude meta-preview.h from the set of headers we feed into the
  introspection build process

Reported by Patryk Zawadzki

http://bugzilla.gnome.org/show_bug.cgi?id=587975
2009-07-17 07:56:19 -04:00
Owen W. Taylor
0060c8ddb9 Switch to dist-bzip2
When generating a tarball from 'make dist', make a .bz2 tarball
instead of a .gz tarball. Makes the upload to master.gnome.org
marginally faster.
2009-07-16 18:07:01 -04:00
Owen W. Taylor
f9c11c2dbf Bump minor version to 2.27.1
We'll use 2.27.1 for the first tarball release on the 2.27 branch
to avoid confusion with previous snapshots.
2009-07-16 18:06:52 -04:00
Owen W. Taylor
65565a96b7 Fix 'make distcheck'
* Make generation of the .gir file work for srcdir != builddir
* Add files to CLEANFILES as needed
* Don't distribute the generated file mutter.schemas
2009-07-16 17:54:56 -04:00