Compare commits

...

168 Commits
3.2.2 ... 3.4.0

Author SHA1 Message Date
46a56bafbd Bump version to 3.4.0
Update NEWS
2012-03-26 14:23:20 -04:00
c8b4939c7e Fix uninstalling default.so
We need a clean uninstall for 'make distcheck' to pass; libtool
hijinks leave a left-over plugins/default.so - remove it manually.
2012-03-26 14:23:19 -04:00
fc3e82421a Updated Korean translation 2012-03-27 01:26:09 +09:00
23046f6e28 stack: Fix crash when opening a full-screen window
When mutter recognizes a full-screen window, it tries to raise it to the top
of the stack. Unfortunately, a recent rewrite of the stack code didn't do
well with raising a window to the top of the stack if the stack wasn't in
a consistent state -- it would crash. Ensure that the stack is in a consistent
state at the top of meta_stack_raise/meta_stack_lower.

https://bugzilla.redhat.com/show_bug.cgi?id=806437

https://bugzilla.gnome.org/show_bug.cgi?id=672797
2012-03-26 08:15:21 -03:00
823208120d Updated Gujarati Translations 2012-03-26 14:08:50 +05:30
d12c507b12 Updated Czech translation 2012-03-26 02:24:42 +02:00
2157c238b6 Updated Czech translation 2012-03-25 22:11:19 +02:00
423bda908e meta_display_get_tab_list(): Fix leaked GSList
https://bugzilla.gnome.org/show_bug.cgi?id=672640
2012-03-24 19:30:00 +01:00
98d427ddba meta_stack_update_window_tile_matches(): Fix leaked GList
https://bugzilla.gnome.org/show_bug.cgi?id=672640
2012-03-24 19:19:17 +01:00
7a35579c3f Updated Hebrew translation. 2012-03-24 19:08:23 +02:00
adc89fbb2c Updated French translation 2012-03-24 12:51:37 +01:00
a6ca3f768f [l10n]Updated Turkish translation 2012-03-23 23:01:08 +02:00
9362fbdcde Updated Vietnamese translation 2012-03-22 10:45:51 +07:00
47099f4a87 po/vi: import from Damned Lies 2012-03-22 10:44:46 +07:00
2e6e5b068c Updated Russian translation 2012-03-21 22:26:24 +04:00
ee840bc832 Updated Brazilian Portuguese translation 2012-03-21 14:54:09 -03:00
6333c174dc Bump version to 3.3.92
Update NEWS
2012-03-20 17:10:09 -04:00
a3bf9b01aa workspace: Don't try to use per-workspace MRU lists as a hint for focusing
Commit 2fc880db switched from focusing the topmost window as the default
window to focusing the MRU window. This was done in alignment with the
introduction of per-workspace MRU lists to avoid problems where the window
stack was inadvertently changed when focusing windows during window switches.

Now that focusing windows don't have as big an impact on the stacking order,
we can revert back to focusing the top window, which is less confusing to the
user.

For now, leave per-workspace MRU lists, as they're a pretty good approximation
of a global MRU list, and it works well enough.

https://bugzilla.gnome.org/show_bug.cgi?id=620744
2012-03-20 17:08:34 -04:00
402b477458 stack: Make meta_window_raise() and meta_window_lower() smarter
https://bugzilla.gnome.org/show_bug.cgi?id=620744
2012-03-20 17:08:34 -04:00
6b273ca713 Update Simplified Chinese translation. 2012-03-20 17:11:08 +00:00
c3ec6b34a3 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-03-19 23:55:13 +08:00
78dc480e86 screen: don't use unreffed pointer 2012-03-19 14:58:32 +00:00
53364f986c Updated Danish translation 2012-03-19 09:54:01 +01:00
5770b5b3c3 util: Quit early once we've found and removed a later
This prevents an invalid read and also improves performance slightly.

https://bugzilla.gnome.org/show_bug.cgi?id=672374
2012-03-19 02:00:03 -04:00
f16f47bd38 Revert "window: Stop a gcc warning"
This reverts commit 335d211204 trying
not to trigger the uninitialized variable warning in gcc.
2012-03-19 00:32:34 +01:00
58a57185b7 Uploaded Ukranian 2012-03-18 17:42:15 +02:00
8fb361cb26 Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum
This is a new value, not associated with any keybindings, useful
when the WM needs to order the applications by last-interaction,
taking into account all windows.

https://bugzilla.gnome.org/show_bug.cgi?id=667552
2012-03-18 14:52:12 +01:00
335d211204 window: Stop a gcc warning
"warning: 'match_tile_mode' may be used uninitialized in this function", it
complains. It thinks it's not unused because of other values of
window->tile_mode, but other complex logic ensures that it can't be
META_TILE_MAXIMIZED, so this is a safe commit.
2012-03-17 16:59:09 -04:00
7f64d6b92e window: Disallow maximization for windows that can't be maximized
Windows that have minimum widths larger than the screen can't be maximized,
even though we put them in a maximized state and allow users to do so:
the window just won't change size and position. Fix this by simply not giving
the option to maximize, like what happens for non-resizable windows.

https://bugzilla.gnome.org/show_bug.cgi?id=643606
2012-03-17 06:40:55 -04:00
8c1b2d5eda Simplify the frame testing logic in callers to grab borders
A lot of code did something similar to:

  MetaFrameBorders borders;

  if (window->frame)
    meta_frame_calc_borders (window->frame, &borders);
  else
    meta_frame_borders_clear (&borders);

Sometimes, the else part was omitted and we were unknowingly using
uninitalized values for OR windows. Clean this up by just testing
for a NULL frame in meta_frame_calc_borders and clearing for the
caller if so.

https://bugzilla.gnome.org/show_bug.cgi?id=643606
2012-03-17 06:40:54 -04:00
578b1c06c7 window: Fix meta_window_get_workspaces when a window isn't on a workspace
Since we're going to be evaluating the work area at startup now, we need
to make sure that we don't iterate over workspaces before they're assigned.
The easiest way to do this is to make sure that meta_window_get_workspaces
doesn't crash.

https://bugzilla.gnome.org/show_bug.cgi?id=643606
2012-03-16 21:01:48 -04:00
6dfde43786 Updated Dutch translation 2012-03-16 23:20:55 +01:00
a8ead4d447 MetaWindowActor: don't draw shadows for tiled windows with a match
The shadow between 2 tiled windows ruins the visual tiles effect.

https://bugzilla.gnome.org/show_bug.cgi?id=643075
2012-03-16 19:12:10 +01:00
2926323a9a window: Introduce meta_window_get_tile_match()
Returns the matching tiled window. This is the topmost tiled window in a
complementary tile mode that is:

 - on the same monitor;
 - on the same workspace;
 - spanning the remaining monitor width;
 - there is no 3rd window stacked between both tiled windows that's
   partially visible in the common edge.

https://bugzilla.gnome.org/show_bug.cgi?id=643075
2012-03-16 19:12:05 +01:00
13bc8f7a76 Updated Hungarian translation 2012-03-16 16:43:47 +01:00
ad516492d2 Updated Telugu Translation 2012-03-16 17:01:52 +05:30
6677c61db3 [l10n]Updated Catalan (Valencian) translation 2012-03-15 23:18:25 +01:00
f26f61ed7d [l10n]Updated Catalan translation 2012-03-15 23:18:20 +01:00
8ca86fa8bf ui: Kill tooltips
After the changes in style handling in GTK+, mutter's tooltips no
longer match the tooltip style used in applications. Given that
all buttons in the default layout are well-known, killing tooltips
altogether rather than fixing the styling issues looks like a valid
approach.

https://bugzilla.gnome.org/show_bug.cgi?id=645101
2012-03-15 22:27:43 +01:00
f2f500836e Automaximize large windows on map
Windows that start up in a size that is almost as big as the workarea create
extra work for the user (resizing or maximizing) so save the user's time by
detecting such windows and automaximize them.

https://bugzilla.gnome.org/show_bug.cgi?id=671677
2012-03-15 22:03:00 +01:00
c39998efee Don't unmaximize to nearly maximized size
Basically we don't really want to create windows that are almost maximized in
size but not actually maximized. This creates work for the user and makes it
very difficult to use and resize manually.

So set the newly unmaximized window size to the previously used size or 80% of the
size of the current workarea (attempting to retain natural aspect ratio if
possible), whichever is smaller.

https://bugzilla.gnome.org/show_bug.cgi?id=671677
2012-03-15 22:02:54 +01:00
3b811f33c7 update Punjabi Translation 2012-03-15 07:19:43 +05:30
beea2f7acd Updated Galician translations 2012-03-14 23:09:25 +01:00
fb4c50478d Updated Portuguese translation 2012-03-14 01:05:10 +00:00
ac0602a02e Updated Latvian translation. 2012-03-14 00:41:14 +02:00
5361e0259f display: Add accessor function for ignored_modifier_mask
Some modifiers like NumLock and ScrollLock don't make sense in
keybindings, which is why we ignore them when matching keybindings
to events. We should do the same in Javascript, so add an accessor
function.

https://bugzilla.gnome.org/show_bug.cgi?id=665215
2012-03-13 20:33:27 +01:00
04bf73ff6d default plugin: animate minimization to icon geometry
Instead of minimizing windows in place, minimize them to the icon
geometry for the window (if set), or to the upper-left corner if
it's not set.

https://bugzilla.gnome.org/show_bug.cgi?id=667437
2012-03-13 13:53:05 -04:00
047b9de1c6 Fix move-to-corner keybindings
The move-to-corner keybindings weren't treated as user actions, which
resulted in them not affecting the saved position - they weren't
always being treated as sticky. Marking them as a user action revealed
bugs in the positioning logic that were hidden by the constraint
code applied to automated moves. Fix those as well. Bug tracked
down by Mariusz Libera.

https://bugzilla.gnome.org/show_bug.cgi?id=661256
2012-03-13 12:19:07 -04:00
39b3244a3e Updated British English translation 2012-03-13 14:33:09 +00:00
63f982eb72 [l10n] Updated Estonian translation 2012-03-13 14:05:39 +02:00
c689306dae Updated Serbian translation 2012-03-13 08:39:49 +01:00
0b7f2f8cd3 theme-viewer: Fix invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2012-03-13 00:48:29 -04:00
efc90173b1 display: Add signals for plugins to know when a grab op begins/ends
https://bugzilla.gnome.org/show_bug.cgi?id=670658
2012-03-12 22:53:11 -04:00
9e439a22b5 Updated Norwegian bokmål translation 2012-03-12 18:55:00 +01:00
848c1f52f3 Updated Swedish translation 2012-03-12 18:26:34 +01:00
1b84be7031 Updated Slovenian translation 2012-03-12 15:26:55 +01:00
eb08a65b4c Updated Spanish translation 2012-03-12 14:18:00 +01:00
43ba596a0e Finnish translation update from http://l10n.laxstrom.name/wiki/Gnome_3.4 translation sprint 2012-03-12 11:11:19 +02:00
2e1de1a037 Assamese translation completed 2012-03-12 14:26:59 +05:30
81ede6abf8 Updated Bulgarian translation 2012-03-12 06:45:48 +02:00
1d98f1fee8 prefs: Handle the new META_PREF_DYNAMIC_WORKSPACES enum value
Avoids a -Werror compiler error.
2012-03-12 01:10:27 +01:00
f0582d1a86 Updated Polish translation 2012-03-11 23:19:18 +01:00
607dbf0f43 prefs: Add dynamic-workspaces setting
We currently sync the number of workspaces with the corresponding
preference. This is not really useful with GNOME Shell's dynamic
handling of workspaces, not least as the setting is effectively
ignored. Worse, it will trigger writes to dconf on login, slowing
down startup, so add a setting to indicate that workspaces are managed
dynamically and really ignore the num-workspaces setting when set.

https://bugzilla.gnome.org/show_bug.cgi?id=671568
2012-03-11 22:55:38 +01:00
584cd3e684 Updated Russian translation 2012-03-11 20:41:01 +04:00
90ec5b05f3 Updated Polish translation 2012-03-10 23:02:59 +01:00
7253a75b18 frames: Explicitly initialize style contexts
We were relying on GTK+ emitting GtkWidget::style-updated during
widget initialization to create the GtkStyleContexts used for
window decorations. A recent GTK+ update broke this assumption,
so do the necessary initialization ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=671796
2012-03-10 22:11:22 +01:00
cdbe3b274f Updated Korean translation 2012-03-10 23:40:56 +09:00
3f3e3ce37e plugins/default: Fix compiler error 2012-03-09 14:05:28 +01:00
5e3d93da87 plugin: Remove unneeded wrapper APIs
Mutter originally started out with the idea that only a subset of the total
API was exposed to plugins, so some APIs are duplicated on MutterPlugin.
We've long since abandoned that idea; remove these wrappers.

https://bugzilla.gnome.org/show_bug.cgi?id=671103
2012-03-08 16:52:44 -05:00
82b1d0d7e5 Updated Basque language 2012-03-06 12:44:57 +01:00
3583e57ec3 Uploaded Ukranian 2012-03-05 08:02:09 +02:00
2ddde04678 Updated Vietnamese translation 2012-03-04 11:35:10 +07:00
feda493fbf po/vi: import from Damned Lies 2012-03-04 11:29:24 +07:00
fc72309b71 [l10n] Updated Estonian translation 2012-03-01 18:05:31 +02:00
860c2a6282 window: Remove prefs listener in _unmanage instead of _finalize
After _unmanage the object is semantically dead even if technically it's not,
so remove the prefs listener here to prevent it being called for a dead
object.

In particular this fixes a crash when starting up gnome-shell with at least
one gimp utility window opened which causes mutter to create a MetaWindow for
it only to immediately get an UnmapNotify afterwards which causes mutter to
unmanage the MetaWindow. Afterwards prefs_changed_callback is called for this
dead MetaWindow and tries to dereference the window->monitor pointer which is
already NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=671087
2012-03-01 10:22:21 +01:00
e6b4a34daf [l10n] Updated Estonian translation 2012-02-29 20:03:26 +02:00
3319cdfec0 Updated Hungarian translation 2012-02-29 03:37:23 +01:00
fc5594faad updated Tamil translation 2012-02-28 14:33:34 +05:30
7c9e0c2ebc Updated Belarusian translation. 2012-02-26 22:23:27 +03:00
9157cc2b70 Updated Belarusian translation. 2012-02-26 16:03:32 +03:00
69e7b32b54 update Punjabi Translation 2012-02-26 09:58:13 +05:30
04835eccb5 update Punjabi Translation 2012-02-26 09:46:42 +05:30
01c363bb6a Use a META_ prefix for enum types, not MUTTER_ 2012-02-23 16:39:28 -05:00
7649772394 configure.in: fix typo in gio-2.0 version 2012-02-23 08:52:20 +01:00
ca3dc2e876 Bump version to 3.3.90
Update NEWS
2012-02-22 21:40:10 -05:00
70d85049b1 configure.in: clean up version checks
Consolidate and simplify checks for required depenencies, and require
Cogl-1.9.6.
2012-02-22 21:40:10 -05:00
29f6f5e0ad configure.in: update an old message 2012-02-22 19:39:47 -05:00
d249cfd040 Pass CoglContext to cogl_texture_pixmap_x11_new()
The experimental Cogl api cogl_texture_pixmap_new() was recently changed
so it now expects an explicit CoglContext argument and it can also
return exceptions now via a GError. This patch updates mutters use of
the api accordingly.
2012-02-21 18:23:22 +00:00
3cb912aee2 MetaShapedTexture: Implement get_paint_volume
Add a get_paint_volume implementation to MetaShapedTexture.
2012-02-21 18:09:25 +01:00
7df823132c Updated Danish translation 2012-02-20 22:37:32 +01:00
41353d642b Updated Serbian translation 2012-02-20 11:59:40 +01:00
c47039db82 window: Fix meta_window_move_frame in the context of the new invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=659643
2012-02-16 16:46:10 -05:00
0dab6df25a configure: Require Clutter 1.9.10
We depend on API introduced in Clutter 1.9.10. Additionally, remove
a compatibility fallback that isn't needed anymore.
2012-02-16 16:44:03 -05:00
c844bab232 meta-background-actor: Chain up in dispose
This was preventing Clutter from running its dispose, preventing
it from being destroyed correctly. While a major bug and possibly
big memory leak, the most obvious effect was the message that Clutter
spat out:

  Clutter-CRITICAL **: clutter_actor_iter_next: assertion `ri->age == ri->root->priv->age' failed

Since we never disposed the actor correctly, it was never removed
from its parent, and the age wasn't updated correctly.
2012-02-16 16:29:33 -05:00
848f9d1399 Bump version to 3.3.5
Update NEWS
2012-02-07 18:30:01 -05:00
2e63de5c0a Add -Wno-error=deprecated declarations
Even with --enable-compile-warnings=error, avoid erroring out on deprecations
for the moment, since we are hitting many Clutter deprecations and some are
hard to fix.
2012-02-07 18:30:01 -05:00
7319b10d72 MetaShapedTexture: Remove visible_pixels_region
When we were shaping the window with a cairo region, there was an easy
optimization to restrict painting only to the pixels we were going to
actually draw. With rounded corners, the amount of work we have to do
figure out what pixels isn't worth the small savings of not drawing the
completely transparent parts of the corners, so remove this optimization,
and the supporting meta_shaped_texture_get_visible_pixels_region()

https://bugzilla.gnome.org/show_bug.cgi?id=657639
2012-02-03 19:58:21 -05:00
1265efcf78 MetaShapedTexture: Add a new method to flatten the shaped texture into pixels
This will be used by the Shell to implement a screenshot_window method.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2012-02-03 19:57:38 -05:00
3e0ef03fd9 MetaShapedTexture: Make public and directly derive from ClutterActor
ClutterTexture has many features that we simply don't use and don't make
sense for a subclass with custom drawing. Deriving directly from ClutterActor
simplifies our code by avoiding workarounds and makes things more robust.

Additionally, make it public. GNOME Shell was already assuming that any
MetaShapedTexture was also a ClutterTexture, and we need to replace these
bits with new API for GNOME Shell to use.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2012-02-03 15:35:41 -05:00
37076941ad Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-01-29 23:38:40 +08:00
25e43618a4 Updated Norwegian bokmål translation 2012-01-28 17:38:35 +01:00
fd404bafc8 screen: Remove harmless leftover argument
It compiled because it was picking index(3) from strings.h.
2012-01-26 15:27:50 +00:00
3b3b26b000 Bump dependency on gtk+ 3.3.7 2012-01-20 21:00:15 +01:00
33498f6b84 Bump version to 3.3.4
Update NEWS
2012-01-20 12:35:20 -05:00
c0a440b852 Fix crash when meta_display_close() is called with attached modal dialogs
When meta_display_unmanage_window_for_screen() is called, it gets a list
of windows and iterates over them and unmanages them, but unmanaging a
window with attached modal dialogs also unmanages those attached modal
dialogs (in the normal case, temporarily), so we need to guard against
such cases by ref'ing the windows in the list and checking if they have
already been unmanaged.

https://bugzilla.gnome.org/show_bug.cgi?id=668299
https://bugzilla.redhat.com/show_bug.cgi?id=760918
2012-01-19 16:12:56 -05:00
1772a2a59c adjust to new Gtk properties for app menu
https://bugzilla.gnome.org/show_bug.cgi?id=668118
2012-01-18 17:26:12 -05:00
44f362ad87 tile-preview: Remove non-composited case
The main reason for handling the non-composited case was to keep
code differences with metacity small, but the tiling patch[0] never
got merged. In mutter itself, the compositor is not optional, so
there's no good reason for keeping those untested code chunks around.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=607694

https://bugzilla.gnome.org/show_bug.cgi?id=666039
2012-01-17 12:53:33 +01:00
478f1020a4 Updated Galician translations 2012-01-15 01:27:53 +01:00
e8209e7b22 Handle rename of GTK+'s window-unfocused state to backdrop
GTK_STATE_FLAG_WINDOW_UNFOCUSED was renamed to
GTK_STATE_FLAG_BACKDROP.
2012-01-09 19:03:27 -05:00
2d20c9ecad Updated Bulgarian translation 2012-01-08 15:18:52 +02:00
f35160c30f Bump version to 3.3.3
Update NEWS
2012-01-03 14:43:50 -05:00
7fad591d6e Updated Hebrew translation. 2011-12-30 10:49:13 +02:00
a364cea779 [l10n]Updated Turkish translation 2011-12-24 16:58:42 +02:00
2eb3ff4bfb prefs: Fix memory leak 2011-12-19 09:45:41 -05:00
796ca6746d Updated Slovenian translation 2011-12-16 21:50:35 +01:00
0a79fb8d62 Updated Spanish translation 2011-12-16 14:21:22 +01:00
ac7ec585c8 compositor: Use raw Xlib to resize the compositor window
If we get two configure events on the root window in close
sequence, then we could get the sequence:

 ConfigureNotify on the root window w1xh1
   Processed by Mutter
 clutter_actor_set_size(stage, w1, h1)
 <relayout happens, stage window resized by clutter>

 ConfigureNotify on the root window, w2xh2
   Processed by Mutter
 clutter_actor_set_size(stage, w2, h2)
 ConfigureNotify on the stage window, w1, h1)
   Processed by Clutter
 clutter_actor_set_size(stage, w1, h1)
 <relayout happens, stage window resized by clutter>

Leaving the stage at the wrong size. To avoid fighting with Clutter,
switch to resizing the stage with XResizeWindow(), similar to how a
toplevel window is handled by a window manager.
2011-12-15 16:06:07 -05:00
264c555af0 Do not use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=664028
2011-12-15 16:06:07 -05:00
bbbb0e6002 meta-window-actor: Add error traps in meta_window_actor_set_redirected
meta_window_actor_set_redirected makes X calls on the client window
so it need to set error traps.
2011-12-15 19:53:41 +01:00
41ae760454 Fix compilation with --disable-introspection
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=661871
2011-12-15 10:54:50 -05:00
9729a99ec5 window: Support GTK+'s hide-titlebar-when-maximized hint
For maximized windows, titlebars cannot be used to reposition or
scale the window, so if an application does not use it to convey
useful information (other than the application name), the screen
space occupied by titlebars could be put to better use.
To account for this use case, a setting for requesting that windows'
titlebars should be hidden during maximization has been added to
GTK+, add support for this in the window manager.

https://bugzilla.gnome.org/show_bug.cgi?id=665617
2011-12-15 16:37:20 +01:00
d64c5bfc11 screen: signal workspace creation from client applications
Using an external application using libwnck an external application
can create a new workspace by moving a window into it. In this case we
are currently missing a "workspace-added" signal emission.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=666015
2011-12-15 10:24:20 -05:00
e4ed433e18 Add _DBUS_UNIQUE_NAME and _OBJECT_PATH properties
https://bugzilla.gnome.org/show_bug.cgi?id=664851
2011-12-15 10:21:22 -05:00
8ab5cc8f19 Load _DBUS_APPLICATION_ID property, expose it via API
This is used to associate GtkApplication -> X window, and will
be consumed by gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=664851
2011-12-15 10:12:31 -05:00
35261808a9 Updated Norwegian bokmål translation 2011-12-14 22:59:42 +01:00
3a4512cd91 Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662153
2011-12-13 19:53:57 -05:00
eb0185c1b1 followup to last commit: close comment
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2011-12-13 15:48:29 +01:00
34f6ffd1ad keybindings: Add toggle-tile-left/right bindings
Having keybindings for side-by-side tiling has been requested for
a long time, so add this support now.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-13 14:36:40 +01:00
baeb9fbc4b window: Make meta_window_can_tile_side_by_side() public
In order to support keybindings for window tiling, we need to
determine whether a window is tilable or not, so make this public.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-12 11:55:51 +01:00
c3d76aead6 window: Relax restrictions for can_tile_maximized ()
The current code requires windows to be resizable to be considered
for tiling, which excludes all maximized/tiled windows. While this
restriction concurs with the desired behavior for edge-tiling, it
feels overly restrictive for keybindings.
As the edge-tiling code in update_move() already ensures the above
restriction, it seems save to remove it from the can_tile_maximized()
function, assuming that windows that are not meant to be tiled or
maximized won't provide a maximize function.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-12 11:55:51 +01:00
bed9cb1648 window: Keep track of the last full-maximization state
In order to be able to toggle between tiled and normal/maximized
states, we need to keep track of the last full maximization state.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-12 11:55:50 +01:00
4ca552785f window: Queue a frame redraw after tiling
Usually tiling involves a size change and the frame is redrawn
automatically, however this is not the case when switching directly
between left- and right-tiled.
Ensure that a redraw happens in that case as well.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-12 11:55:50 +01:00
b26b11c74d Updated Hebrew translation. 2011-12-10 10:51:24 +02:00
b3114bb9e5 Updated Norwegian bokmål translation 2011-12-01 20:29:38 +01:00
497f9be61e window: Listen for pref changes
The workspaces-only-on-primary preference changes how windows are
displayed, so listen for pref changes and update the visibility
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=664853
2011-11-26 11:34:03 +01:00
a88365df9b Updated Slovenian translation 2011-11-25 21:25:10 +01:00
47f98c5528 Bump version to 3.3.2
Update NEWS
2011-11-21 19:04:44 -05:00
0e50287aea keybindings: Allow to add/remove keybindings at runtime
Add meta_display_add_keybinding()/meta_display_remove_keybinding(),
which allow to add/remove keybindings dynamically at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=663428
2011-11-22 00:42:30 +01:00
d42a2a3c27 keybindings: Store keybindings dynamically
Rather than defining keybindings in static arrays generated at compile
time, store them in a hash table initialized in meta_display_init_keys()
and filled in init_builtin_keybindings().

This is a prerequisite for allowing to add/remove keybindings at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=663428
2011-11-22 00:42:30 +01:00
78849bef04 Updated Spanish translation 2011-11-17 14:20:54 +01:00
b1a69d1e89 prefs: Fix typo 2011-11-14 20:13:56 +01:00
c5468ee391 prefs: Adapt to re-addition of a separate visual-bell option
Commit d0910da036 merged the visual-bell/visual-bell-type options,
but the change turned out too disruptive for gnome-control-center /
gnome-shell, so gsettings-desktop-schemas commit a5819b2a4e9 re-added
the separate option.
2011-11-14 15:43:48 +01:00
7ce7feeb2b Updated Norwegian bokmål translation 2011-11-13 11:15:37 +01:00
c0432ebb39 build: Specify a minimum version for gsettings-desktop-schemas
The version has been bumped, so we can now depend on a version
which includes the new wm schemas.
2011-11-12 15:29:41 +01:00
1a51d307c8 Fix installation of mutter-schemas.convert 2011-11-11 21:39:54 +01:00
d0910da036 Port preferences to GSettings
Move preferences to GSettings, using mainly shared schemas from
gsettings-desktop-schemas.

Unlike GConf, GSettings support is not optional, as Gio is already
a hard dependency of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=635378
2011-11-11 20:26:38 +01:00
a2726f41c9 ui: Replace deprecated gtk_widget_size_request 2011-11-11 09:33:42 +01:00
162213be0d Fix cogl crash from updating non-existent texture
The code here was always incorrect - we were processing damage events for
windows without having a texture. Before, this didn't matter, as
cogl_texture_get_width silently returned 0 for invalid handles. Cogl commit
4c3dadd35e changed this.

The fix here involves two strategies. First, we try to guard MetaTextureTower
from invalid textures. Second, we try not to go down the path that eventually
calls meta_shaped_texture_update_area by not handling damage events if we
don't have a texture for the window.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2011-11-10 16:40:12 -05:00
1596d1af10 meta-window-group: Fix types typo
gboolean is a typedef for int, so it doesn't matter too much

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2011-11-10 15:52:25 -05:00
441287dc64 theme: handle GTK_STATE_FLAG_WINDOW_UNFOCUSED
This bumps the required GTK+ version to >= 3.3.3 .
2011-11-08 20:59:41 +00:00
6e47f0e846 window: add _NET_WM_STATE_FOCUSED hint to _NET_WM_STATE
This hint reflects whether a window appears focused.

https://bugzilla.gnome.org/show_bug.cgi?id=661427
2011-11-08 19:19:32 +00:00
4fb2fab7f7 window.c: add meta_window_move_resize_frame
meta_window_move_resize_frame operates much like
meta_window_move_resize, but ensures the window
and its frame (if present) will fit within the
specified dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=651899
2011-11-05 18:52:43 -04:00
3beb33bb44 mutter-mag: Quit when the user hits escape
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 21:21:57 -04:00
1b04a40dce mutter-mag: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 21:21:56 -04:00
8087872130 theme-viewer: Fix layout
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
3ad25a62cd ui: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
7ecd673d23 mutter-window-demo: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
331c9aaee4 Reverting "configure: Turn off -Werror by default" Revert "configure: Turn off -Werror by default"
This reverts commit a26e72c452.

https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:21 -04:00
ec1979f9f5 theme-viewer: Update to fix GTK+ deprecations
Replace the GtkTable with a GtkGrid, replace GtkH/VBox with GtkBox
and junk a GtkHandleBox.

https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:16 -04:00
4b411ea241 tabpopup: Update to fix GTK+ deprecations
Replace the GtkTable with a GtkGrid, replace GtkH/VBox with GtkBox

https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:11 -04:00
70db187c36 frames: Don't use deprecated API to grab pointer position
https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:04 -04:00
4de3f1d147 Updated Telugu translations 2011-10-25 17:35:54 +05:30
821d4458ea Minor annotation fixes. 2011-10-24 17:06:17 -04:00
7f9472a58f util: Fix memory leak in meta_later_remove
We never destroy the later list that's added by meta_later_add.

==4289== 16 bytes in 1 blocks are definitely lost in loss record 1,632 of 7,258
==4289==    at 0x4C2640D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4289==    by 0x5178D9F: standard_malloc (gmem.c:88)
==4289==    by 0x5178E37: g_malloc (gmem.c:164)
==4289==    by 0x51924B5: g_slice_alloc (gslice.c:842)
==4289==    by 0x5194521: g_slist_insert_sorted_real (gslist.c:900)
==4289==    by 0x519465A: g_slist_insert_sorted (gslist.c:957)
==4289==    by 0x4EA609A: meta_later_add (util.c:876)
==4289==    by 0x4E9C330: meta_screen_queue_workarea_recalc (screen.c:2640)
==4289==    by 0x4E9A360: update_num_workspaces (screen.c:1646)
==4289==    by 0x4E99026: meta_screen_new (screen.c:924)
==4289==    by 0x4E7AB51: meta_display_open (display.c:803)
==4289==    by 0x4E9168E: meta_run (main.c:552)

https://bugzilla.gnome.org/show_bug.cgi?id=642652
2011-10-21 15:44:50 -04:00
3599917123 meta-window-group: Use clutter_actor_has_effects if available
This avoids a potentially costly allocation on every pixmap update.

https://bugzilla.gnome.org/show_bug.cgi?id=662225
2011-10-21 09:20:46 -04:00
d624e85bc1 frames: Disable the titlebar "inner resize"
Since invisible draggable borders have been around, there isn't really a big
need for this feature

https://bugzilla.gnome.org/show_bug.cgi?id=660129
2011-10-21 09:16:39 -04:00
6aa4bfd060 tiling: do not tile if moving in snap mode
If we are moving in snap mode (shift pressed) we don't want to tile. We must
also cancel any pending tiling if snap mode is activated during the move drag.

https://bugzilla.gnome.org/show_bug.cgi?id=662270
2011-10-20 16:18:38 +01:00
a26e72c452 configure: Turn off -Werror by default
We will eventually land jhbuild work to grep for warnings; for now
breaking the build is just too painful.
2011-10-19 09:52:02 -04:00
108 changed files with 20880 additions and 28485 deletions

4
.gitignore vendored
View File

@ -19,6 +19,7 @@ libtool
ltmain.sh
missing
.deps
src/50-mutter-windows.xml
src/mutter-wm.desktop
src/mutter.desktop
*.o
@ -48,7 +49,8 @@ libmutter.pc
mutter
mutter-theme-viewer
mutter.desktop
mutter.schemas
org.gnome.mutter.gschema.valid
org.gnome.mutter.gschema.xml
testasyncgetprop
testboxes
testgradient

View File

@ -42,10 +42,10 @@ Minimal Building/Testing Environment
build a development version of Metacity -- odds are, you may be able
to build metacity from CVS without building any other modules.
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
2.6 if you manually revert the change from bug 348633), you should
be able to install your distro's development packages
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
As long as you have gtk+ >= 3.0 and GIO >= 2.25.10 with your distro
(gtk+ >= 2.6 if you manually revert the change from bug 348633), you
should be able to install your distro's development packages
(e.g. gtk2-devel, glib-devel, startup-notification-devel on
Fedora; also, remember to install the gnome-common package which is
needed for building cvs versions of Gnome modules like Metacity) as
well as the standard development tools (gcc, autoconf, automake,

136
NEWS
View File

@ -1,3 +1,139 @@
3.4.0
=====
* Fix crash when a full-screen window is opened [Jasper; #672797]
* Fix memory leaks [Pavel; #672640]
Contributors:
Jasper St. Pierre, Pavel Vasin
Translations:
Marek Černocký, Petr Kovar [cz], Bruno Brouard [fr], Sweta Kothari [gu],
Yaron Shahrabani [he], Changwoo Ryu [kr], Enrico Nicoletto [pt_BR],
Yuri Myasoedov [ru], Muhammet Kara [tr], Nguyễn Thái Ngọc Duy [vi]
3.3.92
======
* Automaximize large windows on map [Adel; #671677]
* When unmaximizing windows, make sure the unminimized size
is signficantly less than the maximized size [Adel; #671677]
* Don't offer maximize option for windows larger than the screen
[Jasper; #643606]
* Always focus the window immediately underneath without restacking
when closing a window [Jasper; #620744]
* Avoid drawing shadows when two windows are tiled together [Rui; #643075]
* Remove tooltips for window decorations [Florian; #645101]
* Add org.gnome.mutter.dynamic-workspaces GSetting - when this is set
to true, workspace counts are never saved to GSettings, avoiding
pointless disk traffic for GNOME dynamic workspaces [Florian; #671568]
* Add ::grab-op-begin, ::grab-op-end signals to MetaDisplay [Jasper; #670658]
* Add meta_display_get_ignored_modifier_mask() [Florian; #665215]
* Remove pointless wrapper methods on MetaPlugin [Jasper; #671103]
* Fix frame drawing with 3.3.x GTK+ releases [Florian; #671796]
* Build fixes [Jasper, Rico, Rui]
* Misc bug fixes [Damien, Jasper, Lionel, Marius, Owen, Rui;
#661256, #667437, #671601, #671087, #672374]
Contributors:
Stefano Facchini, Adel Gadllah, Lionel Landwerlin, Mariusz Libera,
Rui Matos, Florian Müllner, Jasper St. Pierre, Damien Radtke, Owen Taylor,
Rico Tzschichholz
Translations:
Nilamdyuti Goswami [as], Ihar Hrachyshka [be], Alexander Shopov [bg],
David Planella [ca], Carles Ferrando [ca@valencia], Kenneth Nielsen [dk],
Bruce Cowan [en_GB], Daniel Mustieles [es], Mattias Põldaru [et],
Inaki Larranaga Murgoitio [eu], Timo Jyrinki [fi], Fran Diéguez [gl],
Gabor Kelemen [hu], Changwoo Ryu [ko], Anita Reitere [lv],
Kjartan Maraas [nb], Wouter Bolsterlee [nl], A S Alam [pa], Piotr Drąg [pl],
Duarte Loreto [pt], Yuri Myasoedov [ru], Daniel Nylander [se],
Matej Urbančič [sl], Miroslav Nikolić [sr], Tirumurti Vasudevan [ta],
Sasi Bhushan [te], Daniel Korostil [uk], Nguyễn Thái Ngọc Duy [vi],
YunQiang Su [zh_CN], Chao-Hsiung Liao [zh_HK, zh_TW]
3.3.90
======
* Update for Cogl API changes [Robert]
* Bug fixes [Adel, Jasper; #659643]
* Build fixes [Jasper, Owen]
Contributors:
Robert Bragg, Adel Gadllah, Jasper St. Pierre, Owen Taylor
Translations:
Ask H. Larsen [dk], Miroslav Nikolić [sr]
3.3.5
=====
* MetaShapedTexture no longer is a ClutterTexture subclass [Jasper; #660941]
* Add meta_shaped_texture_get_image() [Jasper; #660941]
* Cleanups [Rui, Jasper; #657639]
* Depend on GTK+ 3.3.7 [Rico]
Contributors:
Rui Matos, Jasper St. Pierre, Rico Tzschichholz
Translations:
Kjartan Maraas [nb], Chao-Hsiung Liao [zh_HK, zh_TW]
3.3.4
=====
* Adapt to changes in GtkStateFlags [Owen]
* Redo properties for applications menu corresponding to GTK+ changes -
they are now _GTK_* not DBUS_*. [Ryan]
* Fix crash on gnome-shell restart when a modal dialog is open [Owen; #668299]
* Code cleanup [Florian; #666039]
Contributors:
Ryan Lortie, Florian Müllner, Owen Taylor
Translations:
Alexander Shopov [bg], Fran Diéguez [gl]
3.3.3
=====
* Add keybindings for tiling to left or right [Florian; #648700]
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
property [Colin, Ryan; #664851]
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
* Don't use the Clutter default stage [Jasper; #664028]
* Fix compilation with --disable-introspection [Lionel; #661871]
* Fix problem where stage could end up mis-sized on startup with
multiple monitors [Lionel]
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
Contributors:
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
Translations:
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
Matej Urbančič [sk], Muhammet Kara [tr]
3.3.2
=====
* Move from GConf to GSettings for preferences [Florian; #635378]
* Add meta_display_add_keybinding()/meta_display_remove_keybinding()
to allow creating new keybindings at runtime [Florian; #663428]
* Add suport for new _NET_WM_STATE_FOCUSED atom in _NET_WM_STATE
to allow applications to draw unfocused windows differently
[Rui; #661427]
* Add meta_window_move_resize_frame() to allow specifying the
size and position of a window via the outside dimensions of the
window frame.
* Don't activate window tiling when moving in snap mode
[Rui; #662270]
* Remove the ability to resize a window from the inner edge of
the titlebar [Jasper; #660129]
* Fix for deprecations in GTK+ [Jasper, Rico; #662574, #662895]
* Misc bug fixes [Jasper, Rico, Rui; #662895, #642652, #660941, #662225]
Contributors:
Tim Cuthbertson, Rui Matos, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
Translations:
Jorge González (es), Kjartan Maraas (nb), Krishnababu Krothapalli (te), Nguyễn Thái Ngọc Duy (vi)
3.2.1
=====
* Allow keyboard window switching (alt-Tab) during drag-and-drop

29
README
View File

@ -18,8 +18,7 @@ COMPILING MUTTER
You need GTK+ 2.2. For startup notification to work you need
libstartup-notification at
http://www.freedesktop.org/software/startup-notification/ or on the
GNOME ftp site. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf, see below).
GNOME ftp site.
You need Clutter 1.0. You need gobject-introspection 0.6.3.
REPORTING BUGS AND SUBMITTING PATCHES
@ -59,25 +58,24 @@ MUTTER FEATURES
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
- Has a simple theme system and a couple of extra themes come with it.
Change themes via gconf-editor or gconftool or GNOME themes control
panel:
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
gconftool-2 --type=string --set /apps/metacity/general/theme Bright
Change themes via gsettings:
gsettings set org.gnome.desktop.wm.preferences theme Crux
gsettings set org.gnome.desktop.wm.preferences theme Gorilla
gsettings set org.gnome.desktop.wm.preferences theme Atlanta
gsettings set org.gnome.desktop.wm.preferences theme Bright
See theme-format.txt for docs on the theme format. Use
metacity-theme-viewer to preview themes.
- Change number of workspaces via gconf-editor or gconftool:
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
- Change number of workspaces via gsettings:
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
Can also change workspaces from GNOME 2 pager.
- Change focus mode:
gconftool-2 --type=string --set /apps/metacity/general/focus_mode mouse
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
gsettings set org.gnome.desktop.wm.preferences focus-mode click
- Global keybinding defaults include:
@ -92,10 +90,9 @@ MUTTER FEATURES
Change keybindings for example:
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 '[<Alt>F1]'
Also try the GNOME keyboard shortcuts control panel, or
gconf-editor.
Also try the GNOME keyboard shortcuts control panel.
- Window keybindings:

View File

@ -1,8 +1,8 @@
AC_PREREQ(2.50)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [2])
m4_define([mutter_micro_version], [1])
m4_define([mutter_minor_version], [4])
m4_define([mutter_micro_version], [0])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@ -61,21 +61,23 @@ AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
GTK_MIN_VERSION=2.91.7
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
CLUTTER_PACKAGE=clutter-1.0
AC_ARG_ENABLE(gconf,
AC_HELP_STRING([--disable-gconf],
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
enable_gconf=yes)
MUTTER_PC_MODULES="
gtk+-3.0 >= 3.3.7
gio-2.0 >= 2.25.10
pango >= 1.2.0
cairo >= 1.10.0
gsettings-desktop-schemas >= 3.3.0
xcomposite >= 0.2 xfixes xrender xdamage
$CLUTTER_PACKAGE >= 1.9.10
cogl-1.0 >= 1.9.6
"
if test x$enable_gconf = xyes; then
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gconf-2.0 >= 1.2.0"
fi
GLIB_GSETTINGS
AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose-mode],
@ -120,8 +122,8 @@ AM_GLIB_GNU_GETTEXT
# GRegex requires Glib-2.14.0
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
# gtk_window_set_icon_name requires gtk2+-2.6.0
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0 >= $GTK_MIN_VERSION)
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0)
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0)
# Unconditionally use this dir to avoid a circular dep with gnomecc
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
@ -171,31 +173,6 @@ else
fi
fi
XCOMPOSITE_VERSION=0.2
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, 1, [Building with compositing manager support])
echo "Building with compositing manager"
## force on render also
have_xrender=yes
else
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
fi
CLUTTER_VERSION=1.7.5
CLUTTER_PACKAGE=clutter-1.0
AC_SUBST(CLUTTER_PACKAGE)
if $PKG_CONFIG --atleast-version $CLUTTER_VERSION $CLUTTER_PACKAGE ; then
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CLUTTER_PACKAGE "
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
AC_DEFINE(WITH_CLUTTER, , [Building with Clutter compositor])
else
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
fi
INTROSPECTION_VERSION=0.9.5
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
@ -227,6 +204,10 @@ fi
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
# This is used for plugins
AC_SUBST(CLUTTER_PACKAGE)
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
AC_PATH_XTRA
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
@ -400,18 +381,6 @@ fi
AC_SUBST(GDK_PIXBUF_CSOURCE)
if test x$enable_gconf = xyes; then
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
else
GCONF_SCHEMAS_INSTALL_TRUE='#'
GCONF_SCHEMAS_INSTALL_FALSE=
fi
AC_PATH_PROG(ZENITY, zenity, no)
if test x"$ZENITY" = xno; then
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
@ -489,7 +458,7 @@ if test "$enable_compile_warnings" != no ; then
if test "$enable_compile_warnings" = error; then
case " $CFLAGS " in
*[\ \ ]-Werror[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Werror" ;;
*) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
esac
fi
fi
@ -511,13 +480,6 @@ po/Makefile.in
AC_OUTPUT
if test x$enable_gconf = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without GConf. This means there's no"
echo "*** way to change prefs except hacking source code."
echo "*** This is intended for embedded systems etc., not for normal use."
fi
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"
@ -534,7 +496,6 @@ mutter-$VERSION
source code location: ${srcdir}
compiler: ${CC}
GConf: ${enable_gconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Startup notification: ${have_startup_notification}
@ -551,8 +512,8 @@ MUTTER_MINOR_VERSION=mutter_minor_version
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
echo "This is the UNSTABLE branch of mutter"
echo -n "Use 2.$stable_version.x for stable "
echo "(gnome-2-$stable_version branch in git)"
echo -n "Use 3.$stable_version.x for stable "
echo "(gnome-3-$stable_version branch in git)"
else
echo "This is the stable branch of mutter"
fi

View File

@ -31,8 +31,7 @@ workspaces. In these cases, there needs to be a rule consistent with
the above about the new window to choose.
Focus method Behavior
click Focus the most recently used window (same as the window
on top)
click Focus the window on top
sloppy Focus the window containing the pointer if there is such
a window, otherwise focus the most recently used window.
mouse Focus the non-DESKTOP window containing the pointer if

View File

@ -46,13 +46,13 @@ because the original program does not have a manual page.
Restart \fBmutter\fP(1) which is running.
.TP
.B reload-theme
Reload a theme which is specified on gconf database.
Reload a theme which is specified on gsettings database.
.TP
.B enable-keybindings
Enable all of keybindings which is specified on gconf database.
Enable all of keybindings which is specified on gsettings database.
.TP
.B disable-keybindings
Disable all of keybindings which is specified on gconf database.
Disable all of keybindings which is specified on gsettings database.
.SH SEE ALSO
.BR mutter (1)
.SH AUTHOR

View File

@ -51,7 +51,7 @@ Print the version number.
.B \-?, \-\-help
Show summary of options.
.SH CONFIGURATION
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gsettings.
.SH SEE ALSO
.BR mutter-message (1)
.SH AUTHOR

View File

@ -1,7 +1,7 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
src/50-mutter-windows.xml.in
src/compositor/compositor.c
src/core/all-keybindings.h
src/core/bell.c
src/core/core.c
src/core/delete.c
@ -19,7 +19,7 @@ src/core/window-props.c
src/core/xprops.c
src/mutter.desktop.in
src/mutter-wm.desktop.in
src/mutter.schemas.in
src/org.gnome.mutter.gschema.xml.in
src/tools/mutter-message.c
src/ui/frames.c
src/ui/menu.c

1154
po/as.po

File diff suppressed because it is too large Load Diff

985
po/be.po

File diff suppressed because it is too large Load Diff

794
po/bg.po

File diff suppressed because it is too large Load Diff

1115
po/ca.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

909
po/cs.po

File diff suppressed because it is too large Load Diff

1042
po/da.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1072
po/es.po

File diff suppressed because it is too large Load Diff

480
po/et.po
View File

@ -7,253 +7,39 @@
#
# Tõivo Leedjärv <toivo linux ee>, 2004.
# Ivar Smolin <okul linux ee>, 2005, 2006, 20092011.
# Mattias Põldaru <mahfiaz gmail com>, 20082011.
# Mattias Põldaru <mahfiaz@gmail.com>, 20082011, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter MASTER\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&component=general\n"
"POT-Creation-Date: 2011-03-07 23:35+0000\n"
"PO-Revision-Date: 2011-03-09 06:41+0200\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
"Language-Team: Estonian <gnome-et@linux.ee>\n"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2012-03-11 22:19+0000\n"
"PO-Revision-Date: 2012-03-12 00:47+0200\n"
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
"Language-Team: Estonian <>\n"
"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
msgid "Switch to workspace 1"
msgstr "Lülitumine 1. tööalale"
msgid "Windows"
msgstr "Aknad"
msgid "Switch to workspace 2"
msgstr "Lülitumine 2. tööalale"
msgid "View split on left"
msgstr "Vaade poolitatakse vasakult"
msgid "Switch to workspace 3"
msgstr "Lülitumine 3. tööalale"
msgid "View split on right"
msgstr "Vaade poolitatakse paremalt"
msgid "Switch to workspace 4"
msgstr "Lülitumine 4. tööalale"
msgid "Switch to workspace 5"
msgstr "Lülitumine 5. tööalale"
msgid "Switch to workspace 6"
msgstr "Lülitumine 6. tööalale"
msgid "Switch to workspace 7"
msgstr "Lülitumine 7. tööalale"
msgid "Switch to workspace 8"
msgstr "Lülitumine 8. tööalale"
msgid "Switch to workspace 9"
msgstr "Lülitumine 9. tööalale"
msgid "Switch to workspace 10"
msgstr "Lülitumine 10. tööalale"
msgid "Switch to workspace 11"
msgstr "Lülitumine 11. tööalale"
msgid "Switch to workspace 12"
msgstr "Lülitumine 12. tööalale"
msgid "Switch to workspace on the left of the current workspace"
msgstr "Lülitumine sellest tööalast vasakul olevale tööalale"
msgid "Switch to workspace on the right of the current workspace"
msgstr "Lülitumine sellest tööalast paremal olevale tööalale"
msgid "Switch to workspace above the current workspace"
msgstr "Lülitumine selle tööala kohal olevale tööalale"
msgid "Switch to workspace below the current workspace"
msgstr "Lülitumine selle tööala all olevale tööalale"
msgid "Move between windows of an application, using a popup window"
msgstr "Liigu rakenduse akende vahel, hüpikaknaga"
msgid "Move backward between windows of an application, using a popup window"
msgstr "Liigu rakenduse akende vahel tagasisuunas, hüpikaknaga"
msgid "Move between windows, using a popup window"
msgstr "Liigu akende vahel, hüpikaknaga"
msgid "Move backward between windows, using a popup window"
msgstr "Liigu akende vahel tagasisuunas, hüpikaknaga"
msgid "Move between panels and the desktop, using a popup window"
msgstr "Liigu paneelide ja töölaua vahel, hüpikaknaga"
msgid "Move backward between panels and the desktop, using a popup window"
msgstr "Liigu tagasisuunas paneelide ja töölaua vahel, hüpikaknaga"
msgid "Move between windows of an application immediately"
msgstr "Liigu koheselt rakenduse akende vahel"
msgid "Move backward between windows of an application immediately"
msgstr "Liigu koheselt rakenduse akende vahel tagasisuunas"
msgid "Move between windows immediately"
msgstr "Liigu koheselt akende vahel"
msgid "Move backward between windows immediately"
msgstr "Liigu koheselt akende vahel tagasisuunas"
msgid "Move between panels and the desktop immediately"
msgstr "Liigu koheselt paneeli ja töölaua vahel"
msgid "Move backward between panels and the desktop immediately"
msgstr "Liigu koheselt tagasisuunas paneelide ja töölaua vahel"
msgid "Hide all normal windows and set focus to the desktop"
msgstr "Peida kõik tavalised aknad ja fokuseeri töölaud"
msgid "Show the panel's main menu"
msgstr "Paneeli peamenüü näitamine"
msgid "Show the panel's \"Run Application\" dialog box"
msgstr "Paneeli dialoogi \"Käivita rakendus\" näitamine"
msgid "Start or stop recording the session"
msgstr "Seansi salvestamise käivitamine või seiskamine"
msgid "Take a screenshot"
msgstr "Kuvatõmmise võtmine"
msgid "Take a screenshot of a window"
msgstr "Kuvatõmmise võtmine aknast"
msgid "Run a terminal"
msgstr "Terminali käivitamine"
msgid "Activate the window menu"
msgstr "Aknamenüü aktiveerimine"
msgid "Toggle fullscreen mode"
msgstr "Täisekraanivaate sisse- ja väljalülitamine"
msgid "Toggle maximization state"
msgstr "Maksimeeritud oleku sisse- ja väljalülitamine"
msgid "Toggle whether a window will always be visible over other windows"
msgstr "Lüliti määrab, kas aken on alati teiste akende kohal nähtav"
msgid "Maximize window"
msgstr "Akna maksimeerimine"
msgid "Restore window"
msgstr "Taasta akna suurus"
msgid "Toggle shaded state"
msgstr "Varjatud oleku lüliti"
msgid "Minimize window"
msgstr "Akna minimeerimine"
msgid "Close window"
msgstr "Akna sulgemine"
msgid "Move window"
msgstr "Teisalda aken"
msgid "Resize window"
msgstr "Muuda akna suurust"
msgid "Toggle whether window is on all workspaces or just one"
msgstr "Lüliti määrab, kas aken on kõigil tööaladel või ainult ühel"
msgid "Move window to workspace 1"
msgstr "Akna tõstmine 1. tööalale"
msgid "Move window to workspace 2"
msgstr "Akna tõstmine 2. tööalale"
msgid "Move window to workspace 3"
msgstr "Akna tõstmine 3. tööalale"
msgid "Move window to workspace 4"
msgstr "Akna tõstmine 4. tööalale"
msgid "Move window to workspace 5"
msgstr "Akna tõstmine 5. tööalale"
msgid "Move window to workspace 6"
msgstr "Akna tõstmine 6. tööalale"
msgid "Move window to workspace 7"
msgstr "Akna tõstmine 7. tööalale"
msgid "Move window to workspace 8"
msgstr "Akna tõstmine 8. tööalale"
msgid "Move window to workspace 9"
msgstr "Akna tõstmine 9. tööalale"
msgid "Move window to workspace 10"
msgstr "Akna tõstmine 10. tööalale"
msgid "Move window to workspace 11"
msgstr "Akna tõstmine 11. tööalale"
msgid "Move window to workspace 12"
msgstr "Akna tõstmine 12. tööalale"
msgid "Move window one workspace to the left"
msgstr "Akna tõstmine ühe tööala võrra vasakule"
msgid "Move window one workspace to the right"
msgstr "Akna tõstmine ühe tööala võrra paremale"
msgid "Move window one workspace up"
msgstr "Akna tõstmine ühe tööala võrra ülespoole"
msgid "Move window one workspace down"
msgstr "Akna tõstmine ühe tööala võrra allapoole"
msgid "Raise window if it's covered by another window, otherwise lower it"
msgstr "Tõsta aken, kui seda katab teine aken, muul juhul vii tahapoole"
msgid "Raise window above other windows"
msgstr "Akna tõstmine teiste akende kohale"
msgid "Lower window below other windows"
msgstr "Saada aken teiste taha"
msgid "Maximize window vertically"
msgstr "Maksimeeri aken vertikaalselt"
msgid "Maximize window horizontally"
msgstr "Maksimeeri aken horisontaalselt"
msgid "Move window to north-west (top left) corner"
msgstr "Akna tõstmine ekraani loodepoolsesse (ülemisse vasakusse) nurka"
msgid "Move window to north-east (top right) corner"
msgstr "Akna tõstmine ekraani kirdepoolsesse (ülemisse paremasse) nurka"
msgid "Move window to south-west (bottom left) corner"
msgstr "Akna tõstmine ekraani edelapoolsesse (alumisse vasakusse) nurka"
msgid "Move window to south-east (bottom right) corner"
msgstr "Akna tõstmine ekraani kagupoolsesse (alumisse paremasse) nurka"
msgid "Move window to north (top) side of screen"
msgstr "Akna tõstmine ekraani põhjapoolsesse (ülemisse) serva"
msgid "Move window to south (bottom) side of screen"
msgstr "Akna tõstmine ekraani lõunapoolsesse (alumisse) serva"
msgid "Move window to east (right) side of screen"
msgstr "Akna tõstmine ekraani idapoolsesse (paremasse) serva"
msgid "Move window to west (left) side of screen"
msgstr "Akna tõstmine ekraani läänepoolsesse (vasakusse) serva"
msgid "Move window to center of screen"
msgstr "Akna tõstmine ekraani keskele"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
msgstr "Teine komposiithaldur juba töötab ekraani %i kuval \"%s\"."
msgid "Bell event"
msgstr "Helina sündmus"
@ -262,11 +48,13 @@ msgstr "Helina sündmus"
msgid "Unknown window information request: %d"
msgstr "Tundmatu aknateabe päring: %d"
#. Translators: %s is a window title
#, c-format
msgid "<tt>%s</tt> is not responding."
msgstr "<tt>%s</tt> ei vasta."
msgid "Application is not responding."
msgstr "Rakendus ei vasta."
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@ -294,27 +82,6 @@ msgstr ""
"Mõni teine programm juba kasutab klahvi %s koos muuteklahvidega %x "
"kiirklahvina\n"
#. Displayed when a keybinding which is
#. * supposed to launch a program fails.
#.
#, c-format
msgid ""
"There was an error running <tt>%s</tt>:\n"
"\n"
"%s"
msgstr ""
"<tt>%s</tt> käivitamisel esines viga:\n"
"\n"
"%s"
#, c-format
msgid "No command %d has been defined.\n"
msgstr "Käsku %d pole defineeritud.\n"
#, c-format
msgid "No terminal command has been defined.\n"
msgstr "Terminalikäsku pole defineeritud.\n"
msgid "Disable connection to session manager"
msgstr "Seansihalduriga ühendumise keelamine"
@ -364,39 +131,6 @@ msgstr "Versiooni printimine"
msgid "Comma-separated list of compositor plugins"
msgstr "Komaga eraldatud nimekiri komposiitmontaaži pluginatest"
#.
#. * We found it, but it was invalid. Complain.
#. *
#. * FIXME: This replicates the original behaviour, but in the future
#. * we might consider reverting invalid keys to their original values.
#. * (We know the old value, so we can look up a suitable string in
#. * the symtab.)
#. *
#. * (Empty comment follows so the translators don't see this.)
#.
#.
#, c-format
msgid "GConf key '%s' is set to an invalid value\n"
msgstr "GConf võtme '%s' väärtus on vigane\n"
#, c-format
msgid "%d stored in GConf key %s is out of range %d to %d\n"
msgstr ""
"%d, mis on salvestatud GConf võtmes %s, on väljaspool piirkonda %d - %d\n"
#, c-format
msgid "GConf key \"%s\" is set to an invalid type\n"
msgstr "GConf-i võti \"%s\" on määratud vigase tüübiga\n"
#, c-format
msgid "GConf key %s is already in use and can't be used to override %s\n"
msgstr ""
"GConfi võti %s on juba kasutusel ja sellega ei saa tühistada võtit %s\n"
#, c-format
msgid "Can't override GConf key, %s not found\n"
msgstr "GConfi võtit pole võimalik tühistada, võtit %s ei leitud\n"
msgid ""
"Workarounds for broken applications disabled. Some applications may not "
"behave properly.\n"
@ -405,8 +139,8 @@ msgstr ""
"ei pruugi õigesti käituda.\n"
#, c-format
msgid "Could not parse font description \"%s\" from GConf key %s\n"
msgstr "Fondi kirjeldust \"%s\" GConf võtmest %s ei saa töödelda\n"
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
msgstr "Fondi kirjeldust \"%s\" GSettings võtmest %s pole võimalik töödelda\n"
#, c-format
msgid ""
@ -416,14 +150,6 @@ msgstr ""
"Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus hiireklahvi "
"modifikaatoriks\n"
#, c-format
msgid "Error setting number of workspaces to %d: %s\n"
msgstr "Viga tööalade arvuks %d määramisel: %s\n"
#, c-format
msgid "Workspace %d"
msgstr "Tööala %d"
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding "
@ -433,16 +159,8 @@ msgstr ""
"\"\n"
#, c-format
msgid "Error setting name for workspace %d to \"%s\": %s\n"
msgstr "Viga tööalale %d nime \"%s\" määramisel: %s\n"
#, c-format
msgid "Error setting live hidden windows status status: %s\n"
msgstr "Viga varjus elushoitavate akende oleku määramisel: %s\n"
#, c-format
msgid "Error setting no tab popup status: %s\n"
msgstr ""
msgid "Workspace %d"
msgstr "Tööala %d"
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
@ -540,10 +258,6 @@ msgstr "Aknahalduri hoiatus: "
msgid "Window manager error: "
msgstr "Aknahalduri viga: "
#. Translators: This is the title used on dialog boxes
msgid "Mutter"
msgstr "Mutter"
#. first time through
#, c-format
msgid ""
@ -581,6 +295,12 @@ msgstr "%s (masinas %s)"
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "Vigane WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks.\n"
#, c-format
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
msgstr ""
"WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks tekitaks tsüklilise "
"korduse.\n"
#, c-format
msgid ""
"Window 0x%lx has property %s\n"
@ -604,18 +324,8 @@ msgid ""
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
msgstr "Omadus %s aknal 0x%lx sisaldab vigast UTF-8 %d kirjele nimekirjas\n"
msgid "Attach modal dialogs"
msgstr "Modaaldialoogide kinnistamine"
msgid ""
"Determines whether hidden windows (i.e., minimized windows and windows on "
"other workspaces than the current one) should be kept alive."
msgstr ""
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
"hoitakse elus."
msgid "Live Hidden Windows"
msgstr "Varjatud akende aktiivsus"
msgid "Mutter"
msgstr "Mutter"
msgid "Modifier to use for extended window management operations"
msgstr "Laiendatud aknaoperatsioonide korral kasutatav muuteklahv"
@ -632,6 +342,9 @@ msgstr ""
"klahv\". Eeldatavasti määratakse selle seose väärtuseks vaikimisi või tühi "
"sõne."
msgid "Attach modal dialogs"
msgstr "Modaaldialoogide kinnistamine"
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@ -640,6 +353,75 @@ msgstr ""
"Kui märgitud, siis eraldi tiitliribade asemel on moodaalsed dialoogid "
"emaakna tiitliribade küljes ning liiguvad koos emaaknaga."
msgid "Live Hidden Windows"
msgstr "Varjatud akende aktiivsus"
msgid ""
"Determines whether hidden windows (i.e., minimized windows and windows on "
"other workspaces than the current one) should be kept alive."
msgstr ""
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
"hoitakse elus."
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Akna ümberpaigutamine selle lohistamisel ekraani serva"
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
"area. Dropping windows on the top screen edge maximizes them completely."
msgstr ""
"Kui märgitud, siis akna lohistamine ekraani külgservale maksimeerib selle "
"vertikaalselt ja laius katab pool saadaolevast laiusest. Akna lohistamine "
"ekraani ülaserva maksimeerib akna täielikult."
msgid "Workspaces are managed dynamically"
msgstr "Tööalade dünaamiline haldus"
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Määrab, kas tööalasid hallatakse dünaamiliselt või on nende arv staatiline "
"(arvu määrab org.gnome.desktop.wm.preferences all võti num-workspaces)."
msgid "Workspaces only on primary"
msgstr "Tööalad ainult peamisel"
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
msgstr ""
"Määrab, kas tööalade vahetamine mõjutab kõiki aknaid kõigil monitoridel või "
"ainult aknaid peamisel monitoril."
msgid "No tab popup"
msgstr "Tabulaatoril pole hüpikakent"
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
msgstr ""
"Kui märgitud, siis on hüpikaken ja esiletõstmise raam keelatud akende "
"vahetamisel."
msgid "Draggable border width"
msgstr "Lohistatava äärise laius."
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Lohistatava äärise laius. Kui kujunduse nähtavatest ääristest ei piisa, "
"lisatakse puuduoleva osa jaoks nähtamatu ääris."
msgid "Select window from tab popup"
msgstr "Akna valimine tabulaatori hüpikaknalt"
msgid "Cancel tab popup"
msgstr "Tabulaatori hüpikakna katkestamine"
#, c-format
msgid "Usage: %s\n"
msgstr "Kasutamine: %s\n"
@ -877,6 +659,30 @@ msgstr "Raami geomeetria ei määra nuppude suurust"
msgid "Gradients should have at least two colors"
msgstr "Värviüleminekus peaks olema vähemalt kaks värvi"
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr ""
"GTK kohandatud värvi määrang peab sisaldama sulgudes värvi nimetust ning "
"varuvärvi, nt gtk:custom(foo,bar); väärtust \"%s\" pole võimalik töödelda"
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid"
msgstr ""
"gtk:custom color_name parameetris sobimatu märk '%c', lubatud on ainult A-Za-"
"z0-9-_"
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format"
msgstr ""
"Gtk:custom vorming on \"gtk:custom(värvi_nimi,varuvärv)\", \"%s\" ei sobi "
"selle vorminguga"
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
@ -1511,25 +1317,3 @@ msgstr "y väärtus oli %d, oodati väärtust %d"
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr ""
"%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
#~ msgid ""
#~ "Don't make fullscreen windows that are maximized and have no decorations"
#~ msgstr "Ei tehta maksimeeritud ilma raamita täisekraanaknaid."
#~ msgid "Whether window popup/frame should be shown when cycling windows."
#~ msgstr "Kas hüpikakent/raami näidatakse akende vahetamisel."
#~ msgid "Internal argument for GObject introspection"
#~ msgstr "GObject enesevaatluse siseargument"
#~ msgid "Failed to restart: %s\n"
#~ msgstr "Tõrge taaskäivitamisel: %s\n"
#~ msgid "Error setting clutter plugin list: %s\n"
#~ msgstr "Viga clutteri pluginate nimekirja määramisel: %s\n"
#~ msgid "Clutter Plugins"
#~ msgstr "Clutteri pluginad"
#~ msgid "Plugins to load for the Clutter-based compositing manager."
#~ msgstr "Clutteril põhineva komposiitmontaažihalduri laadimise pluginad."

939
po/eu.po

File diff suppressed because it is too large Load Diff

1299
po/fi.po

File diff suppressed because it is too large Load Diff

833
po/fr.po

File diff suppressed because it is too large Load Diff

1076
po/gl.po

File diff suppressed because it is too large Load Diff

1368
po/gu.po

File diff suppressed because it is too large Load Diff

1482
po/he.po

File diff suppressed because it is too large Load Diff

1105
po/hu.po

File diff suppressed because it is too large Load Diff

869
po/ko.po

File diff suppressed because it is too large Load Diff

1243
po/lv.po

File diff suppressed because it is too large Load Diff

770
po/nb.po

File diff suppressed because it is too large Load Diff

1161
po/nl.po

File diff suppressed because it is too large Load Diff

1085
po/pa.po

File diff suppressed because it is too large Load Diff

754
po/pl.po

File diff suppressed because it is too large Load Diff

1057
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1561
po/ru.po

File diff suppressed because it is too large Load Diff

855
po/sl.po

File diff suppressed because it is too large Load Diff

1045
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1066
po/sv.po

File diff suppressed because it is too large Load Diff

940
po/ta.po

File diff suppressed because it is too large Load Diff

2435
po/te.po

File diff suppressed because it is too large Load Diff

1135
po/tr.po

File diff suppressed because it is too large Load Diff

1082
po/uk.po

File diff suppressed because it is too large Load Diff

1114
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries schema="org.gnome.mutter.keybindings"
group="system"
_name="Windows"
wm_name="Mutter"
package="mutter">
<KeyListEntry name="toggle-tiled-left"
_description="View split on left"/>
<KeyListEntry name="toggle-tiled-right"
_description="View split on right"/>
</KeyListEntries>

View File

@ -27,8 +27,6 @@ INCLUDES= \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
mutter_built_sources = \
mutter-marshal.h \
mutter-marshal.c \
mutter-enum-types.h \
mutter-enum-types.c
@ -54,7 +52,6 @@ libmutter_la_SOURCES = \
compositor/meta-shadow-factory.c \
compositor/meta-shadow-factory-private.h \
compositor/meta-shaped-texture.c \
compositor/meta-shaped-texture.h \
compositor/meta-texture-rectangle.c \
compositor/meta-texture-rectangle.h \
compositor/meta-texture-tower.c \
@ -133,8 +130,6 @@ libmutter_la_SOURCES = \
core/core.h \
ui/ui.h \
inlinepixbufs.h \
ui/fixedtip.c \
ui/fixedtip.h \
ui/frames.c \
ui/frames.h \
ui/menu.c \
@ -152,7 +147,6 @@ libmutter_la_SOURCES = \
meta/theme.h \
ui/theme-private.h \
ui/ui.c \
core/all-keybindings.h \
meta/preview-widget.h \
ui/preview-widget.c \
$(mutter_built_sources)
@ -175,6 +169,7 @@ libmutterinclude_base_headers = \
meta/main.h \
meta/meta-background-actor.h \
meta/meta-plugin.h \
meta/meta-shaped-texture.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
meta/prefs.h \
@ -226,7 +221,7 @@ typelib_DATA = Meta-$(api_version).typelib
INTROSPECTION_GIRS = Meta-$(api_version).gir
Meta-$(api_version).gir: libmutter.la
@META_GIR@_INCLUDES = GObject-2.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
@META_GIR@_PACKAGES = clutter-1.0 gtk+-3.0
@META_GIR@_CFLAGS = $(INCLUDES)
@META_GIR@_LIBS = libmutter.la
@ -262,20 +257,17 @@ wmproperties_in_files=mutter-wm.desktop.in
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
wmproperties_DATA = $(wmproperties_files)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = mutter.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
xml_in_files = \
50-mutter-windows.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
@INTLTOOL_SCHEMAS_RULE@
if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
else
install-data-local:
endif
convertdir = $(datadir)/GConf/gsettings
convert_DATA = mutter-schemas.convert
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
@ -287,7 +279,8 @@ CLEANFILES = \
inlinepixbufs.h \
mutter.desktop \
mutter-wm.desktop \
mutter.schemas \
org.gnome.mutter.gschema.xml \
$(xml_DATA) \
$(mutter_built_sources) \
$(typelib_DATA) \
$(gir_DATA)
@ -304,37 +297,18 @@ EXTRA_DIST=$(desktopfiles_files) \
$(IMAGES) \
$(desktopfiles_in_files) \
$(wmproperties_in_files) \
$(schema_in_files) \
$(xml_in_files) \
org.gnome.mutter.gschema.xml.in \
mutter-schemas.convert \
libmutter.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \
mutter-enum-types.c.in \
mutter-marshal.list
mutter-enum-types.c.in
BUILT_SOURCES += $(mutter_built_sources)
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
CLEANFILES += $(MUTTER_STAMP_FILES)
mutter-marshal.h: stamp-mutter-marshal.h
@true
stamp-mutter-marshal.h: Makefile mutter-marshal.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--header \
$(srcdir)/mutter-marshal.list > xgen-tmh && \
(cmp -s xgen-tmh mutter-marshal.h || cp -f xgen-tmh mutter-marshal.h) && \
rm -f xgen-tmh && \
echo timestamp > $(@F)
mutter-marshal.c: Makefile mutter-marshal.list
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
$(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--body \
$(srcdir)/mutter-marshal.list ) > xgen-tmc && \
cp -f xgen-tmc mutter-marshal.c && \
rm -f xgen-tmc
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
@true
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in

View File

@ -55,9 +55,6 @@ struct _MetaCompScreen
};
void meta_switch_workspace_completed (MetaScreen *screen);
void meta_set_stage_input_region (MetaScreen *screen,
XserverRegion region);
void meta_empty_stage_input_region (MetaScreen *screen);
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin,

View File

@ -515,13 +515,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
meta_screen_set_cm_selection (screen);
info->stage = clutter_stage_get_default ();
info->stage = clutter_stage_new ();
meta_screen_get_size (screen, &width, &height);
clutter_actor_set_size (info->stage, width, height);
clutter_actor_realize (info->stage);
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XResizeWindow (xdisplay, xwin, width, height);
event_mask = FocusChangeMask |
ExposureMask |
EnterWindowMask | LeaveWindowMask |
@ -1139,12 +1141,18 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
guint width,
guint height)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen);
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
Display *xdisplay;
Window xwin;
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
g_return_if_fail (info);
clutter_actor_set_size (info->stage, width, height);
xdisplay = meta_display_get_xdisplay (display);
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XResizeWindow (xdisplay, xwin, width, height);
meta_background_actor_screen_size_changed (screen);

View File

@ -28,6 +28,9 @@
#define COGL_ENABLE_EXPERIMENTAL_API
#include <cogl/cogl-texture-pixmap-x11.h>
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include <clutter/clutter.h>
#include <X11/Xatom.h>
#include "cogl-utils.h"
@ -252,6 +255,8 @@ meta_background_actor_dispose (GObject *object)
cogl_handle_unref (priv->material);
priv->material = COGL_INVALID_HANDLE;
}
G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
}
static void
@ -537,9 +542,11 @@ meta_background_actor_update (MetaScreen *screen)
if (root_pixmap_id != None)
{
CoglHandle texture;
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
GError *error = NULL;
meta_error_trap_push (display);
texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE);
texture = cogl_texture_pixmap_x11_new (ctx, root_pixmap_id, FALSE, &error);
meta_error_trap_pop (display);
if (texture != COGL_INVALID_HANDLE)
@ -550,6 +557,12 @@ meta_background_actor_update (MetaScreen *screen)
background->have_pixmap = True;
return;
}
else
{
g_warning ("Failed to create background texture from pixmap: %s",
error->message);
g_error_free (error);
}
}
background->have_pixmap = False;

View File

@ -263,38 +263,6 @@ meta_plugin_get_info (MetaPlugin *plugin)
return NULL;
}
ClutterActor *
meta_plugin_get_overlay_group (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_get_overlay_group_for_screen (priv->screen);
}
ClutterActor *
meta_plugin_get_stage (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_get_stage_for_screen (priv->screen);
}
ClutterActor *
meta_plugin_get_window_group (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_get_window_group_for_screen (priv->screen);
}
ClutterActor *
meta_plugin_get_background_actor (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_get_background_actor_for_screen (priv->screen);
}
/**
* _meta_plugin_effect_started:
* @plugin: the plugin
@ -315,7 +283,7 @@ meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
MetaScreen *screen = meta_plugin_get_screen (plugin);
MetaScreen *screen = priv->screen;
if (priv->running-- < 0)
{
@ -389,80 +357,6 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
}
void
meta_plugin_query_screen_size (MetaPlugin *plugin,
int *width,
int *height)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
meta_screen_get_size (priv->screen, width, height);
}
void
meta_plugin_set_stage_reactive (MetaPlugin *plugin,
gboolean reactive)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
MetaScreen *screen = priv->screen;
if (reactive)
meta_set_stage_input_region (screen, None);
else
meta_empty_stage_input_region (screen);
}
void
meta_plugin_set_stage_input_area (MetaPlugin *plugin,
gint x, gint y, gint width, gint height)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
MetaScreen *screen = priv->screen;
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display);
XRectangle rect;
XserverRegion region;
rect.x = x;
rect.y = y;
rect.width = width;
rect.height = height;
region = XFixesCreateRegion (xdpy, &rect, 1);
meta_set_stage_input_region (screen, region);
XFixesDestroyRegion (xdpy, region);
}
void
meta_plugin_set_stage_input_region (MetaPlugin *plugin,
XserverRegion region)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
MetaScreen *screen = priv->screen;
meta_set_stage_input_region (screen, region);
}
/**
* meta_plugin_get_window_actors:
* @plugin: A #MetaPlugin
*
* This function returns all of the #MetaWindowActor objects referenced by Mutter, including
* override-redirect windows. The returned list is a snapshot of Mutter's current
* stacking order, with the topmost window last.
*
* The 'restacked' signal of #MetaScreen signals when this value has changed.
*
* Returns: (transfer none) (element-type MetaWindowActor): Windows in stacking order, topmost last
*/
GList *
meta_plugin_get_window_actors (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_get_window_actors (priv->screen);
}
/**
* meta_plugin_begin_modal:
* @plugin: a #MetaPlugin
@ -521,16 +415,6 @@ meta_plugin_end_modal (MetaPlugin *plugin,
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
}
Display *
meta_plugin_get_xdisplay (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
MetaDisplay *display = meta_screen_get_display (priv->screen);
Display *xdpy = meta_display_get_xdisplay (display);
return xdpy;
}
/**
* meta_plugin_get_screen:
* @plugin: a #MetaPlugin

View File

@ -360,7 +360,7 @@ meta_shadow_paint (MetaShadow *shadow,
* @window_height: actual height of the region to paint a shadow for
*
* Computes the bounds of the pixels that will be affected by
* meta_shadow_paints()
* meta_shadow_paint()
*/
void
meta_shadow_get_bounds (MetaShadow *shadow,
@ -442,8 +442,7 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}

View File

@ -25,32 +25,41 @@
#include <config.h>
#include "meta-shaped-texture.h"
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#define COGL_ENABLE_EXPERIMENTAL_API
#include <meta/meta-shaped-texture.h>
#include "meta-texture-tower.h"
#include "meta-texture-rectangle.h"
#include <clutter/clutter.h>
#include <cogl/cogl.h>
#include <cogl/cogl-texture-pixmap-x11.h>
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
#include <string.h>
static void meta_shaped_texture_dispose (GObject *object);
static void meta_shaped_texture_notify (GObject *object,
GParamSpec *pspec);
static void meta_shaped_texture_paint (ClutterActor *actor);
static void meta_shaped_texture_pick (ClutterActor *actor,
const ClutterColor *color);
static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
int x,
int y,
int width,
int height);
static void meta_shaped_texture_get_preferred_width (ClutterActor *self,
gfloat for_height,
gfloat *min_width_p,
gfloat *natural_width_p);
static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
gfloat for_width,
gfloat *min_height_p,
gfloat *natural_height_p);
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
CLUTTER_TYPE_ACTOR);
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
@ -59,6 +68,8 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
struct _MetaShapedTexturePrivate
{
MetaTextureTower *paint_tower;
Pixmap pixmap;
CoglHandle texture;
CoglHandle mask_texture;
CoglHandle material;
CoglHandle material_unshaped;
@ -69,8 +80,7 @@ struct _MetaShapedTexturePrivate
cairo_region_t *overlay_region;
cairo_path_t *overlay_path;
cairo_region_t *visible_pixels_region;
guint tex_width, tex_height;
guint mask_width, mask_height;
guint create_mipmaps : 1;
@ -81,15 +91,14 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass;
gobject_class->dispose = meta_shaped_texture_dispose;
gobject_class->notify = meta_shaped_texture_notify;
actor_class->get_preferred_width = meta_shaped_texture_get_preferred_width;
actor_class->get_preferred_height = meta_shaped_texture_get_preferred_height;
actor_class->paint = meta_shaped_texture_paint;
actor_class->pick = meta_shaped_texture_pick;
x11_texture_class->update_area = meta_shaped_texture_update_area;
actor_class->get_paint_volume = meta_shaped_texture_get_paint_volume;
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
}
@ -104,8 +113,8 @@ meta_shaped_texture_init (MetaShapedTexture *self)
priv->shape_region = NULL;
priv->overlay_path = NULL;
priv->overlay_region = NULL;
priv->visible_pixels_region = NULL;
priv->paint_tower = meta_texture_tower_new ();
priv->texture = COGL_INVALID_HANDLE;
priv->mask_texture = COGL_INVALID_HANDLE;
priv->create_mipmaps = TRUE;
}
@ -132,6 +141,11 @@ meta_shaped_texture_dispose (GObject *object)
cogl_handle_unref (priv->material_unshaped);
priv->material_unshaped = COGL_INVALID_HANDLE;
}
if (priv->texture != COGL_INVALID_HANDLE)
{
cogl_handle_unref (priv->texture);
priv->texture = COGL_INVALID_HANDLE;
}
meta_shaped_texture_set_shape_region (self, NULL);
meta_shaped_texture_set_clip_region (self, NULL);
@ -140,114 +154,19 @@ meta_shaped_texture_dispose (GObject *object)
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
}
static void
meta_shaped_texture_notify (GObject *object,
GParamSpec *pspec)
{
if (G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify)
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify (object, pspec);
/* It seems like we could just do this out of update_area(), but unfortunately,
* clutter_glx_texture_pixmap() doesn't call through the vtable on the
* initial update_area, so we need to look for changes to the texture
* explicitly.
*/
if (strcmp (pspec->name, "cogl-texture") == 0)
{
MetaShapedTexture *stex = (MetaShapedTexture *) object;
MetaShapedTexturePrivate *priv = stex->priv;
meta_shaped_texture_clear (stex);
if (priv->create_mipmaps)
meta_texture_tower_set_base_texture (priv->paint_tower,
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)));
}
}
static void
meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
{
MetaShapedTexturePrivate *priv = stex->priv;
if (priv->visible_pixels_region != NULL)
if (priv->mask_texture != COGL_INVALID_HANDLE)
{
cairo_region_destroy (priv->visible_pixels_region);
priv->visible_pixels_region = NULL;
if (priv->mask_texture != COGL_INVALID_HANDLE)
{
cogl_handle_unref (priv->mask_texture);
priv->mask_texture = COGL_INVALID_HANDLE;
}
if (priv->material != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
cogl_handle_unref (priv->mask_texture);
priv->mask_texture = COGL_INVALID_HANDLE;
}
}
static void
scan_visible_region (MetaShapedTexture *stex,
guchar *mask_data,
int stride)
{
MetaShapedTexturePrivate *priv = stex->priv;
cairo_region_t *visible_pixels_region;
cairo_region_t *overlay_region;
int i, n_rects;
/* The visible pixels region contains all pixel values above 0.
* This is somewhat complicated when there's an overlay: we
* need to scan all regions potentially modified by it.
*/
if (priv->visible_pixels_region)
cairo_region_destroy (priv->visible_pixels_region);
priv->visible_pixels_region = cairo_region_copy (priv->shape_region);
visible_pixels_region = priv->visible_pixels_region;
overlay_region = priv->overlay_region;
/* With no overlay region, the visible region is defined
* by the mask region, so we don't need to scan anything. */
if (overlay_region == NULL)
return;
/* Subtract all the rectangles in the overlay region so that we can
* scan all the pixels potentially added by the overlay path. */
cairo_region_subtract (visible_pixels_region, overlay_region);
n_rects = cairo_region_num_rectangles (overlay_region);
for (i = 0; i < n_rects; i++)
{
int x, y;
cairo_rectangle_int_t rect;
cairo_region_get_rectangle (overlay_region, i, &rect);
for (y = rect.y; y < (rect.y + rect.height); y++)
{
for (x = rect.x; x < (rect.x + rect.width); x++)
{
int w = x;
while (mask_data[y * stride + w] > 0 && w < (rect.x + rect.width))
w++;
if (w > 0)
{
cairo_rectangle_int_t tmp;
tmp.x = x;
tmp.y = y;
tmp.width = w - x;
tmp.height = 1;
cairo_region_union_rectangle (visible_pixels_region, &tmp);
x = w;
}
}
}
}
if (priv->material != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
}
static void
@ -310,7 +229,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
CoglHandle paint_tex;
guint tex_width, tex_height;
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
paint_tex = priv->texture;
if (paint_tex == COGL_INVALID_HANDLE)
return;
@ -325,7 +244,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
meta_shaped_texture_dirty_mask (stex);
/* If we don't have a mask texture yet then create one */
if (priv->visible_pixels_region == NULL)
if (priv->mask_texture == COGL_INVALID_HANDLE)
{
guchar *mask_data;
int i;
@ -339,10 +258,6 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
(priv->overlay_region == NULL ||
cairo_region_num_rectangles (priv->overlay_region) == 0))
{
/* With no mask, the visible region is just
* {0, 0, tex_width, tex_height}. */
cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
priv->visible_pixels_region = cairo_region_create_rectangle (&rect);
return;
}
@ -377,7 +292,6 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
}
install_overlay_path (stex, mask_data, tex_width, tex_height, stride);
scan_visible_region (stex, mask_data, stride);
cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target);
@ -451,13 +365,13 @@ meta_shaped_texture_paint (ClutterActor *actor)
if (priv->create_mipmaps)
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
else
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
paint_tex = priv->texture;
if (paint_tex == COGL_INVALID_HANDLE)
return;
tex_width = cogl_texture_get_width (paint_tex);
tex_height = cogl_texture_get_height (paint_tex);
tex_width = priv->tex_width;
tex_height = priv->tex_height;
if (tex_width == 0 || tex_height == 0) /* no contents yet */
return;
@ -512,6 +426,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
{
int n_rects;
int i;
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
/* Limit to how many separate rectangles we'll draw; beyond this just
* fall back and draw the whole thing */
@ -529,6 +444,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
cairo_region_get_rectangle (priv->clip_region, i, &rect);
if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect))
continue;
x1 = rect.x;
y1 = rect.y;
x2 = rect.x + rect.width;
@ -574,7 +492,7 @@ meta_shaped_texture_pick (ClutterActor *actor,
ClutterActorBox alloc;
guint tex_width, tex_height;
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
paint_tex = priv->texture;
if (paint_tex == COGL_INVALID_HANDLE)
return;
@ -602,19 +520,48 @@ meta_shaped_texture_pick (ClutterActor *actor,
}
static void
meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
int x,
int y,
int width,
int height)
meta_shaped_texture_get_preferred_width (ClutterActor *self,
gfloat for_height,
gfloat *min_width_p,
gfloat *natural_width_p)
{
MetaShapedTexture *stex = (MetaShapedTexture *) texture;
MetaShapedTexturePrivate *priv = stex->priv;
MetaShapedTexturePrivate *priv;
CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture,
x, y, width, height);
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
priv = META_SHAPED_TEXTURE (self)->priv;
if (min_width_p)
*min_width_p = 0;
if (natural_width_p)
*natural_width_p = priv->tex_width;
}
static void
meta_shaped_texture_get_preferred_height (ClutterActor *self,
gfloat for_width,
gfloat *min_height_p,
gfloat *natural_height_p)
{
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
priv = META_SHAPED_TEXTURE (self)->priv;
if (min_height_p)
*min_height_p = 0;
if (natural_height_p)
*natural_height_p = priv->tex_height;
}
static gboolean
meta_shaped_texture_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume)
{
return clutter_paint_volume_set_from_allocation (volume, self);
}
ClutterActor *
@ -640,50 +587,13 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
if (create_mipmaps != priv->create_mipmaps)
{
CoglHandle base_texture;
priv->create_mipmaps = create_mipmaps;
base_texture = create_mipmaps ?
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE;
priv->texture : COGL_INVALID_HANDLE;
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
}
}
/* This is a workaround for deficiencies in the hack tower:
*
* When we call clutter_x11_texture_pixmap_set_pixmap(tp, None),
* ClutterX11TexturePixmap knows that it has to get rid of the old texture, but
* clutter_texture_set_cogl_texture(texture, COGL_INVALID_HANDLE) isn't allowed, so
* it grabs the material for the texture and manually sets the texture in it. This means
* that the "cogl-texture" property isn't notified, so we don't find out about it.
*
* And if we keep the CoglX11TexturePixmap around after the X pixmap is freed, then
* we'll trigger X errors when we actually try to free it.
*
* The only correct thing to do here is to change our code to derive
* from ClutterActor and get rid of the inheritance hack tower. Once
* we want to depend on Clutter-1.4 (which has CoglTexturePixmapX11),
* that will be very easy to do.
*/
void
meta_shaped_texture_clear (MetaShapedTexture *stex)
{
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
meta_texture_tower_set_base_texture (priv->paint_tower, COGL_INVALID_HANDLE);
if (priv->material != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material, 0, COGL_INVALID_HANDLE);
if (priv->material_unshaped != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material_unshaped, 0, COGL_INVALID_HANDLE);
}
void
meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
cairo_region_t *region)
@ -710,22 +620,119 @@ meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
}
/**
* meta_shaped_texture_get_visible_pixels_region:
* @stex: a #MetaShapedTexture
*
* Return a region enclosing only visible pixels: those with
* alpha values above 0.
*
* Returns: a #cairo_region_t
*/
cairo_region_t *
meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
void
meta_shaped_texture_update_area (MetaShapedTexture *stex,
int x,
int y,
int width,
int height)
{
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
MetaShapedTexturePrivate *priv;
const cairo_rectangle_int_t clip = { x, y, width, height };
meta_shaped_texture_ensure_mask (stex);
return stex->priv->visible_pixels_region;
priv = stex->priv;
if (priv->texture == COGL_INVALID_HANDLE)
return;
cogl_texture_pixmap_x11_update_area (priv->texture, x, y, width, height);
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
}
static void
set_cogl_texture (MetaShapedTexture *stex,
CoglHandle cogl_tex)
{
MetaShapedTexturePrivate *priv;
guint width, height;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
if (priv->texture != COGL_INVALID_HANDLE)
cogl_handle_unref (priv->texture);
priv->texture = cogl_tex;
if (priv->material != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material, 0, cogl_tex);
if (priv->material_unshaped != COGL_INVALID_HANDLE)
cogl_material_set_layer (priv->material_unshaped, 0, cogl_tex);
if (cogl_tex != COGL_INVALID_HANDLE)
{
width = cogl_texture_get_width (cogl_tex);
height = cogl_texture_get_height (cogl_tex);
if (width != priv->tex_width ||
height != priv->tex_height)
{
priv->tex_width = width;
priv->tex_height = height;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
}
else
{
/* size changed to 0 going to an invalid handle */
priv->tex_width = 0;
priv->tex_height = 0;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
}
/**
* meta_shaped_texture_set_pixmap:
* @stex: The #MetaShapedTexture
* @pixmap: The pixmap you want the stex to assume
*/
void
meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
Pixmap pixmap)
{
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
if (priv->pixmap == pixmap)
return;
priv->pixmap = pixmap;
if (pixmap != None)
{
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
set_cogl_texture (stex, cogl_texture_pixmap_x11_new (ctx, pixmap, FALSE, NULL));
}
else
set_cogl_texture (stex, COGL_INVALID_HANDLE);
if (priv->create_mipmaps)
meta_texture_tower_set_base_texture (priv->paint_tower, priv->texture);
}
/**
* meta_shaped_texture_get_texture:
* @stex: The #MetaShapedTexture
*
* Returns: (transfer none): the unshaped texture
*/
CoglHandle
meta_shaped_texture_get_texture (MetaShapedTexture *stex)
{
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), COGL_INVALID_HANDLE);
return stex->priv->texture;
}
/**
@ -734,7 +741,7 @@ meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
* @overlay_region: A region containing the parts of the mask to overlay.
* All rectangles in this region are wiped clear to full transparency,
* and the overlay path is clipped to this region.
* @overlay_path (transfer full): This path will be painted onto the mask
* @overlay_path: (transfer full): This path will be painted onto the mask
* texture with a fully opaque source. Due to the lack of refcounting
* in #cairo_path_t, ownership of the path is assumed.
*/
@ -772,10 +779,9 @@ meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
/**
* meta_shaped_texture_set_clip_region:
* @frame: a #MetaShapedTexture
* @stex: a #MetaShapedTexture
* @clip_region: (transfer full): the region of the texture that
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
* THE FUNCTION (for efficiency to avoid a copy.)
* is visible and should be painted.
*
* Provides a hint to the texture about what areas of the texture
* are not completely obscured and thus need to be painted. This
@ -801,5 +807,106 @@ meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
priv->clip_region = NULL;
}
priv->clip_region = clip_region;
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
else
priv->clip_region = NULL;
}
/**
* meta_shaped_texture_get_image:
* @stex: A #MetaShapedTexture
* @clip: A clipping rectangle, to help prevent extra processing.
* In the case that the clipping rectangle is partially or fully
* outside the bounds of the texture, the rectangle will be clipped.
*
* Flattens the two layers of the shaped texture into one ARGB32
* image by alpha blending the two images, and returns the flattened
* image.
*
* Returns: (transfer full): a new cairo surface to be freed with
* cairo_surface_destroy().
*/
cairo_surface_t *
meta_shaped_texture_get_image (MetaShapedTexture *stex,
cairo_rectangle_int_t *clip)
{
CoglHandle texture, mask_texture;
cairo_rectangle_int_t texture_rect = { 0, 0, 0, 0 };
cairo_surface_t *surface;
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
texture = stex->priv->texture;
if (texture == NULL)
return NULL;
texture_rect.width = cogl_texture_get_width (texture);
texture_rect.height = cogl_texture_get_height (texture);
if (clip != NULL)
{
/* GdkRectangle is just a typedef of cairo_rectangle_int_t,
* so we can use the gdk_rectangle_* APIs on these. */
if (!gdk_rectangle_intersect (&texture_rect, clip, clip))
return NULL;
}
if (clip != NULL)
texture = cogl_texture_new_from_sub_texture (texture,
clip->x,
clip->y,
clip->width,
clip->height);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture));
cogl_texture_get_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32,
cairo_image_surface_get_stride (surface),
cairo_image_surface_get_data (surface));
cairo_surface_mark_dirty (surface);
if (clip != NULL)
cogl_object_unref (texture);
mask_texture = stex->priv->mask_texture;
if (mask_texture != COGL_INVALID_HANDLE)
{
cairo_t *cr;
cairo_surface_t *mask_surface;
if (clip != NULL)
mask_texture = cogl_texture_new_from_sub_texture (mask_texture,
clip->x,
clip->y,
clip->width,
clip->height);
mask_surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
cogl_texture_get_width (mask_texture),
cogl_texture_get_height (mask_texture));
cogl_texture_get_data (mask_texture, COGL_PIXEL_FORMAT_A_8,
cairo_image_surface_get_stride (mask_surface),
cairo_image_surface_get_data (mask_surface));
cairo_surface_mark_dirty (mask_surface);
cr = cairo_create (surface);
cairo_set_source_surface (cr, mask_surface, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_DEST_IN);
cairo_paint (cr);
cairo_destroy (cr);
cairo_surface_destroy (mask_surface);
if (clip != NULL)
cogl_object_unref (mask_texture);
}
return surface;
}

View File

@ -198,6 +198,9 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
g_return_if_fail (tower != NULL);
if (tower->textures[0] == COGL_INVALID_HANDLE)
return;
texture_width = cogl_texture_get_width (tower->textures[0]);
texture_height = cogl_texture_get_height (tower->textures[0]);

View File

@ -18,11 +18,11 @@
#include <meta/errors.h>
#include "frame.h"
#include <meta/window.h>
#include <meta/meta-shaped-texture.h>
#include "xprops.h"
#include "compositor-private.h"
#include "meta-shadow-factory-private.h"
#include "meta-shaped-texture.h"
#include "meta-window-actor-private.h"
enum {
@ -232,15 +232,13 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
g_signal_new ("position-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[SIZE_CHANGED] =
g_signal_new ("size-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
@ -741,6 +739,13 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
meta_window_is_fullscreen (priv->window))
return FALSE;
/*
* If we have two snap-tiled windows, we don't want the shadow to obstruct
* the other window.
*/
if (meta_window_get_tile_match (priv->window))
return FALSE;
/*
* Always put a shadow around windows with a frame - This should override
* the restriction about not putting a shadow around ARGB windows.
@ -828,9 +833,9 @@ meta_window_actor_get_x_window (MetaWindowActor *self)
/**
* meta_window_actor_get_meta_window:
*
* Gets the MetaWindow object that the the MetaWindowActor is displaying
* Gets the #MetaWindow object that the the #MetaWindowActor is displaying
*
* Return value: (transfer none): the displayed MetaWindow
* Return value: (transfer none): the displayed #MetaWindow
*/
MetaWindow *
meta_window_actor_get_meta_window (MetaWindowActor *self)
@ -843,7 +848,7 @@ meta_window_actor_get_meta_window (MetaWindowActor *self)
*
* Gets the ClutterActor that is used to display the contents of the window
*
* Return value: (transfer none): the ClutterActor for the contents
* Return value: (transfer none): the #ClutterActor for the contents
*/
ClutterActor *
meta_window_actor_get_texture (MetaWindowActor *self)
@ -946,23 +951,20 @@ static void
meta_window_actor_damage_all (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
guint pixmap_width = 0;
guint pixmap_height = 0;
CoglHandle texture;
if (!priv->needs_damage_all)
return;
g_object_get (texture_x11,
"pixmap-width", &pixmap_width,
"pixmap-height", &pixmap_height,
NULL);
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
clutter_x11_texture_pixmap_update_area (texture_x11,
0,
0,
pixmap_width,
pixmap_height);
if (!priv->mapped || priv->needs_pixmap)
return;
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
0, 0,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture));
priv->needs_damage_all = FALSE;
}
@ -1201,9 +1203,8 @@ meta_window_actor_detach (MetaWindowActor *self)
* you are supposed to be able to free a GLXPixmap after freeing the underlying
* pixmap, but it certainly doesn't work with current DRI/Mesa
*/
clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
None);
meta_shaped_texture_clear (META_SHAPED_TEXTURE (priv->actor));
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
None);
cogl_flush();
XFreePixmap (xdisplay, priv->back_pixmap);
@ -1252,19 +1253,24 @@ void
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
{
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
MetaDisplay *display = meta_window_get_display (metaWindow);
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow));
Display *xdisplay = meta_display_get_xdisplay (display);
Window xwin = meta_window_actor_get_x_window (self);
if (state)
{
meta_error_trap_push (display);
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
meta_error_trap_pop (display);
meta_window_actor_queue_create_pixmap (self);
self->priv->unredirected = FALSE;
}
else
{
meta_error_trap_push (display);
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
meta_error_trap_pop (display);
self->priv->unredirected = TRUE;
}
}
@ -1610,24 +1616,16 @@ meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
int height)
{
MetaWindowActorPrivate *priv = self->priv;
MetaFrame *frame;
MetaFrameBorders borders;
cairo_rectangle_int_t bounding_rectangle;
bounding_rectangle.x = 0;
bounding_rectangle.y = 0;
meta_frame_calc_borders (priv->window->frame, &borders);
frame = priv->window->frame;
if (frame != NULL)
{
meta_frame_calc_borders (frame, &borders);
bounding_rectangle.x = borders.invisible.left;
bounding_rectangle.y = borders.invisible.top;
bounding_rectangle.x = borders.invisible.left;
bounding_rectangle.y = borders.invisible.top;
width -= borders.invisible.left + borders.invisible.right;
height -= borders.invisible.top + borders.invisible.bottom;
}
width -= borders.invisible.left + borders.invisible.right;
height -= borders.invisible.top + borders.invisible.bottom;
bounding_rectangle.width = width;
bounding_rectangle.height = height;
@ -1750,22 +1748,9 @@ meta_window_actor_set_visible_region (MetaWindowActor *self,
cairo_region_t *visible_region)
{
MetaWindowActorPrivate *priv = self->priv;
cairo_region_t *texture_clip_region = NULL;
/* Get the area of the window texture that would be drawn if
* we weren't obscured at all
*/
texture_clip_region = meta_shaped_texture_get_visible_pixels_region (META_SHAPED_TEXTURE (priv->actor));
texture_clip_region = cairo_region_copy (texture_clip_region);
/* Then intersect that with the visible region to get the region
* that we actually need to redraw.
*/
cairo_region_intersect (texture_clip_region, visible_region);
/* Assumes ownership */
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
texture_clip_region);
visible_region);
}
/**
@ -1805,7 +1790,7 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
* @self: a #MetaWindowActor
*
* Unsets the regions set by meta_window_actor_reset_visible_region() and
*meta_window_actor_reset_visible_region_beneath()
* meta_window_actor_reset_visible_region_beneath()
*/
void
meta_window_actor_reset_visible_regions (MetaWindowActor *self)
@ -1817,19 +1802,6 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
meta_window_actor_clear_shadow_clip (self);
}
static gboolean
texture_pixmap_using_extension (ClutterX11TexturePixmap *texture)
{
ClutterTexture *self = CLUTTER_TEXTURE (texture);
CoglHandle handle;
handle = clutter_texture_get_cogl_texture (self);
return handle != NULL &&
cogl_is_texture_pixmap_x11 (handle) &&
cogl_texture_pixmap_x11_is_using_tfp_extension (handle);
}
static void
check_needs_pixmap (MetaWindowActor *self)
{
@ -1863,7 +1835,7 @@ check_needs_pixmap (MetaWindowActor *self)
if (priv->back_pixmap == None)
{
gint pxm_width, pxm_height;
CoglHandle texture;
meta_error_trap_push (display);
@ -1892,23 +1864,22 @@ check_needs_pixmap (MetaWindowActor *self)
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
FALSE);
clutter_x11_texture_pixmap_set_pixmap
(CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
priv->back_pixmap);
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
priv->back_pixmap);
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
/*
* This only works *after* actually setting the pixmap, so we have to
* do it here.
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
*/
if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor))))
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (texture)))
g_warning ("NOTE: Not using GLX TFP!\n");
g_object_get (priv->actor,
"pixmap-width", &pxm_width,
"pixmap-height", &pxm_height,
NULL);
meta_window_actor_update_bounding_region_and_borders (self, pxm_width, pxm_height);
meta_window_actor_update_bounding_region_and_borders (self,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture));
}
priv->needs_pixmap = FALSE;
@ -2001,7 +1972,6 @@ meta_window_actor_process_damage (MetaWindowActor *self,
XDamageNotifyEvent *event)
{
MetaWindowActorPrivate *priv = self->priv;
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
priv->received_damage = TRUE;
@ -2029,12 +1999,14 @@ meta_window_actor_process_damage (MetaWindowActor *self,
return;
}
if (!priv->mapped || priv->needs_pixmap)
return;
clutter_x11_texture_pixmap_update_area (texture_x11,
event->area.x,
event->area.y,
event->area.width,
event->area.height);
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
event->area.x,
event->area.y,
event->area.width,
event->area.height);
}
void
@ -2183,10 +2155,7 @@ check_needs_reshape (MetaWindowActor *self)
meta_shaped_texture_set_shape_region (META_SHAPED_TEXTURE (priv->actor), NULL);
meta_window_actor_clear_shape_region (self);
if (priv->window->frame)
meta_frame_calc_borders (priv->window->frame, &borders);
else
meta_frame_borders_clear (&borders);
meta_frame_calc_borders (priv->window->frame, &borders);
region = meta_window_get_frame_bounds (priv->window);
if (region != NULL)

View File

@ -108,7 +108,7 @@ meta_window_group_paint (ClutterActor *actor)
cairo_region_t *unredirected_window_region = NULL;
ClutterActor *stage;
cairo_rectangle_int_t visible_rect, unredirected_rect;
GList *children, *l, *effects;
GList *children, *l;
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
@ -161,16 +161,13 @@ meta_window_group_paint (ClutterActor *actor)
* as well for the same reason, but omitted for simplicity in the
* hopes that no-one will do that.
*/
if ((effects = clutter_actor_get_effects (l->data)) != NULL)
{
g_list_free (effects);
continue;
}
if (clutter_actor_has_effects (l->data))
continue;
if (META_IS_WINDOW_ACTOR (l->data))
{
MetaWindowActor *window_actor = l->data;
gboolean x, y;
int x, y;
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
continue;

View File

@ -16,3 +16,9 @@ pkglib_LTLIBRARIES = default.la
install-exec-hook:
-rm $(DESTDIR)$(pkglibdir)/*.a
-rm $(DESTDIR)$(pkglibdir)/*.la
# Since we removed the .la file, 'make uninstall' doesn't work properly,
# since it counts on libtool to remove the .la files, so just kill the
# .so file manually.
uninstall-local:
-rm -f $(DESTDIR)$(pkglibdir)/default.so

View File

@ -284,7 +284,8 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
{
MetaPlugin *plugin = META_PLUGIN (data);
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
GList *l = meta_plugin_get_window_actors (plugin);
MetaScreen *screen = meta_plugin_get_screen (plugin);
GList *l = meta_get_window_actors (screen);
while (l)
{
@ -317,6 +318,7 @@ switch_workspace (MetaPlugin *plugin,
gint from, gint to,
MetaMotionDirection direction)
{
MetaScreen *screen;
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
GList *l;
ClutterActor *workspace0 = clutter_group_new ();
@ -325,11 +327,13 @@ switch_workspace (MetaPlugin *plugin,
int screen_width, screen_height;
ClutterAnimation *animation;
stage = meta_plugin_get_stage (plugin);
screen = meta_plugin_get_screen (plugin);
stage = meta_get_stage_for_screen (screen);
meta_screen_get_size (screen,
&screen_width,
&screen_height);
meta_plugin_query_screen_size (plugin,
&screen_width,
&screen_height);
clutter_actor_set_anchor_point (workspace1,
screen_width,
screen_height);
@ -348,7 +352,7 @@ switch_workspace (MetaPlugin *plugin,
return;
}
l = g_list_last (meta_plugin_get_window_actors (plugin));
l = g_list_last (meta_get_window_actors (screen));
while (l)
{
@ -446,12 +450,19 @@ static void
minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
{
MetaWindowType type;
MetaRectangle icon_geometry;
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
type = meta_window_get_window_type (meta_window);
if (!meta_window_get_icon_geometry(meta_window, &icon_geometry))
{
icon_geometry.x = 0;
icon_geometry.y = 0;
}
if (type == META_WINDOW_NORMAL)
{
ClutterAnimation *animation;
@ -468,6 +479,8 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
MINIMIZE_TIMEOUT,
"scale-x", 0.0,
"scale-y", 0.0,
"x", icon_geometry.x,
"y", icon_geometry.y,
NULL);
apriv->tml_minimize = clutter_animation_get_timeline (animation);
data->plugin = plugin;

View File

@ -1,400 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* A list of screen keybinding information.
*
* Each action which can have a keystroke bound to it is listed below.
* To use this file, define keybind() to be a seven-argument macro (you can
* throw any of the arguments you please away), include this file,
* and then undefine the macro again.
*
* (If you aren't familiar with this technique, sometimes called "x-macros",
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
*
* This makes it possible to keep all information about all the keybindings
* in the same place. The only exception is the code to run when an action
* is actually invoked; while we *could* have put that in this file, it would
* have made debugging ridiculously difficult. Instead, each action should
* have a corresponding static function named handle_<name>() in
* keybindings.c.
*
* The arguments to keybind() are:
* 1) the name of the binding; a bareword identifier
* (it's fine if it happens to clash with a C reserved word)
* 2) the name of the function which implements it.
* Clearly we could have guessed this from the binding very often,
* but we choose to write it in full for the benefit of grep.
* 3) an integer parameter to pass to the handler
* 4) a set of boolean flags, ORed together:
* BINDING_PER_WINDOW - this is a window-based binding.
* It is only valid if there is a
* current window, and will operate in
* some way on that window.
* BINDING_REVERSES - the binding can reverse if you hold down Shift
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
* handler's point of view (let me know if I should
* explain this better)
* or 0 if no flag applies.
*
* 5) a string representing the default binding.
* If this is NULL, the action is unbound by default.
* Please use NULL and not "disabled".
* 6) a short description.
* It must be marked translatable (i.e. inside "_(...)").
*
* Don't try to do XML entity escaping anywhere in the strings.
*/
#ifndef keybind
#error "keybind () must be defined when you include screen-bindings.h"
#endif
/***********************************/
#ifndef _BINDINGS_DEFINED_CONSTANTS
#define _BINDINGS_DEFINED_CONSTANTS 1
#define BINDING_PER_WINDOW 0x01
#define BINDING_REVERSES 0x02
#define BINDING_IS_REVERSED 0x04
#endif /* _BINDINGS_DEFINED_CONSTANTS */
/***********************************/
/* convenience, since in this file they must always be set together */
#define REVERSES_AND_REVERSED (BINDING_REVERSES | BINDING_IS_REVERSED)
keybind (switch_to_workspace_1, handle_switch_to_workspace, 0, 0, NULL,
_("Switch to workspace 1"))
keybind (switch_to_workspace_2, handle_switch_to_workspace, 1, 0, NULL,
_("Switch to workspace 2"))
keybind (switch_to_workspace_3, handle_switch_to_workspace, 2, 0, NULL,
_("Switch to workspace 3"))
keybind (switch_to_workspace_4, handle_switch_to_workspace, 3, 0, NULL,
_("Switch to workspace 4"))
keybind (switch_to_workspace_5, handle_switch_to_workspace, 4, 0, NULL,
_("Switch to workspace 5"))
keybind (switch_to_workspace_6, handle_switch_to_workspace, 5, 0, NULL,
_("Switch to workspace 6"))
keybind (switch_to_workspace_7, handle_switch_to_workspace, 6, 0, NULL,
_("Switch to workspace 7"))
keybind (switch_to_workspace_8, handle_switch_to_workspace, 7, 0, NULL,
_("Switch to workspace 8"))
keybind (switch_to_workspace_9, handle_switch_to_workspace, 8, 0, NULL,
_("Switch to workspace 9"))
keybind (switch_to_workspace_10, handle_switch_to_workspace, 9, 0, NULL,
_("Switch to workspace 10"))
keybind (switch_to_workspace_11, handle_switch_to_workspace, 10, 0, NULL,
_("Switch to workspace 11"))
keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL,
_("Switch to workspace 12"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (switch_to_workspace_left, handle_switch_to_workspace,
META_MOTION_LEFT, 0, "<Control><Alt>Left",
_("Switch to workspace on the left of the current workspace"))
keybind (switch_to_workspace_right, handle_switch_to_workspace,
META_MOTION_RIGHT, 0, "<Control><Alt>Right",
_("Switch to workspace on the right of the current workspace"))
keybind (switch_to_workspace_up, handle_switch_to_workspace,
META_MOTION_UP, 0, "<Control><Alt>Up",
_("Switch to workspace above the current workspace"))
keybind (switch_to_workspace_down, handle_switch_to_workspace,
META_MOTION_DOWN, 0, "<Control><Alt>Down",
_("Switch to workspace below the current workspace"))
/***********************************/
/* The ones which have inverses. These can't be bound to any keystroke
* containing Shift because Shift will invert their "backward" state.
*
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
* action, for obviousness.
*
* TODO: handle_switch and handle_cycle should probably really be the
* same function checking a bit in the parameter for difference.
*/
keybind (switch_group, handle_switch, META_TAB_LIST_GROUP,
BINDING_REVERSES, "<Alt>Above_Tab",
_("Move between windows of an application, using a popup window"))
keybind (switch_group_backward, handle_switch, META_TAB_LIST_GROUP,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows of an application, "
"using a popup window"))
keybind (switch_windows, handle_switch, META_TAB_LIST_NORMAL,
BINDING_REVERSES, "<Alt>Tab",
_("Move between windows, using a popup window"))
keybind (switch_windows_backward, handle_switch, META_TAB_LIST_NORMAL,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows, using a popup window"))
keybind (switch_panels, handle_switch, META_TAB_LIST_DOCKS,
BINDING_REVERSES, "<Control><Alt>Tab",
_("Move between panels and the desktop, using a popup window"))
keybind (switch_panels_backward, handle_switch, META_TAB_LIST_DOCKS,
REVERSES_AND_REVERSED, NULL,
_("Move backward between panels and the desktop, "
"using a popup window"))
keybind (cycle_group, handle_cycle, META_TAB_LIST_GROUP,
BINDING_REVERSES, "<Alt>F6",
_("Move between windows of an application immediately"))
keybind (cycle_group_backward, handle_cycle, META_TAB_LIST_GROUP,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows of an application immediately"))
keybind (cycle_windows, handle_cycle, META_TAB_LIST_NORMAL,
BINDING_REVERSES, "<Alt>Escape",
_("Move between windows immediately"))
keybind (cycle_windows_backward, handle_cycle, META_TAB_LIST_NORMAL,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows immediately"))
keybind (cycle_panels, handle_cycle, META_TAB_LIST_DOCKS,
BINDING_REVERSES, "<Control><Alt>Escape",
_("Move between panels and the desktop immediately"))
keybind (cycle_panels_backward, handle_cycle, META_TAB_LIST_DOCKS,
REVERSES_AND_REVERSED, NULL,
_("Move backward between panels and the desktop immediately"))
/***********************************/
/* These two are special pseudo-bindings that are provided for allowing
* custom handlers, but will never be bound to a key. While a tab
* grab is in effect, they are invoked for releasing the primary modifier
* or pressing some unbound key, respectively.
*/
keybind (tab_popup_select, handle_tab_popup_select, 0, 0, NULL,
"Select window from tab popup")
keybind (tab_popup_cancel, handle_tab_popup_cancel, 0, 0, NULL,
"Cancel tab popup")
/***********************************/
keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
_("Hide all normal windows and set focus to the desktop"))
keybind (panel_main_menu, handle_panel,
META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
_("Show the panel's main menu"))
keybind (panel_run_dialog, handle_panel,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
_("Show the panel's \"Run Application\" dialog box"))
keybind (toggle_recording, handle_toggle_recording, 0, 0, "<Control><Shift><Alt>r",
_("Start or stop recording the session"))
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
* at some point.) The description is NULL here because the stanza is
* irregularly shaped in mutter.schemas.in. This will probably be fixed
* as well.
*/
keybind (run_command_1, handle_run_command, 0, 0, NULL, NULL)
keybind (run_command_2, handle_run_command, 1, 0, NULL, NULL)
keybind (run_command_3, handle_run_command, 2, 0, NULL, NULL)
keybind (run_command_4, handle_run_command, 3, 0, NULL, NULL)
keybind (run_command_5, handle_run_command, 4, 0, NULL, NULL)
keybind (run_command_6, handle_run_command, 5, 0, NULL, NULL)
keybind (run_command_7, handle_run_command, 6, 0, NULL, NULL)
keybind (run_command_8, handle_run_command, 7, 0, NULL, NULL)
keybind (run_command_9, handle_run_command, 8, 0, NULL, NULL)
keybind (run_command_10, handle_run_command, 9, 0, NULL, NULL)
keybind (run_command_11, handle_run_command, 10, 0, NULL, NULL)
keybind (run_command_12, handle_run_command, 11, 0, NULL, NULL)
keybind (run_command_13, handle_run_command, 12, 0, NULL, NULL)
keybind (run_command_14, handle_run_command, 13, 0, NULL, NULL)
keybind (run_command_15, handle_run_command, 14, 0, NULL, NULL)
keybind (run_command_16, handle_run_command, 15, 0, NULL, NULL)
keybind (run_command_17, handle_run_command, 16, 0, NULL, NULL)
keybind (run_command_18, handle_run_command, 17, 0, NULL, NULL)
keybind (run_command_19, handle_run_command, 18, 0, NULL, NULL)
keybind (run_command_20, handle_run_command, 19, 0, NULL, NULL)
keybind (run_command_21, handle_run_command, 20, 0, NULL, NULL)
keybind (run_command_22, handle_run_command, 21, 0, NULL, NULL)
keybind (run_command_23, handle_run_command, 22, 0, NULL, NULL)
keybind (run_command_24, handle_run_command, 23, 0, NULL, NULL)
keybind (run_command_25, handle_run_command, 24, 0, NULL, NULL)
keybind (run_command_26, handle_run_command, 25, 0, NULL, NULL)
keybind (run_command_27, handle_run_command, 26, 0, NULL, NULL)
keybind (run_command_28, handle_run_command, 27, 0, NULL, NULL)
keybind (run_command_29, handle_run_command, 28, 0, NULL, NULL)
keybind (run_command_30, handle_run_command, 29, 0, NULL, NULL)
keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL)
keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL)
keybind (run_command_screenshot, handle_run_command, 32, 0, "Print",
_("Take a screenshot"))
keybind (run_command_window_screenshot, handle_run_command, 33, 0,"<Alt>Print",
_("Take a screenshot of a window"))
keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal"))
/* No description because this is undocumented */
keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL)
#undef REVERSES_AND_REVERSED
/************************ PER WINDOW BINDINGS ************************/
/* These take a window as an extra parameter; they have no effect
* if no window is active.
*/
keybind (activate_window_menu, handle_activate_window_menu, 0,
BINDING_PER_WINDOW, "<Alt>space",
_("Activate the window menu"))
keybind (toggle_fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW,
NULL,
_("Toggle fullscreen mode"))
keybind (toggle_maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW, "<Alt>F10",
_("Toggle maximization state"))
keybind (toggle_above, handle_toggle_above, 0, BINDING_PER_WINDOW, NULL,
_("Toggle whether a window will always be visible over other windows"))
keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW, NULL,
_("Maximize window"))
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
_("Restore window"))
keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL,
_("Toggle shaded state"))
keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
_("Minimize window"))
keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
_("Close window"))
keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
_("Move window"))
keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "<Alt>F8",
_("Resize window"))
keybind (toggle_on_all_workspaces, handle_toggle_on_all_workspaces, 0,
BINDING_PER_WINDOW, NULL,
_("Toggle whether window is on all workspaces or just one"))
keybind (move_to_workspace_1, handle_move_to_workspace, 0, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 1"))
keybind (move_to_workspace_2, handle_move_to_workspace, 1, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 2"))
keybind (move_to_workspace_3, handle_move_to_workspace, 2, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 3"))
keybind (move_to_workspace_4, handle_move_to_workspace, 3, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 4"))
keybind (move_to_workspace_5, handle_move_to_workspace, 4, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 5"))
keybind (move_to_workspace_6, handle_move_to_workspace, 5, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 6"))
keybind (move_to_workspace_7, handle_move_to_workspace, 6, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 7"))
keybind (move_to_workspace_8, handle_move_to_workspace, 7, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 8"))
keybind (move_to_workspace_9, handle_move_to_workspace, 8, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 9"))
keybind (move_to_workspace_10, handle_move_to_workspace, 9, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 10"))
keybind (move_to_workspace_11, handle_move_to_workspace, 10, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 11"))
keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 12"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (move_to_workspace_left, handle_move_to_workspace,
META_MOTION_LEFT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Left",
_("Move window one workspace to the left"))
keybind (move_to_workspace_right, handle_move_to_workspace,
META_MOTION_RIGHT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Right",
_("Move window one workspace to the right"))
keybind (move_to_workspace_up, handle_move_to_workspace,
META_MOTION_UP, BINDING_PER_WINDOW, "<Control><Shift><Alt>Up",
_("Move window one workspace up"))
keybind (move_to_workspace_down, handle_move_to_workspace,
META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>Down",
_("Move window one workspace down"))
keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL,
_("Raise window if it's covered by another window, otherwise lower it"))
keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL,
_("Raise window above other windows"))
keybind (lower, handle_lower, 0, BINDING_PER_WINDOW, NULL,
_("Lower window below other windows"))
keybind (maximize_vertically, handle_maximize_vertically, 0,
BINDING_PER_WINDOW, NULL,
_("Maximize window vertically"))
keybind (maximize_horizontally, handle_maximize_horizontally, 0,
BINDING_PER_WINDOW, NULL,
_("Maximize window horizontally"))
keybind (move_to_corner_nw, handle_move_to_corner_nw, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north-west (top left) corner"))
keybind (move_to_corner_ne, handle_move_to_corner_ne, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north-east (top right) corner"))
keybind (move_to_corner_sw, handle_move_to_corner_sw, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south-west (bottom left) corner"))
keybind (move_to_corner_se, handle_move_to_corner_se, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south-east (bottom right) corner"))
keybind (move_to_side_n, handle_move_to_side_n, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north (top) side of screen"))
keybind (move_to_side_s, handle_move_to_side_s, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south (bottom) side of screen"))
keybind (move_to_side_e, handle_move_to_side_e, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to east (right) side of screen"))
keybind (move_to_side_w, handle_move_to_side_w, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to west (left) side of screen"))
keybind (move_to_center, handle_move_to_center, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to center of screen"))
/* eof all-keybindings.h */

View File

@ -130,7 +130,7 @@ bell_flash_screen (MetaDisplay *display,
XFreeGC (display->xdisplay, gc);
}
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK &&
!display->mouse_mode)
meta_display_increment_focus_sentinel (display);
XFlush (display->xdisplay);
@ -277,15 +277,12 @@ bell_visual_notify (MetaDisplay *display,
{
switch (meta_prefs_get_visual_bell_type ())
{
case META_VISUAL_BELL_FULLSCREEN_FLASH:
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
bell_flash_fullscreen (display, xkb_ev);
break;
case META_VISUAL_BELL_FRAME_FLASH:
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
bell_flash_frame (display, xkb_ev); /* does nothing yet */
break;
case META_VISUAL_BELL_INVALID:
/* do nothing */
break;
}
}
@ -294,7 +291,7 @@ meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something */
if (meta_prefs_get_visual_bell ())
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, xkb_ev);
#ifdef HAVE_LIBCANBERRA

View File

@ -439,9 +439,13 @@ setup_constraint_info (ConstraintInfo *info,
monitor_info->number);
/* Workaround braindead legacy apps that don't know how to
* fullscreen themselves properly.
* fullscreen themselves properly - don't get fooled by
* windows which hide their titlebar when maximized; that's
* not the same as fullscreen, even if there are no struts
* making the workarea smaller than the monitor.
*/
if (meta_prefs_get_force_fullscreen() &&
!window->hide_titlebar_when_maximized &&
meta_rectangle_equal (new, &monitor_info->rect) &&
window->has_fullscreen_func &&
!window->fullscreen)
@ -569,7 +573,7 @@ place_window_if_needed(MetaWindow *window,
META_MAXIMIZE_VERTICAL : 0), &info->current);
/* maximization may have changed frame geometry */
if (window->frame && !window->fullscreen)
if (!window->fullscreen)
meta_frame_calc_borders (window->frame, info->borders);
if (window->fullscreen_after_placement)

View File

@ -212,7 +212,7 @@ lower_window_and_transients (MetaWindow *window,
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ())
{
/* Move window to the back of the focusing workspace's MRU list.
@ -538,70 +538,70 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
break;
case META_MENU_OP_UNSTICK:
case META_MENU_OP_STICK:
name = "toggle_on_all_workspaces";
name = "toggle-on-all-workspaces";
break;
case META_MENU_OP_ABOVE:
case META_MENU_OP_UNABOVE:
name = "toggle_above";
name = "toggle-above";
break;
case META_MENU_OP_WORKSPACES:
switch (workspace)
{
case 1:
name = "move_to_workspace_1";
name = "move-to-workspace-1";
break;
case 2:
name = "move_to_workspace_2";
name = "move-to-workspace-2";
break;
case 3:
name = "move_to_workspace_3";
name = "move-to-workspace-3";
break;
case 4:
name = "move_to_workspace_4";
name = "move-to-workspace-4";
break;
case 5:
name = "move_to_workspace_5";
name = "move-to-workspace-5";
break;
case 6:
name = "move_to_workspace_6";
name = "move-to-workspace-6";
break;
case 7:
name = "move_to_workspace_7";
name = "move-to-workspace-7";
break;
case 8:
name = "move_to_workspace_8";
name = "move-to-workspace-8";
break;
case 9:
name = "move_to_workspace_9";
name = "move-to-workspace-9";
break;
case 10:
name = "move_to_workspace_10";
name = "move-to-workspace-10";
break;
case 11:
name = "move_to_workspace_11";
name = "move-to-workspace-11";
break;
case 12:
name = "move_to_workspace_12";
name = "move-to-workspace-12";
break;
}
break;
case META_MENU_OP_MOVE:
name = "begin_move";
name = "begin-move";
break;
case META_MENU_OP_RESIZE:
name = "begin_resize";
name = "begin-resize";
break;
case META_MENU_OP_MOVE_LEFT:
name = "move_to_workspace_left";
name = "move-to-workspace-left";
break;
case META_MENU_OP_MOVE_RIGHT:
name = "move_to_workspace_right";
name = "move-to-workspace-right";
break;
case META_MENU_OP_MOVE_UP:
name = "move_to_workspace_up";
name = "move-to-workspace-up";
break;
case META_MENU_OP_MOVE_DOWN:
name = "move_to_workspace_down";
name = "move-to-workspace-down";
break;
case META_MENU_OP_RECOVER:
/* No keybinding for this one */

View File

@ -51,6 +51,8 @@
#include <meta/compositor.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include "mutter-enum-types.h"
#ifdef HAVE_SOLARIS_XINERAMA
#include <X11/extensions/xinerama.h>
#endif
@ -135,6 +137,8 @@ enum
WINDOW_CREATED,
WINDOW_DEMANDS_ATTENTION,
WINDOW_MARKED_URGENT,
GRAB_OP_BEGIN,
GRAB_OP_END,
LAST_SIGNAL
};
@ -230,8 +234,7 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
display_signals[WINDOW_CREATED] =
@ -239,8 +242,7 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
display_signals[WINDOW_DEMANDS_ATTENTION] =
@ -248,8 +250,7 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
display_signals[WINDOW_MARKED_URGENT] =
@ -257,11 +258,32 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
display_signals[GRAB_OP_BEGIN] =
g_signal_new ("grab-op-begin",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 3,
META_TYPE_SCREEN,
META_TYPE_WINDOW,
META_TYPE_GRAB_OP);
display_signals[GRAB_OP_END] =
g_signal_new ("grab-op-end",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 3,
META_TYPE_SCREEN,
META_TYPE_WINDOW,
META_TYPE_GRAB_OP);
g_object_class_install_property (object_class,
PROP_FOCUS_WINDOW,
g_param_spec_object ("focus-window",
@ -1384,6 +1406,19 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display)
return timestamp;
}
/**
* meta_display_get_ignored_modifier_mask:
* @display: a #MetaDisplay
*
* Returns: a mask of modifiers that should be ignored
* when matching keybindings to events
*/
unsigned int
meta_display_get_ignored_modifier_mask (MetaDisplay *display)
{
return display->ignored_modifier_mask;
}
/**
* meta_display_add_ignored_crossing_serial:
* @display: a #MetaDisplay
@ -1921,7 +1956,7 @@ event_callback (XEvent *event,
* in application-based mode, and the different
* app is not a dock or desktop, eat the focus click.
*/
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
meta_prefs_get_application_based () &&
!window->has_focus &&
window->type != META_WINDOW_DOCK &&
@ -2009,8 +2044,8 @@ event_callback (XEvent *event,
{
switch (meta_prefs_get_focus_mode ())
{
case META_FOCUS_MODE_SLOPPY:
case META_FOCUS_MODE_MOUSE:
case G_DESKTOP_FOCUS_MODE_SLOPPY:
case G_DESKTOP_FOCUS_MODE_MOUSE:
display->mouse_mode = TRUE;
if (window->type != META_WINDOW_DOCK &&
window->type != META_WINDOW_DESKTOP)
@ -2048,7 +2083,7 @@ event_callback (XEvent *event,
* alternative mechanism works great.
*/
if (window->type == META_WINDOW_DESKTOP &&
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
display->expected_focus_window != NULL)
{
meta_topic (META_DEBUG_FOCUS,
@ -2060,7 +2095,7 @@ event_callback (XEvent *event,
event->xcrossing.time);
}
break;
case META_FOCUS_MODE_CLICK:
case G_DESKTOP_FOCUS_MODE_CLICK:
break;
}
@ -3706,6 +3741,9 @@ meta_display_begin_grab_op (MetaDisplay *display,
{
meta_window_refresh_resize_popup (display->grab_window);
}
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
screen, display->grab_window, display->grab_op);
return TRUE;
}
@ -3720,6 +3758,9 @@ meta_display_end_grab_op (MetaDisplay *display,
if (display->grab_op == META_GRAB_OP_NONE)
return;
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
display->grab_screen, display->grab_window, display->grab_op);
if (display->grab_window != NULL)
display->grab_window->shaken_loose = FALSE;
@ -4003,7 +4044,7 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
* focus window may not be raised, and who wants to think about
* mouse focus anyway.
*/
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
{
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
return;
@ -4464,7 +4505,8 @@ get_focussed_group (MetaDisplay *display)
#define IN_TAB_CHAIN(w,t) (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
|| ((t) == META_TAB_LIST_DOCKS && META_WINDOW_IN_DOCK_TAB_CHAIN (w)) \
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))))
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))) \
|| ((t) == META_TAB_LIST_NORMAL_ALL && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w)))
static MetaWindow*
find_tab_forward (MetaDisplay *display,
@ -4612,12 +4654,13 @@ meta_display_get_tab_list (MetaDisplay *display,
tab_list = g_list_reverse (tab_list);
{
GSList *tmp;
GSList *windows, *tmp;
MetaWindow *l_window;
tmp = meta_display_list_windows (display, META_LIST_DEFAULT);
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
/* Go through all windows */
tmp = windows;
while (tmp != NULL)
{
l_window=tmp->data;
@ -4633,6 +4676,8 @@ meta_display_get_tab_list (MetaDisplay *display,
tmp = tmp->next;
} /* End while tmp!=NULL */
g_slist_free (windows);
}
return tab_list;
@ -5029,12 +5074,21 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
winlist = meta_display_list_windows (display,
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
winlist = g_slist_sort (winlist, meta_display_stack_cmp);
g_slist_foreach (winlist, (GFunc)g_object_ref, NULL);
/* Unmanage all windows */
tmp = winlist;
while (tmp != NULL)
{
meta_window_unmanage (tmp->data, timestamp);
MetaWindow *window = tmp->data;
/* Check if already unmanaged for safety - in particular, catch
* the case where unmanaging a parent window can cause attached
* dialogs to be (temporarily) unmanaged.
*/
if (!window->unmanaging)
meta_window_unmanage (window, timestamp);
g_object_unref (window);
tmp = tmp->next;
}

View File

@ -322,9 +322,14 @@ void
meta_frame_calc_borders (MetaFrame *frame,
MetaFrameBorders *borders)
{
meta_ui_get_frame_borders (frame->window->screen->ui,
frame->xwindow,
borders);
/* Save on if statements and potential uninitialized values
* in callers -- if there's no frame, then zero the borders. */
if (frame == NULL)
meta_frame_borders_clear (borders);
else
meta_ui_get_frame_borders (frame->window->screen->ui,
frame->xwindow,
borders);
}
void

View File

@ -31,6 +31,26 @@
#include <meta/keybindings.h>
struct _MetaKeyHandler
{
char *name;
MetaKeyHandlerFunc func;
MetaKeyHandlerFunc default_func;
gint data, flags;
gpointer user_data;
GDestroyNotify user_data_free_func;
};
struct _MetaKeyBinding
{
const char *name;
KeySym keysym;
KeyCode keycode;
unsigned int mask;
MetaVirtualModifier modifiers;
MetaKeyHandler *handler;
};
void meta_display_init_keys (MetaDisplay *display);
void meta_display_shutdown_keys (MetaDisplay *display);
void meta_screen_grab_keys (MetaScreen *screen);
@ -52,6 +72,14 @@ void meta_set_keybindings_disabled (gboolean setting);
void meta_display_process_mapping_event (MetaDisplay *display,
XEvent *event);
gboolean meta_prefs_add_keybinding (const char *name,
const char *schema,
MetaKeyBindingAction action,
MetaKeyBindingFlags flags);
gboolean meta_prefs_remove_keybinding (const char *name);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -25,9 +25,7 @@
#include <meta/main.h>
#include <meta/util.h>
#ifdef HAVE_INTROSPECTION
#include "meta-plugin-manager.h"
#endif
#include <glib.h>

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,6 @@
#include "stack.h"
#include "xprops.h"
#include <meta/compositor.h>
#include "mutter-marshal.h"
#include "mutter-enum-types.h"
#ifdef HAVE_SOLARIS_XINERAMA
@ -162,8 +161,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, restacked),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
pspec = g_param_spec_int ("n-workspaces",
@ -177,8 +175,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__INT,
NULL, NULL, NULL,
G_TYPE_NONE,
1,
G_TYPE_INT);
@ -188,8 +185,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__INT,
NULL, NULL, NULL,
G_TYPE_NONE,
1,
G_TYPE_INT);
@ -199,21 +195,19 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_mutter_marshal_VOID__INT_INT_ENUM,
NULL, NULL, NULL,
G_TYPE_NONE,
3,
G_TYPE_INT,
G_TYPE_INT,
MUTTER_TYPE_MOTION_DIRECTION);
META_TYPE_MOTION_DIRECTION);
screen_signals[WINDOW_ENTERED_MONITOR] =
g_signal_new ("window-entered-monitor",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_mutter_marshal_VOID__INT_OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 2,
G_TYPE_INT,
META_TYPE_WINDOW);
@ -223,8 +217,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_mutter_marshal_VOID__INT_OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 2,
G_TYPE_INT,
META_TYPE_WINDOW);
@ -234,8 +227,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_POINTER);
screen_signals[TOGGLE_RECORDING] =
@ -243,8 +235,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
screen_signals[WORKAREAS_CHANGED] =
@ -252,8 +243,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
screen_signals[MONITORS_CHANGED] =
@ -261,8 +251,7 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
g_object_class_install_property (object_class,
@ -1184,9 +1173,11 @@ prefs_changed_callback (MetaPreference pref,
{
MetaScreen *screen = data;
if (pref == META_PREF_NUM_WORKSPACES)
if ((pref == META_PREF_NUM_WORKSPACES ||
pref == META_PREF_DYNAMIC_WORKSPACES) &&
!meta_prefs_get_dynamic_workspaces ())
{
/* GConf doesn't provide timestamps, but luckily update_num_workspaces
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
* often doesn't need it...
*/
guint32 timestamp =
@ -1494,12 +1485,14 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
new_num = g_list_length (screen->workspaces);
set_number_of_spaces_hint (screen, new_num);
meta_prefs_set_num_workspaces (new_num);
if (!meta_prefs_get_dynamic_workspaces ())
meta_prefs_set_num_workspaces (new_num);
/* If deleting a workspace before the current workspace, the active
* workspace index changes, so we need to update that hint */
if (active_index_changed)
meta_screen_set_active_workspace_hint (workspace->screen);
meta_screen_set_active_workspace_hint (screen);
l = next;
while (l)
@ -1549,7 +1542,9 @@ meta_screen_append_new_workspace (MetaScreen *screen, gboolean activate,
new_num = g_list_length (screen->workspaces);
set_number_of_spaces_hint (screen, new_num);
meta_prefs_set_num_workspaces (new_num);
if (!meta_prefs_get_dynamic_workspaces ())
meta_prefs_set_num_workspaces (new_num);
meta_screen_queue_workarea_recalc (screen);
@ -1565,7 +1560,7 @@ static void
update_num_workspaces (MetaScreen *screen,
guint32 timestamp)
{
int new_num;
int new_num, old_num;
GList *tmp;
int i;
GList *extras;
@ -1595,6 +1590,7 @@ update_num_workspaces (MetaScreen *screen,
++i;
tmp = tmp->next;
}
old_num = i;
g_assert (last_remaining);
@ -1629,22 +1625,22 @@ update_num_workspaces (MetaScreen *screen,
g_assert (w->windows == NULL);
meta_workspace_remove (w);
tmp = tmp->next;
}
g_list_free (extras);
while (i < new_num)
{
meta_workspace_new (screen);
++i;
}
for (i = old_num; i < new_num; i++)
meta_workspace_new (screen);
set_number_of_spaces_hint (screen, new_num);
meta_screen_queue_workarea_recalc (screen);
for (i = old_num; i < new_num; i++)
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
g_object_notify (G_OBJECT (screen), "n-workspaces");
}
@ -1935,7 +1931,6 @@ meta_screen_tile_preview_update_timeout (gpointer data)
{
MetaScreen *screen = data;
MetaWindow *window = screen->display->grab_window;
gboolean composited = screen->display->compositor != NULL;
gboolean needs_preview = FALSE;
screen->tile_preview_timeout_id = 0;
@ -1945,8 +1940,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
Window xwindow;
gulong create_serial;
screen->tile_preview = meta_tile_preview_new (screen->number,
composited);
screen->tile_preview = meta_tile_preview_new (screen->number);
xwindow = meta_tile_preview_get_xwindow (screen->tile_preview,
&create_serial);
meta_stack_tracker_record_add (screen->stack_tracker,
@ -2992,7 +2986,7 @@ meta_screen_resize (MetaScreen *screen,
g_free (old_monitor_infos);
g_slist_free (windows);
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0, index);
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0);
}
void

View File

@ -121,6 +121,7 @@ meta_stack_add (MetaStack *stack,
window->desc, window->stack_position);
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
void
@ -156,6 +157,7 @@ meta_stack_remove (MetaStack *stack,
GUINT_TO_POINTER (window->frame->xwindow));
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
void
@ -165,6 +167,7 @@ meta_stack_update_layer (MetaStack *stack,
stack->need_relayer = TRUE;
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
void
@ -174,26 +177,64 @@ meta_stack_update_transient (MetaStack *stack,
stack->need_constrain = TRUE;
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
/* raise/lower within a layer */
void
meta_stack_raise (MetaStack *stack,
MetaWindow *window)
{
meta_window_set_stack_position_no_sync (window,
stack->n_positions - 1);
{
GList *l;
int max_stack_position = window->stack_position;
MetaWorkspace *workspace;
stack_ensure_sorted (stack);
workspace = meta_window_get_workspace (window);
for (l = stack->sorted; l; l = l->next)
{
MetaWindow *w = (MetaWindow *) l->data;
if (meta_window_located_on_workspace (w, workspace) &&
w->stack_position > max_stack_position)
max_stack_position = w->stack_position;
}
if (max_stack_position == window->stack_position)
return;
meta_window_set_stack_position_no_sync (window, max_stack_position);
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
void
meta_stack_lower (MetaStack *stack,
MetaWindow *window)
{
meta_window_set_stack_position_no_sync (window, 0);
GList *l;
int min_stack_position = window->stack_position;
MetaWorkspace *workspace;
stack_ensure_sorted (stack);
workspace = meta_window_get_workspace (window);
for (l = stack->sorted; l; l = l->next)
{
MetaWindow *w = (MetaWindow *) l->data;
if (meta_window_located_on_workspace (w, workspace) &&
w->stack_position < min_stack_position)
min_stack_position = w->stack_position;
}
if (min_stack_position == window->stack_position)
return;
meta_window_set_stack_position_no_sync (window, min_stack_position);
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
}
void
@ -209,6 +250,27 @@ meta_stack_thaw (MetaStack *stack)
stack->freeze_count -= 1;
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, NULL);
}
void
meta_stack_update_window_tile_matches (MetaStack *stack,
MetaWorkspace *workspace)
{
GList *windows, *tmp;
if (stack->freeze_count > 0)
return;
windows = meta_stack_list_windows (stack, workspace);
tmp = windows;
while (tmp)
{
meta_window_compute_tile_match ((MetaWindow *) tmp->data);
tmp = tmp->next;
}
g_list_free (windows);
}
static gboolean
@ -1656,6 +1718,7 @@ meta_stack_set_positions (MetaStack *stack,
"Reset the stack positions of (nearly) all windows\n");
stack_sync_to_server (stack);
meta_stack_update_window_tile_matches (stack, NULL);
}
void
@ -1718,4 +1781,6 @@ meta_window_set_stack_position (MetaWindow *window,
{
meta_window_set_stack_position_no_sync (window, position);
stack_sync_to_server (window->screen->stack);
meta_stack_update_window_tile_matches (window->screen->stack,
window->screen->active_workspace);
}

View File

@ -383,4 +383,6 @@ GList* meta_stack_get_positions (MetaStack *stack);
void meta_stack_set_positions (MetaStack *stack,
GList *windows);
void meta_stack_update_window_tile_matches (MetaStack *stack,
MetaWorkspace *workspace);
#endif

View File

@ -916,11 +916,12 @@ meta_later_remove (guint later_id)
MetaLater *later = l->data;
if (later->id == later_id)
{
laters = g_slist_remove_link (laters, l);
laters = g_slist_delete_link (laters, l);
/* If this was a "repaint func" later, we just let the
* repaint func run and get removed
*/
destroy_later (later);
return;
}
}
}

View File

@ -97,10 +97,18 @@ struct _MetaWindow
char *role;
char *sm_client_id;
char *wm_client_machine;
char *startup_id;
char *mutter_hints;
char *gtk_theme_variant;
char *gtk_application_id;
char *gtk_unique_bus_name;
char *gtk_application_object_path;
char *gtk_window_object_path;
char *gtk_app_menu_object_path;
char *gtk_menubar_object_path;
int hide_titlebar_when_maximized;
int net_wm_pid;
Window xtransient_for;
@ -129,6 +137,9 @@ struct _MetaWindow
* this is the current mode. If not, it is the mode which will be
* requested after the window grab is released */
guint tile_mode : 2;
/* The last "full" maximized/unmaximized state. We need to keep track of
* that to toggle between normal/tiled or maximized/tiled states. */
guint saved_maximize : 1;
int tile_monitor_number;
/* Whether we're shaded */
@ -399,6 +410,9 @@ struct _MetaWindow
/* Focused window that is (directly or indirectly) attached to this one */
MetaWindow *attached_focus_window;
/* The currently complementary tiled window, if any */
MetaWindow *tile_match;
};
struct _MetaWindowClass
@ -650,5 +664,8 @@ void meta_window_propagate_focus_appearance (MetaWindow *window,
gboolean focused);
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
void meta_window_compute_tile_match (MetaWindow *window);
#endif

View File

@ -1578,20 +1578,70 @@ reload_gtk_theme_variant (MetaWindow *window,
requested_variant, window->desc);
}
if (g_strcmp0 (requested_variant, current_variant))
if (g_strcmp0 (requested_variant, current_variant) != 0)
{
g_free (current_variant);
if (requested_variant)
window->gtk_theme_variant = g_strdup (requested_variant);
else
window->gtk_theme_variant = NULL;
window->gtk_theme_variant = g_strdup (requested_variant);
if (window->frame)
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
}
}
static void
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
gboolean requested_value = FALSE;
gboolean current_value = window->hide_titlebar_when_maximized;
if (value->type != META_PROP_VALUE_INVALID)
{
requested_value = ((int) value->v.cardinal == 1);
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
}
if (requested_value == current_value)
return;
window->hide_titlebar_when_maximized = requested_value;
if (META_WINDOW_MAXIMIZED (window))
{
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
if (window->frame)
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
}
}
#define RELOAD_STRING(var_name, propname) \
static void \
reload_ ## var_name (MetaWindow *window, \
MetaPropValue *value, \
gboolean initial) \
{ \
g_free (window->var_name); \
\
if (value->type != META_PROP_VALUE_INVALID) \
window->var_name = g_strdup (value->v.str); \
else \
window->var_name = NULL; \
\
g_object_notify (G_OBJECT (window), propname); \
}
RELOAD_STRING (gtk_unique_bus_name, "gtk-unique-bus-name")
RELOAD_STRING (gtk_application_id, "gtk-application-id")
RELOAD_STRING (gtk_application_object_path, "gtk-application-object-path")
RELOAD_STRING (gtk_window_object_path, "gtk-window-object-path")
RELOAD_STRING (gtk_app_menu_object_path, "gtk-app-menu-object-path")
RELOAD_STRING (gtk_menubar_object_path, "gtk-menubar-object-path")
#undef RELOAD_STRING
/**
* Initialises the property hooks system. Each row in the table named "hooks"
* represents an action to take when a property is found on a newly-created
@ -1645,6 +1695,13 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
{ display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, TRUE, FALSE },
{ display->atom__GTK_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_gtk_application_id, TRUE, FALSE },
{ display->atom__GTK_UNIQUE_BUS_NAME, META_PROP_VALUE_UTF8, reload_gtk_unique_bus_name, TRUE, FALSE },
{ display->atom__GTK_APPLICATION_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_application_object_path, TRUE, FALSE },
{ display->atom__GTK_WINDOW_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_window_object_path, TRUE, FALSE },
{ display->atom__GTK_APP_MENU_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_app_menu_object_path, TRUE, FALSE },
{ display->atom__GTK_MENUBAR_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_menubar_object_path, TRUE, FALSE },
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },

View File

@ -48,6 +48,7 @@
#include <X11/Xatom.h>
#include <X11/Xlibint.h> /* For display->resource_mask */
#include <string.h>
#include <math.h>
#ifdef HAVE_SHAPE
#include <X11/extensions/shape.h>
@ -55,6 +56,12 @@
#include <X11/extensions/Xcomposite.h>
/* Windows that unmaximize to a size bigger than that fraction of the workarea
* will be scaled down to that size (while maintaining aspect ratio).
* Windows that cover an area greater then this size are automaximized on map.
*/
#define MAX_UNMAXIMIZED_WINDOW_AREA .8
static int destroying_windows_disallowed = 0;
@ -164,7 +171,13 @@ enum {
PROP_APPEARS_FOCUSED,
PROP_RESIZEABLE,
PROP_ABOVE,
PROP_WM_CLASS
PROP_WM_CLASS,
PROP_GTK_APPLICATION_ID,
PROP_GTK_UNIQUE_BUS_NAME,
PROP_GTK_APPLICATION_OBJECT_PATH,
PROP_GTK_WINDOW_OBJECT_PATH,
PROP_GTK_APP_MENU_OBJECT_PATH,
PROP_GTK_MENUBAR_OBJECT_PATH
};
enum
@ -179,6 +192,20 @@ enum
static guint window_signals[LAST_SIGNAL] = { 0 };
static void
prefs_changed_callback (MetaPreference pref,
gpointer data)
{
MetaWindow *window = data;
if (pref != META_PREF_WORKSPACES_ONLY_ON_PRIMARY)
return;
meta_window_update_on_all_workspaces (window);
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
}
static void
meta_window_finalize (GObject *object)
{
@ -205,6 +232,12 @@ meta_window_finalize (GObject *object)
g_free (window->icon_name);
g_free (window->desc);
g_free (window->gtk_theme_variant);
g_free (window->gtk_application_id);
g_free (window->gtk_unique_bus_name);
g_free (window->gtk_application_object_path);
g_free (window->gtk_window_object_path);
g_free (window->gtk_app_menu_object_path);
g_free (window->gtk_menubar_object_path);
}
static void
@ -268,6 +301,24 @@ meta_window_get_property(GObject *object,
case PROP_ABOVE:
g_value_set_boolean (value, win->wm_state_above);
break;
case PROP_GTK_APPLICATION_ID:
g_value_set_string (value, win->gtk_application_id);
break;
case PROP_GTK_UNIQUE_BUS_NAME:
g_value_set_string (value, win->gtk_unique_bus_name);
break;
case PROP_GTK_APPLICATION_OBJECT_PATH:
g_value_set_string (value, win->gtk_application_object_path);
break;
case PROP_GTK_WINDOW_OBJECT_PATH:
g_value_set_string (value, win->gtk_window_object_path);
break;
case PROP_GTK_APP_MENU_OBJECT_PATH:
g_value_set_string (value, win->gtk_app_menu_object_path);
break;
case PROP_GTK_MENUBAR_OBJECT_PATH:
g_value_set_string (value, win->gtk_menubar_object_path);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -365,7 +416,7 @@ meta_window_class_init (MetaWindowClass *klass)
g_param_spec_enum ("window-type",
"Window Type",
"The type of the window",
MUTTER_TYPE_WINDOW_TYPE,
META_TYPE_WINDOW_TYPE,
META_WINDOW_NORMAL,
G_PARAM_READABLE));
@ -434,13 +485,60 @@ meta_window_class_init (MetaWindowClass *klass)
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_APPLICATION_ID,
g_param_spec_string ("gtk-application-id",
"_GTK_APPLICATION_ID",
"Contents of the _GTK_APPLICATION_ID property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_UNIQUE_BUS_NAME,
g_param_spec_string ("gtk-unique-bus-name",
"_GTK_UNIQUE_BUS_NAME",
"Contents of the _GTK_UNIQUE_BUS_NAME property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_APPLICATION_OBJECT_PATH,
g_param_spec_string ("gtk-application-object-path",
"_GTK_APPLICATION_OBJECT_PATH",
"Contents of the _GTK_APPLICATION_OBJECT_PATH property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_WINDOW_OBJECT_PATH,
g_param_spec_string ("gtk-window-object-path",
"_GTK_WINDOW_OBJECT_PATH",
"Contents of the _GTK_WINDOW_OBJECT_PATH property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_APP_MENU_OBJECT_PATH,
g_param_spec_string ("gtk-app-menu-object-path",
"_GTK_APP_MENU_OBJECT_PATH",
"Contents of the _GTK_APP_MENU_OBJECT_PATH property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_GTK_MENUBAR_OBJECT_PATH,
g_param_spec_string ("gtk-menubar-object-path",
"_GTK_MENUBAR_OBJECT_PATH",
"Contents of the _GTK_MENUBAR_OBJECT_PATH property of this window",
NULL,
G_PARAM_READABLE));
window_signals[WORKSPACE_CHANGED] =
g_signal_new ("workspace-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, workspace_changed),
NULL, NULL,
g_cclosure_marshal_VOID__INT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
G_TYPE_INT);
@ -449,8 +547,7 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, focus),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
window_signals[RAISED] =
@ -458,8 +555,7 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, raised),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
window_signals[UNMANAGED] =
@ -467,14 +563,14 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static void
meta_window_init (MetaWindow *self)
{
meta_prefs_add_listener (prefs_changed_callback, self);
}
#ifdef WITH_VERBOSE_MODE
@ -1071,6 +1167,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->monitor = meta_screen_get_monitor_for_window (window->screen, window);
window->tile_match = NULL;
if (window->override_redirect)
{
window->decorated = FALSE;
@ -1804,6 +1902,8 @@ meta_window_unmanage (MetaWindow *window,
meta_error_trap_pop (window->display);
meta_prefs_remove_listener (prefs_changed_callback, window);
g_signal_emit (window, window_signals[UNMANAGED], 0);
g_object_unref (window);
@ -1897,7 +1997,7 @@ static void
set_net_wm_state (MetaWindow *window)
{
int i;
unsigned long data[12];
unsigned long data[13];
i = 0;
if (window->shaded)
@ -1960,6 +2060,11 @@ set_net_wm_state (MetaWindow *window)
data[i] = window->display->atom__NET_WM_STATE_STICKY;
++i;
}
if (meta_window_appears_focused (window))
{
data[i] = window->display->atom__NET_WM_STATE_FOCUSED;
++i;
}
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
@ -2272,7 +2377,7 @@ idle_calc_showing (gpointer data)
tmp = tmp->next;
}
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
{
/* When display->mouse_mode is false, we want to ignore
* EnterNotify events unless they come from mouse motion. To do
@ -2612,7 +2717,7 @@ window_state_on_map (MetaWindow *window,
* approximation to enforce so we do that.
*/
if (*takes_focus &&
meta_prefs_get_focus_new_windows () == META_FOCUS_NEW_WINDOWS_STRICT &&
meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
!window->display->allow_terminal_deactivation &&
__window_is_terminal (window->display->focus_window) &&
!meta_window_is_ancestor_of_transient (window->display->focus_window,
@ -2912,7 +3017,20 @@ meta_window_show (MetaWindow *window)
}
if (!window->placed)
meta_window_force_placement (window);
{
if (window->showing_for_first_time)
{
MetaRectangle work_area;
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
/* Automaximize windows that map with a size > MAX_UNMAXIMIZED_WINDOW_AREA of the work area */
if (window->rect.width * window->rect.height > work_area.width * work_area.height * MAX_UNMAXIMIZED_WINDOW_AREA)
{
window->maximize_horizontally_after_placement = TRUE;
window->maximize_vertically_after_placement = TRUE;
}
}
meta_window_force_placement (window);
}
if (needs_stacking_adjustment)
{
@ -2947,7 +3065,7 @@ meta_window_show (MetaWindow *window)
* that new window below a lot of other windows.
*/
if (overlap ||
(meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
(meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ()))
meta_window_stack_just_below (window, focus_window);
@ -3397,6 +3515,9 @@ meta_window_maximize_internal (MetaWindow *window,
else
meta_window_save_rect (window);
if (maximize_horizontally && maximize_vertically)
window->saved_maximize = TRUE;
window->maximized_horizontally =
window->maximized_horizontally || maximize_horizontally;
window->maximized_vertically =
@ -3559,6 +3680,10 @@ meta_window_tile (MetaWindow *window)
window,
&old_rect,
&new_rect);
if (window->frame)
meta_ui_queue_frame_draw (window->screen->ui,
window->frame->xwindow);
}
else
{
@ -3571,20 +3696,15 @@ meta_window_tile (MetaWindow *window)
static gboolean
meta_window_can_tile_maximized (MetaWindow *window)
{
if (!META_WINDOW_ALLOWS_RESIZE (window))
return FALSE;
if (!window->has_maximize_func)
return FALSE;
return TRUE;
return window->has_maximize_func;
}
static gboolean
gboolean
meta_window_can_tile_side_by_side (MetaWindow *window)
{
const MetaMonitorInfo *monitor;
MetaRectangle tile_area;
MetaFrameBorders borders;
if (!meta_window_can_tile_maximized (window))
return FALSE;
@ -3598,15 +3718,10 @@ meta_window_can_tile_side_by_side (MetaWindow *window)
tile_area.width /= 2;
if (window->frame)
{
MetaFrameBorders borders;
meta_frame_calc_borders (window->frame, &borders);
meta_frame_calc_borders (window->frame, &borders);
tile_area.width -= (borders.visible.left + borders.visible.right);
tile_area.height -= (borders.visible.top + borders.visible.bottom);
}
tile_area.width -= (borders.visible.left + borders.visible.right);
tile_area.height -= (borders.visible.top + borders.visible.bottom);
return tile_area.width >= window->size_hints.min_width &&
tile_area.height >= window->size_hints.min_height;
@ -3659,6 +3774,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
g_assert (unmaximize_horizontally || unmaximize_vertically);
if (unmaximize_horizontally && unmaximize_vertically)
window->saved_maximize = FALSE;
/* Only do something if the window isn't already maximized in the
* given direction(s).
*/
@ -3666,6 +3784,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
(unmaximize_vertically && window->maximized_vertically))
{
MetaRectangle target_rect;
MetaRectangle work_area;
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
meta_topic (META_DEBUG_WINDOW_OPS,
"Unmaximizing %s%s\n",
@ -3690,6 +3811,28 @@ meta_window_unmaximize_internal (MetaWindow *window,
* being unmaximized.
*/
meta_window_get_client_root_coords (window, &target_rect);
/* Avoid unmaximizing to "almost maximized" size when the previous size
* is greater then 80% of the work area use MAX_UNMAXIMIZED_WINDOW_AREA of the work area as upper limit
* while maintaining the aspect ratio.
*/
if (unmaximize_horizontally && unmaximize_vertically &&
desired_rect->width * desired_rect->height > work_area.width * work_area.height * MAX_UNMAXIMIZED_WINDOW_AREA)
{
if (desired_rect->width > desired_rect->height)
{
float aspect = (float)desired_rect->height / (float)desired_rect->width;
desired_rect->width = MAX (work_area.width * sqrt (MAX_UNMAXIMIZED_WINDOW_AREA), window->size_hints.min_width);
desired_rect->height = MAX (desired_rect->width * aspect, window->size_hints.min_height);
}
else
{
float aspect = (float)desired_rect->width / (float)desired_rect->height;
desired_rect->height = MAX (work_area.height * sqrt (MAX_UNMAXIMIZED_WINDOW_AREA), window->size_hints.min_height);
desired_rect->width = MAX (desired_rect->height * aspect, window->size_hints.min_width);
}
}
if (unmaximize_horizontally)
{
target_rect.x = desired_rect->x;
@ -4407,6 +4550,10 @@ meta_window_update_monitor (MetaWindow *window)
if (old)
g_signal_emit_by_name (window->screen, "window-left-monitor", old->number, window);
g_signal_emit_by_name (window->screen, "window-entered-monitor", window->monitor->number, window);
/* If we're changing monitors, we need to update the has_maximize_func flag,
* as the working area has changed. */
recalc_window_features (window);
}
}
@ -4499,9 +4646,8 @@ meta_window_move_resize_internal (MetaWindow *window,
is_user_action ? " (user move/resize)" : "",
old_rect.x, old_rect.y, old_rect.width, old_rect.height);
if (window->frame)
meta_frame_calc_borders (window->frame,
&borders);
meta_frame_calc_borders (window->frame,
&borders);
new_rect.x = root_x_nw;
new_rect.y = root_y_nw;
@ -4877,6 +5023,9 @@ meta_window_move_resize_internal (MetaWindow *window,
}
meta_window_foreach_transient (window, maybe_move_attached_dialog, NULL);
meta_stack_update_window_tile_matches (window->screen->stack,
window->screen->active_workspace);
}
/**
@ -4959,15 +5108,18 @@ meta_window_move_frame (MetaWindow *window,
{
int x = root_x_nw;
int y = root_y_nw;
MetaFrameBorders borders;
meta_frame_calc_borders (window->frame, &borders);
/* root_x_nw and root_y_nw correspond to where the top of
* the visible frame should be. Offset by the distance between
* the origin of the window and the origin of the enclosing
* window decorations.
*/
x += window->frame->child_x - borders.invisible.left;
y += window->frame->child_y - borders.invisible.top;
if (window->frame)
{
/* offset by the distance between the origin of the window
* and the origin of the enclosing window decorations
*/
x += window->frame->child_x;
y += window->frame->child_y;
}
meta_window_move (window, user_op, x, y);
}
@ -4996,6 +5148,40 @@ meta_window_move_between_rects (MetaWindow *window,
window->user_rect.height);
}
/**
* meta_window_move_resize_frame:
* @window: a #MetaWindow
* @user_op: bool to indicate whether or not this is a user operation
* @root_x_nw: new x
* @root_y_nw: new y
* @w: desired width
* @h: desired height
*
* Resizes the window so that its outer bounds (including frame)
* fit within the given rect
*/
void
meta_window_move_resize_frame (MetaWindow *window,
gboolean user_op,
int root_x_nw,
int root_y_nw,
int w,
int h)
{
MetaFrameBorders borders;
meta_frame_calc_borders (window->frame, &borders);
/* offset by the distance between the origin of the window
* and the origin of the enclosing window decorations ( + border)
*/
root_x_nw += borders.visible.left;
root_y_nw += borders.visible.top;
w -= borders.visible.left + borders.visible.right;
h -= borders.visible.top + borders.visible.bottom;
meta_window_move_resize (window, user_op, root_x_nw, root_y_nw, w, h);
}
/**
* meta_window_move_to_monitor:
* @window: a #MetaWindow
@ -5624,22 +5810,18 @@ meta_window_get_net_wm_desktop (MetaWindow *window)
static void
update_net_frame_extents (MetaWindow *window)
{
unsigned long data[4] = { 0, 0, 0, 0 };
unsigned long data[4];
MetaFrameBorders borders;
if (window->frame)
{
MetaFrameBorders borders;
meta_frame_calc_borders (window->frame, &borders);
/* Left */
data[0] = borders.visible.left;
/* Right */
data[1] = borders.visible.right;
/* Top */
data[2] = borders.visible.top;
/* Bottom */
data[3] = borders.visible.bottom;
}
meta_frame_calc_borders (window->frame, &borders);
/* Left */
data[0] = borders.visible.left;
/* Right */
data[1] = borders.visible.right;
/* Top */
data[2] = borders.visible.top;
/* Bottom */
data[3] = borders.visible.bottom;
meta_topic (META_DEBUG_GEOMETRY,
"Setting _NET_FRAME_EXTENTS on managed window 0x%lx "
@ -6594,6 +6776,17 @@ meta_window_client_message (MetaWindow *window,
return FALSE;
}
static void
meta_window_appears_focused_changed (MetaWindow *window)
{
set_net_wm_state (window);
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
/**
* meta_window_propagate_focus_appearance:
* @window: the window to start propagating from
@ -6639,9 +6832,7 @@ meta_window_propagate_focus_appearance (MetaWindow *window,
if (child_focus_state_changed && !parent->has_focus &&
parent != window->display->expected_focus_window)
{
g_object_notify (G_OBJECT (parent), "appears-focused");
if (parent->frame)
meta_frame_queue_draw (parent->frame);
meta_window_appears_focused_changed (parent);
}
child = parent;
@ -6787,7 +6978,7 @@ meta_window_notify_focus (MetaWindow *window,
*
* There is dicussion in bugs 102209, 115072, and 461577
*/
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click())
meta_display_ungrab_focus_window_button (window->display, window);
@ -6795,11 +6986,8 @@ meta_window_notify_focus (MetaWindow *window,
g_object_notify (G_OBJECT (window->display), "focus-window");
if (!window->attached_focus_window)
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_window_appears_focused_changed (window);
meta_window_propagate_focus_appearance (window, TRUE);
}
}
@ -6832,11 +7020,7 @@ meta_window_notify_focus (MetaWindow *window,
window->has_focus = FALSE;
if (!window->attached_focus_window)
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_window_appears_focused_changed (window);
meta_error_trap_push (window->display);
XUninstallColormap (window->display->xdisplay,
@ -6847,7 +7031,7 @@ meta_window_notify_focus (MetaWindow *window,
meta_window_update_layer (window);
/* Re-grab for click to focus and raise-on-click, if necessary */
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click ())
meta_display_grab_focus_window_button (window->display, window);
}
@ -7283,8 +7467,10 @@ meta_window_get_workspaces (MetaWindow *window)
{
if (window->on_all_workspaces)
return window->screen->workspaces;
else
else if (window->workspace != NULL)
return window->workspace->list_containing_self;
else
return NULL;
}
static void
@ -7824,6 +8010,23 @@ recalc_window_features (MetaWindow *window)
window->has_maximize_func = FALSE;
}
if (window->has_maximize_func)
{
MetaRectangle work_area;
MetaFrameBorders borders;
int min_frame_width, min_frame_height;
meta_window_get_work_area_current_monitor (window, &work_area);
meta_frame_calc_borders (window->frame, &borders);
min_frame_width = window->size_hints.min_width + borders.visible.left + borders.visible.right;
min_frame_height = window->size_hints.min_height + borders.visible.top + borders.visible.bottom;
if (min_frame_width >= work_area.width ||
min_frame_height >= work_area.height)
window->has_maximize_func = FALSE;
}
meta_topic (META_DEBUG_WINDOW_OPS,
"Window %s fullscreen = %d not resizable, maximizable = %d fullscreenable = %d min size %dx%d max size %dx%d\n",
window->desc,
@ -8432,9 +8635,16 @@ update_move (MetaWindow *window,
shake_threshold = meta_ui_get_drag_threshold (window->screen->ui) *
DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR;
if (meta_prefs_get_edge_tiling () &&
!META_WINDOW_MAXIMIZED (window) &&
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
if (snap)
{
/* We don't want to tile while snapping. Also, clear any previous tile
request. */
window->tile_mode = META_TILE_NONE;
window->tile_monitor_number = -1;
}
else if (meta_prefs_get_edge_tiling () &&
!META_WINDOW_MAXIMIZED (window) &&
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
{
const MetaMonitorInfo *monitor;
MetaRectangle work_area;
@ -9818,7 +10028,7 @@ meta_window_set_user_time (MetaWindow *window,
* doesn't want to have focus transferred for now due to new windows.
*/
if (meta_prefs_get_focus_new_windows () ==
META_FOCUS_NEW_WINDOWS_STRICT &&
G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
__window_is_terminal (window))
window->display->allow_terminal_deactivation = FALSE;
}
@ -10145,6 +10355,78 @@ meta_window_get_wm_class_instance (MetaWindow *window)
return window->res_name;
}
/**
* meta_window_get_gtk_application_id:
* @window: a #MetaWindow
*
* Return value: (transfer none): the application ID
**/
const char *
meta_window_get_gtk_application_id (MetaWindow *window)
{
return window->gtk_application_id;
}
/**
* meta_window_get_gtk_unique_bus_name:
* @window: a #MetaWindow
*
* Return value: (transfer none): the unique name
**/
const char *
meta_window_get_gtk_unique_bus_name (MetaWindow *window)
{
return window->gtk_unique_bus_name;
}
/**
* meta_window_get_gtk_application_object_path:
* @window: a #MetaWindow
*
* Return value: (transfer none): the object path
**/
const char *
meta_window_get_gtk_application_object_path (MetaWindow *window)
{
return window->gtk_application_object_path;
}
/**
* meta_window_get_gtk_window_object_path:
* @window: a #MetaWindow
*
* Return value: (transfer none): the object path
**/
const char *
meta_window_get_gtk_window_object_path (MetaWindow *window)
{
return window->gtk_window_object_path;
}
/**
* meta_window_get_gtk_app_menu_object_path:
* @window: a #MetaWindow
*
* Return value: (transfer none): the object path
**/
const char *
meta_window_get_gtk_app_menu_object_path (MetaWindow *window)
{
return window->gtk_app_menu_object_path;
}
/**
* meta_window_get_gtk_menubar_object_path:
* @window: a #MetaWindow
*
* Return value: (transfer none): the object path
**/
const char *
meta_window_get_gtk_menubar_object_path (MetaWindow *window)
{
return window->gtk_menubar_object_path;
}
/**
* meta_window_get_compositor_private:
* @window: a #MetaWindow
@ -10398,7 +10680,8 @@ meta_window_get_frame_type (MetaWindow *window)
/* can't add border if undecorated */
return META_FRAME_TYPE_LAST;
}
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
else if ((window->border_only && base_type != META_FRAME_TYPE_ATTACHED) ||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)))
{
/* override base frame type */
return META_FRAME_TYPE_BORDER;
@ -10445,3 +10728,99 @@ meta_window_is_attached_dialog (MetaWindow *window)
{
return window->attached;
}
/**
* meta_window_get_tile_match:
*
* Returns the matching tiled window on the same monitor as @window. This is
* the topmost tiled window in a complementary tile mode that is:
*
* - on the same monitor;
* - on the same workspace;
* - spanning the remaining monitor width;
* - there is no 3rd window stacked between both tiled windows that's
* partially visible in the common edge.
*
* Return value: (transfer none) (allow-none): the matching tiled window or
* %NULL if it doesn't exist.
*/
MetaWindow *
meta_window_get_tile_match (MetaWindow *window)
{
return window->tile_match;
}
void
meta_window_compute_tile_match (MetaWindow *window)
{
MetaWindow *match;
MetaStack *stack;
MetaTileMode match_tile_mode = META_TILE_NONE;
window->tile_match = NULL;
if (window->shaded || window->minimized)
return;
if (META_WINDOW_TILED_LEFT (window))
match_tile_mode = META_TILE_RIGHT;
else if (META_WINDOW_TILED_RIGHT (window))
match_tile_mode = META_TILE_LEFT;
else
return;
stack = window->screen->stack;
for (match = meta_stack_get_top (stack);
match;
match = meta_stack_get_below (stack, match, FALSE))
{
if (!match->shaded &&
!match->minimized &&
match->tile_mode == match_tile_mode &&
match->monitor == window->monitor &&
meta_window_get_workspace (match) == meta_window_get_workspace (window))
break;
}
if (match)
{
MetaWindow *above, *bottommost, *topmost;
MetaRectangle above_rect, bottommost_rect, topmost_rect;
if (meta_stack_windows_cmp (window->screen->stack, match, window) > 0)
{
topmost = match;
bottommost = window;
}
else
{
topmost = window;
bottommost = match;
}
meta_window_get_outer_rect (bottommost, &bottommost_rect);
meta_window_get_outer_rect (topmost, &topmost_rect);
/*
* If there's a window stacked in between which is partially visible
* behind the topmost tile we don't consider the tiles to match.
*/
for (above = meta_stack_get_above (stack, bottommost, FALSE);
above && above != topmost;
above = meta_stack_get_above (stack, above, FALSE))
{
if (above->minimized ||
above->monitor != window->monitor ||
meta_window_get_workspace (above) != meta_window_get_workspace (window))
continue;
meta_window_get_outer_rect (above, &above_rect);
if (meta_rectangle_overlap (&above_rect, &bottommost_rect) &&
meta_rectangle_overlap (&above_rect, &topmost_rect))
return;
}
window->tile_match = match;
}
}

View File

@ -42,6 +42,16 @@ struct _MetaWorkspace
MetaScreen *screen;
GList *windows;
/* The "MRU list", or "most recently used" list, is a list of
* MetaWindows ordered based on the time the the user interacted
* with the window most recently.
*
* For historical reasons, we keep an MRU list per workspace.
* It used to be used to calculate the default focused window,
* but isn't anymore, as the window next in the stacking order
* can sometimes be not the window the user interacted with last,
*/
GList *mru_list;
GList *list_containing_self;

View File

@ -46,7 +46,7 @@ enum {
};
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
static void focus_ancestor_or_mru_window (MetaWorkspace *workspace,
static void focus_ancestor_or_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,
guint32 timestamp);
static void free_this (gpointer candidate,
@ -121,16 +121,14 @@ meta_workspace_class_init (MetaWorkspaceClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
signals[WINDOW_REMOVED] = g_signal_new ("window-removed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
@ -1201,9 +1199,9 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
}
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!workspace->screen->display->mouse_mode)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
else
{
MetaWindow * window;
@ -1239,9 +1237,9 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
window);
}
}
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE)
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
{
meta_topic (META_DEBUG_FOCUS,
"Setting focus to no_focus_window, since no valid "
@ -1263,17 +1261,13 @@ record_ancestor (MetaWindow *window,
return FALSE; /* quit with the first ancestor we find */
}
/* Focus ancestor of not_this_one if there is one, otherwise focus the MRU
* window on active workspace
*/
/* Focus ancestor of not_this_one if there is one */
static void
focus_ancestor_or_mru_window (MetaWorkspace *workspace,
focus_ancestor_or_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,
guint32 timestamp)
{
MetaWindow *window = NULL;
MetaWindow *desktop_window = NULL;
GList *tmp;
if (not_this_one)
meta_topic (META_DEBUG_FOCUS,
@ -1300,43 +1294,16 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
meta_window_focus (ancestor, timestamp);
/* Also raise the window if in click-to-focus */
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
meta_window_raise (ancestor);
return;
}
}
/* No ancestor, look for the MRU window */
tmp = workspace->mru_list;
while (tmp)
{
MetaWindow* tmp_window;
tmp_window = ((MetaWindow*) tmp->data);
if (tmp_window != not_this_one &&
meta_window_showing_on_its_workspace (tmp_window) &&
tmp_window->type != META_WINDOW_DOCK &&
tmp_window->type != META_WINDOW_DESKTOP)
{
window = tmp->data;
break;
}
else if (tmp_window != not_this_one &&
desktop_window == NULL &&
meta_window_showing_on_its_workspace (tmp_window) &&
tmp_window->type == META_WINDOW_DESKTOP)
{
/* Found the most recently used desktop window */
desktop_window = tmp_window;
}
tmp = tmp->next;
}
/* If no window was found, default to the MRU desktop-window */
if (window == NULL)
window = desktop_window;
window = meta_stack_get_default_focus_window (workspace->screen->stack,
workspace,
NULL);
if (window)
{
@ -1346,7 +1313,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
meta_window_focus (window, timestamp);
/* Also raise the window if in click-to-focus */
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
meta_window_raise (window);
}
else

View File

@ -12,7 +12,7 @@ mutter_plugin_api_version=@MUTTER_PLUGIN_API_VERSION@
Name: libmutter
Description: Mutter window manager library
Requires: gtk+-3.0 @CLUTTER_PACKAGE@ x11
Requires: gsettings-desktop-schemas gtk+-3.0 @CLUTTER_PACKAGE@ x11
Version: @VERSION@
Libs: -L${libdir} -lmutter
Cflags: -I${includedir}/mutter -DMUTTER_MAJOR_VERSION=${mutter_major_version} -DMUTTER_MINOR_VERSION=${mutter_minor_version} -DMUTTER_MICRO_VERSION=${mutter_micro_version} -DMUTTER_PLUGIN_API_VERSION=${mutter_plugin_api_version}

View File

@ -59,6 +59,13 @@ item(_MUTTER_SET_KEYBINDINGS_MESSAGE)
item(_MUTTER_TOGGLE_VERBOSE)
item(_MUTTER_HINTS)
item(_GTK_THEME_VARIANT)
item(_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED)
item(_GTK_APPLICATION_ID)
item(_GTK_UNIQUE_BUS_NAME)
item(_GTK_APPLICATION_OBJECT_PATH)
item(_GTK_WINDOW_OBJECT_PATH)
item(_GTK_APP_MENU_OBJECT_PATH)
item(_GTK_MENUBAR_OBJECT_PATH)
item(_GNOME_WM_KEYBINDINGS)
item(_GNOME_PANEL_ACTION)
item(_GNOME_PANEL_ACTION_MAIN_MENU)
@ -164,6 +171,7 @@ item(_NET_WM_ACTION_ABOVE)
item(_NET_WM_ACTION_BELOW)
item(_NET_WM_STATE_STICKY)
item(_NET_WM_FULLSCREEN_MONITORS)
item(_NET_WM_STATE_FOCUSED)
#if 0
/* We apparently never use: */

View File

@ -1,6 +1,9 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Mutter common types shared by core.h and ui.h */
/* Mutter common types shared by core.h and ui.h
*
* PLEASE KEEP IN SYNC WITH GSETTINGS SCHEMAS!
*/
/*
* Copyright (C) 2001 Havoc Pennington
@ -164,32 +167,6 @@ typedef enum
} MetaCursor;
typedef enum
{
META_FOCUS_MODE_CLICK,
META_FOCUS_MODE_SLOPPY,
META_FOCUS_MODE_MOUSE
} MetaFocusMode;
typedef enum
{
META_FOCUS_NEW_WINDOWS_SMART,
META_FOCUS_NEW_WINDOWS_STRICT
} MetaFocusNewWindows;
typedef enum
{
META_ACTION_TITLEBAR_TOGGLE_SHADE,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY,
META_ACTION_TITLEBAR_MINIMIZE,
META_ACTION_TITLEBAR_NONE,
META_ACTION_TITLEBAR_LOWER,
META_ACTION_TITLEBAR_MENU,
META_ACTION_TITLEBAR_LAST
} MetaActionTitlebar;
typedef enum
{
META_FRAME_TYPE_NORMAL,
@ -374,10 +351,8 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
/* G_PRIORITY_DEFAULT_IDLE:
* Mutter plugin unloading
* GConf notify idle
*/
/* Chosen to be below the GConf notify idle */
#define META_PRIORITY_PREFS_NOTIFY (G_PRIORITY_DEFAULT_IDLE + 10)
/************************************************************/

View File

@ -27,6 +27,7 @@
#include <clutter/clutter.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
#include <meta/types.h>
#include <meta/compositor.h>
@ -43,5 +44,8 @@ void meta_disable_unredirect_for_screen (MetaScreen *screen);
void meta_enable_unredirect_for_screen (MetaScreen *screen);
ClutterActor *meta_get_background_actor_for_screen (MetaScreen *screen);
void meta_set_stage_input_region (MetaScreen *screen,
XserverRegion region);
void meta_empty_stage_input_region (MetaScreen *screen);
#endif

View File

@ -33,7 +33,8 @@ typedef enum
{
META_TAB_LIST_NORMAL,
META_TAB_LIST_DOCKS,
META_TAB_LIST_GROUP
META_TAB_LIST_GROUP,
META_TAB_LIST_NORMAL_ALL
} MetaTabList;
typedef enum
@ -91,6 +92,8 @@ guint32 meta_display_get_last_user_time (MetaDisplay *display);
guint32 meta_display_get_current_time (MetaDisplay *display);
guint32 meta_display_get_current_time_roundtrip (MetaDisplay *display);
unsigned int meta_display_get_ignored_modifier_mask (MetaDisplay *display);
GList* meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
@ -124,6 +127,16 @@ void meta_display_end_grab_op (MetaDisplay *display,
MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
gboolean meta_display_add_keybinding (MetaDisplay *display,
const char *name,
const char *schema,
MetaKeyBindingFlags flags,
MetaKeyHandlerFunc handler,
gpointer user_data,
GDestroyNotify free_data);
gboolean meta_display_remove_keybinding (MetaDisplay *display,
const char *name);
MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay *display,
unsigned int keycode,
unsigned long mask);

View File

@ -23,37 +23,11 @@
#include <meta/display.h>
#include <meta/common.h>
/**
* MetaKeyHandlerFunc: (skip)
*
*/
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef struct
{
const char *name;
MetaKeyHandlerFunc func;
MetaKeyHandlerFunc default_func;
gint data, flags;
gpointer user_data;
GDestroyNotify user_data_free_func;
} MetaKeyHandler;
struct _MetaKeyBinding
{
const char *name;
KeySym keysym;
KeyCode keycode;
unsigned int mask;
MetaVirtualModifier modifiers;
MetaKeyHandler *handler;
};
#define META_TYPE_KEY_BINDING (meta_key_binding_get_type ())
const char *meta_key_binding_get_name (MetaKeyBinding *binding);
MetaVirtualModifier meta_key_binding_get_modifiers (MetaKeyBinding *binding);
guint meta_key_binding_get_mask (MetaKeyBinding *binding);
gboolean meta_keybindings_set_custom_handler (const gchar *name,
MetaKeyHandlerFunc handler,

View File

@ -246,35 +246,6 @@ void
meta_plugin_destroy_completed (MetaPlugin *plugin,
MetaWindowActor *actor);
ClutterActor *
meta_plugin_get_overlay_group (MetaPlugin *plugin);
ClutterActor *
meta_plugin_get_window_group (MetaPlugin *plugin);
ClutterActor *
meta_plugin_get_background_actor (MetaPlugin *plugin);
ClutterActor *
meta_plugin_get_stage (MetaPlugin *plugin);
void
meta_plugin_query_screen_size (MetaPlugin *plugin,
int *width,
int *height);
void
meta_plugin_set_stage_reactive (MetaPlugin *plugin,
gboolean reactive);
void
meta_plugin_set_stage_input_area (MetaPlugin *plugin,
gint x, gint y, gint width, gint height);
void
meta_plugin_set_stage_input_region (MetaPlugin *plugin,
XserverRegion region);
/**
* MetaModalOptions:
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
@ -300,8 +271,6 @@ void
meta_plugin_end_modal (MetaPlugin *plugin,
guint32 timestamp);
GList * meta_plugin_get_window_actors (MetaPlugin *plugin);
Display * meta_plugin_get_xdisplay (MetaPlugin *plugin);
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
void

View File

@ -26,10 +26,8 @@
#ifndef __META_SHAPED_TEXTURE_H__
#define __META_SHAPED_TEXTURE_H__
#include <config.h>
#include <clutter/clutter.h>
#include <clutter/x11/clutter-x11.h>
#include <X11/Xlib.h>
G_BEGIN_DECLS
@ -46,12 +44,12 @@ typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
struct _MetaShapedTextureClass
{
ClutterX11TexturePixmapClass parent_class;
ClutterActorClass parent_class;
};
struct _MetaShapedTexture
{
ClutterX11TexturePixmap parent;
ClutterActor parent;
MetaShapedTexturePrivate *priv;
};
@ -63,13 +61,20 @@ ClutterActor *meta_shaped_texture_new (void);
void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
gboolean create_mipmaps);
void meta_shaped_texture_clear (MetaShapedTexture *stex);
void meta_shaped_texture_update_area (MetaShapedTexture *stex,
int x,
int y,
int width,
int height);
void meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
Pixmap pixmap);
CoglHandle meta_shaped_texture_get_texture (MetaShapedTexture *stex);
void meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
cairo_region_t *region);
cairo_region_t *meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex);
void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
cairo_region_t *overlay_region,
cairo_path_t *overlay_path);
@ -78,6 +83,9 @@ void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
void meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
cairo_region_t *clip_region);
cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture *stex,
cairo_rectangle_int_t *clip);
G_END_DECLS
#endif /* __META_SHAPED_TEXTURE_H__ */

View File

@ -27,8 +27,11 @@
/* This header is a "common" one between the UI and core side */
#include <meta/common.h>
#include <meta/types.h>
#include <pango/pango-font.h>
#include <gdesktop-enums.h>
/* Keep in sync with GSettings schemas! */
typedef enum
{
META_PREF_MOUSE_BUTTON_MODS,
@ -44,11 +47,10 @@ typedef enum
META_PREF_THEME,
META_PREF_TITLEBAR_FONT,
META_PREF_NUM_WORKSPACES,
META_PREF_DYNAMIC_WORKSPACES,
META_PREF_APPLICATION_BASED,
META_PREF_KEYBINDINGS,
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS,
META_PREF_TERMINAL_COMMAND,
META_PREF_BUTTON_LAYOUT,
META_PREF_WORKSPACE_NAMES,
META_PREF_VISUAL_BELL,
@ -77,22 +79,23 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
void meta_prefs_init (void);
void meta_prefs_override_preference_location (const char *original_key,
const char *new_key);
void meta_prefs_override_preference_schema (const char *key,
const char *schema);
const char* meta_preference_to_string (MetaPreference pref);
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);
guint meta_prefs_get_mouse_button_resize (void);
guint meta_prefs_get_mouse_button_menu (void);
MetaFocusMode meta_prefs_get_focus_mode (void);
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void);
GDesktopFocusMode meta_prefs_get_focus_mode (void);
GDesktopFocusNewWindows meta_prefs_get_focus_new_windows (void);
gboolean meta_prefs_get_attach_modal_dialogs (void);
gboolean meta_prefs_get_raise_on_click (void);
const char* meta_prefs_get_theme (void);
/* returns NULL if GTK default should be used */
const PangoFontDescription* meta_prefs_get_titlebar_font (void);
int meta_prefs_get_num_workspaces (void);
gboolean meta_prefs_get_dynamic_workspaces (void);
gboolean meta_prefs_get_application_based (void);
gboolean meta_prefs_get_disable_workarounds (void);
gboolean meta_prefs_get_auto_raise (void);
@ -101,19 +104,18 @@ gboolean meta_prefs_get_gnome_accessibility (void);
gboolean meta_prefs_get_gnome_animations (void);
gboolean meta_prefs_get_edge_tiling (void);
const char* meta_prefs_get_command (int i);
const char* meta_prefs_get_screenshot_command (void);
char* meta_prefs_get_gconf_key_for_command (int i);
const char* meta_prefs_get_window_screenshot_command (void);
const char* meta_prefs_get_terminal_command (void);
const char* meta_prefs_get_gconf_key_for_terminal_command (void);
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
/* Double, right, middle click can be configured to any titlebar meta-action */
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
GDesktopTitlebarAction meta_prefs_get_action_double_click_titlebar (void);
GDesktopTitlebarAction meta_prefs_get_action_middle_click_titlebar (void);
GDesktopTitlebarAction meta_prefs_get_action_right_click_titlebar (void);
void meta_prefs_set_num_workspaces (int n_workspaces);
@ -187,45 +189,12 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
META_KEYBINDING_ACTION_TOGGLE_RECORDING,
META_KEYBINDING_ACTION_COMMAND_1,
META_KEYBINDING_ACTION_COMMAND_2,
META_KEYBINDING_ACTION_COMMAND_3,
META_KEYBINDING_ACTION_COMMAND_4,
META_KEYBINDING_ACTION_COMMAND_5,
META_KEYBINDING_ACTION_COMMAND_6,
META_KEYBINDING_ACTION_COMMAND_7,
META_KEYBINDING_ACTION_COMMAND_8,
META_KEYBINDING_ACTION_COMMAND_9,
META_KEYBINDING_ACTION_COMMAND_10,
META_KEYBINDING_ACTION_COMMAND_11,
META_KEYBINDING_ACTION_COMMAND_12,
META_KEYBINDING_ACTION_COMMAND_13,
META_KEYBINDING_ACTION_COMMAND_14,
META_KEYBINDING_ACTION_COMMAND_15,
META_KEYBINDING_ACTION_COMMAND_16,
META_KEYBINDING_ACTION_COMMAND_17,
META_KEYBINDING_ACTION_COMMAND_18,
META_KEYBINDING_ACTION_COMMAND_19,
META_KEYBINDING_ACTION_COMMAND_20,
META_KEYBINDING_ACTION_COMMAND_21,
META_KEYBINDING_ACTION_COMMAND_22,
META_KEYBINDING_ACTION_COMMAND_23,
META_KEYBINDING_ACTION_COMMAND_24,
META_KEYBINDING_ACTION_COMMAND_25,
META_KEYBINDING_ACTION_COMMAND_26,
META_KEYBINDING_ACTION_COMMAND_27,
META_KEYBINDING_ACTION_COMMAND_28,
META_KEYBINDING_ACTION_COMMAND_29,
META_KEYBINDING_ACTION_COMMAND_30,
META_KEYBINDING_ACTION_COMMAND_31,
META_KEYBINDING_ACTION_COMMAND_32,
META_KEYBINDING_ACTION_COMMAND_SCREENSHOT,
META_KEYBINDING_ACTION_COMMAND_WINDOW_SCREENSHOT,
META_KEYBINDING_ACTION_COMMAND_TERMINAL,
META_KEYBINDING_ACTION_SET_SPEW_MARK,
META_KEYBINDING_ACTION_ACTIVATE_WINDOW_MENU,
META_KEYBINDING_ACTION_TOGGLE_FULLSCREEN,
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
META_KEYBINDING_ACTION_TOGGLE_ABOVE,
META_KEYBINDING_ACTION_MAXIMIZE,
META_KEYBINDING_ACTION_UNMAXIMIZE,
@ -269,6 +238,15 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_LAST
} MetaKeyBindingAction;
typedef enum
{
META_KEY_BINDING_NONE,
META_KEY_BINDING_PER_WINDOW = 1 << 0,
META_KEY_BINDING_BUILTIN = 1 << 1,
META_KEY_BINDING_REVERSES = 1 << 2,
META_KEY_BINDING_IS_REVERSED = 1 << 3
} MetaKeyBindingFlags;
typedef struct
{
unsigned int keysym;
@ -276,16 +254,31 @@ typedef struct
MetaVirtualModifier modifiers;
} MetaKeyCombo;
/**
* MetaKeyHandlerFunc:
* @event: (type gpointer):
*
*/
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef struct _MetaKeyHandler MetaKeyHandler;
typedef struct
{
const char *name;
const char *default_keybinding;
char *name;
char *schema;
MetaKeyBindingAction action;
/**
* A list of MetaKeyCombos. Each of them is bound to
* this keypref. If one has keysym==modifiers==0, it is
* ignored. For historical reasons, the first entry is
* governed by the pref FOO and the remainder are
* governed by the pref FOO_list.
* ignored.
*/
GSList *bindings;
@ -294,10 +287,14 @@ typedef struct
/** for keybindings that apply only to a window */
gboolean per_window:1;
/** for keybindings not added with meta_display_add_keybinding() */
gboolean builtin:1;
} MetaKeyPref;
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
int *n_bindings);
GType meta_key_binding_get_type (void);
GList *meta_prefs_get_keybindings (void);
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
@ -307,17 +304,9 @@ void meta_prefs_get_window_binding (const char *name,
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
typedef enum
{
META_VISUAL_BELL_INVALID = 0,
META_VISUAL_BELL_FULLSCREEN_FLASH,
META_VISUAL_BELL_FRAME_FLASH
} MetaVisualBellType;
gboolean meta_prefs_get_visual_bell (void);
gboolean meta_prefs_bell_is_audible (void);
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
#endif

View File

@ -95,8 +95,16 @@ const char * meta_window_get_wm_class (MetaWindow *window);
const char * meta_window_get_wm_class_instance (MetaWindow *window);
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
const char * meta_window_get_gtk_application_id (MetaWindow *window);
const char * meta_window_get_gtk_unique_bus_name (MetaWindow *window);
const char * meta_window_get_gtk_application_object_path (MetaWindow *window);
const char * meta_window_get_gtk_window_object_path (MetaWindow *window);
const char * meta_window_get_gtk_app_menu_object_path (MetaWindow *window);
const char * meta_window_get_gtk_menubar_object_path (MetaWindow *window);
void meta_window_move(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
void meta_window_move_frame(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
void meta_window_move_resize_frame (MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw, int w, int h);
void meta_window_move_to_monitor (MetaWindow *window, int monitor);
void meta_window_resize(MetaWindow *window, gboolean user_op, int w, int h);
@ -161,4 +169,6 @@ MetaFrameType meta_window_get_frame_type (MetaWindow *window);
cairo_region_t *meta_window_get_frame_bounds (MetaWindow *window);
MetaWindow *meta_window_get_tile_match (MetaWindow *window);
#endif

View File

@ -20,7 +20,7 @@ G_END_DECLS
/*** BEGIN value-header ***/
GType @enum_name@_get_type (void) G_GNUC_CONST;
#define MUTTER_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
#define META_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
/*** END value-header ***/

View File

@ -1,2 +0,0 @@
VOID:INT,INT,ENUM
VOID:INT,OBJECT

View File

@ -0,0 +1,6 @@
[org.gnome.mutter]
overlay-key = /apps/mutter/general/overlay_key
attach-modal-dialogs = /apps/mutter/general/attach_modal_dialogs
live-hidden-windows = /apps/mutter/general/live_hidden_windows
workspaces-only-on-primary = /apps/mutter/general/workspaces_only_on_primary
draggable-border-width = /apps/mutter/general/draggable_border_width

View File

@ -1,89 +0,0 @@
<gconfschemafile>
<schemalist>
<!-- General preferences -->
<schema>
<key>/schemas/apps/mutter/general/overlay_key</key>
<applyto>/apps/mutter/general/overlay_key</applyto>
<owner>mutter</owner>
<type>string</type>
<default>Super_L</default>
<locale name="C">
<short>Modifier to use for extended window management operations</short>
<long>
This key will initiate the "overlay", which is a combination window
overview and application launching system. The default is intended
to be the "Windows key" on PC hardware.
It's expected that this binding either the default or set to
the empty string.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/attach_modal_dialogs</key>
<applyto>/apps/mutter/general/attach_modal_dialogs</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Attach modal dialogs</short>
<long>
When true, instead
of having independent titlebars, modal dialogs appear attached to the titlebar
of the parent window and are moved together with the parent window.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/live_hidden_windows</key>
<applyto>/apps/mutter/general/live_hidden_windows</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Live Hidden Windows</short>
<long>
Determines whether hidden windows (i.e., minimized windows and
windows on other workspaces than the current one) should be kept
alive.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/workspaces_only_on_primary</key>
<applyto>/apps/mutter/general/workspaces_only_on_primary</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Workspaces only on primary</short>
<long>
Determines whether workspace switching should happen for windows
on all monitors or only for windows on the primary monitor.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/draggable_border_width</key>
<applyto>/apps/mutter/general/draggable_border_width</applyto>
<owner>mutter</owner>
<type>int</type>
<default>10</default>
<locale name="C">
<short>Draggable border width</short>
<long>
The amount of total draggable borders. If the theme's visible
borders are not enough, invisible borders will be added to meet
this value.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>

View File

@ -0,0 +1,115 @@
<schemalist>
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
gettext-domain="@GETTEXT_DOMAIN">
<key name="overlay-key" type="s">
<default>'Super_L'</default>
<_summary>Modifier to use for extended window management operations</_summary>
<_description>
This key will initiate the "overlay", which is a combination window
overview and application launching system. The default is intended
to be the "Windows key" on PC hardware.
It's expected that this binding either the default or set to
the empty string.
</_description>
</key>
<key name="attach-modal-dialogs" type="b">
<default>false</default>
<_summary>Attach modal dialogs</_summary>
<_description>
When true, instead of having independent titlebars, modal dialogs
appear attached to the titlebar of the parent window and are moved
together with the parent window.
</_description>
</key>
<key name="live-hidden-windows" type="b">
<default>false</default>
<_summary>Live Hidden Windows</_summary>
<_description>
Determines whether hidden windows (i.e., minimized windows and
windows on other workspaces than the current one) should be kept
alive.
</_description>
</key>
<key name="edge-tiling" type="b">
<default>false</default>
<_summary>Enable edge tiling when dropping windows on screen edges</_summary>
<_description>
If enabled, dropping windows on vertical screen edges maximizes them
vertically and resizes them horizontally to cover half of the available
area. Dropping windows on the top screen edge maximizes them completely.
</_description>
</key>
<key name="dynamic-workspaces" type="b">
<default>false</default>
<_summary>Workspaces are managed dynamically</_summary>
<_description>
Determines whether workspaces are managed dynamically or
whether there's a static number of workspaces (determined
by the num-workspaces key in org.gnome.desktop.wm.preferences).
</_description>
</key>
<key name="workspaces-only-on-primary" type="b">
<default>false</default>
<_summary>Workspaces only on primary</_summary>
<_description>
Determines whether workspace switching should happen for windows
on all monitors or only for windows on the primary monitor.
</_description>
</key>
<key name="no-tab-popup" type="b">
<default>false</default>
<_summary>No tab popup</_summary>
<_description>
Determines whether the use of popup and highlight frame should
be disabled for window cycling.
</_description>
</key>
<key name="draggable-border-width" type="i">
<default>10</default>
<range min="0" max="64"/>
<_summary>Draggable border width</_summary>
<_description>
The amount of total draggable borders. If the theme's visible
borders are not enough, invisible borders will be added to meet
this value.
</_description>
</key>
<child name="keybindings" schema="org.gnome.mutter.keybindings"/>
</schema>
<schema id="org.gnome.mutter.keybindings" path="/org/gnome/mutter/keybindings/">
<key name="toggle-recording" type="as">
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
</key>
<key name="toggle-tiled-left" type="as">
<default><![CDATA[['<Super>Left']]]></default>
</key>
<key name="toggle-tiled-right" type="as">
<default><![CDATA[['<Super>Right']]]></default>
</key>
<key name="tab-popup-select" type="as">
<default>[]</default>
<_summary>Select window from tab popup</_summary>
</key>
<key name="tab-popup-cancel" type="as">
<default>[]</default>
<_summary>Cancel tab popup</_summary>
</key>
</schema>
</schemalist>

View File

@ -148,8 +148,15 @@ grab_area_at_mouse (GtkWidget *invisible,
static void
shutdown_grab (void)
{
gdk_keyboard_ungrab (gtk_get_current_event_time ());
gdk_pointer_ungrab (gtk_get_current_event_time ());
GdkDeviceManager *manager;
GdkDevice *device;
manager = gdk_display_get_device_manager (gdk_display_get_default ());
device = gdk_device_manager_get_client_pointer (manager);
gdk_device_ungrab (device, gtk_get_current_event_time ());
gdk_device_ungrab (gdk_device_get_associated_device (device),
gtk_get_current_event_time ());
gtk_grab_remove (grab_widget);
}
@ -197,6 +204,8 @@ key_press (GtkWidget *invisible,
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
gtk_main_quit ();
return TRUE;
}
@ -227,6 +236,8 @@ static void
begin_area_grab (void)
{
GdkWindow *window;
GdkDeviceManager *manager;
GdkDevice *device;
if (grab_widget == NULL)
{
@ -239,24 +250,31 @@ begin_area_grab (void)
}
window = gtk_widget_get_window (grab_widget);
manager = gdk_display_get_device_manager (gdk_display_get_default ());
device = gdk_device_manager_get_client_pointer (manager);
if (gdk_keyboard_grab (window,
FALSE,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
if (gdk_device_grab (device,
window,
GDK_OWNERSHIP_NONE,
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
{
g_warning ("Failed to grab keyboard to do eyedropper");
g_warning ("Failed to grab pointer to do eyedropper");
return;
}
if (gdk_pointer_grab (window,
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
NULL,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
if (gdk_device_grab (gdk_device_get_associated_device (device),
window,
GDK_OWNERSHIP_NONE,
FALSE,
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
{
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
g_warning ("Failed to grab pointer to do eyedropper");
gdk_device_ungrab (device, gtk_get_current_event_time ());
g_warning ("Failed to grab keyboard to do eyedropper");
return;
}

View File

@ -353,7 +353,7 @@ utility_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -386,7 +386,7 @@ toolbar_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -410,7 +410,7 @@ menu_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -431,7 +431,7 @@ override_redirect_cb (GtkAction *action,
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_title (GTK_WINDOW (window), "Override Redirect");
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -455,7 +455,7 @@ border_only_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -477,7 +477,7 @@ changing_icon_cb (GtkAction *action,
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Changing Icon");
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@ -545,7 +545,7 @@ splashscreen_cb (GtkAction *action,
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_SPLASHSCREEN");
gtk_window_set_title (GTK_WINDOW (window), "Splashscreen");
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
@ -581,11 +581,11 @@ make_dock (int type)
{
case DOCK_LEFT:
case DOCK_RIGHT:
box = gtk_vbox_new (FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
break;
case DOCK_TOP:
case DOCK_BOTTOM:
box = gtk_hbox_new (FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
break;
case DOCK_ALL:
break;
@ -909,8 +909,7 @@ static GtkWidget *
do_appwindow (void)
{
GtkWidget *window;
GtkWidget *table;
GtkWidget *handlebox;
GtkWidget *grid;
GtkWidget *statusbar;
GtkWidget *contents;
GtkWidget *sw;
@ -931,9 +930,12 @@ do_appwindow (void)
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (destroy_cb), NULL);
table = gtk_table_new (1, 4, FALSE);
gtk_container_add (GTK_CONTAINER (window), table);
grid = gtk_grid_new ();
gtk_widget_set_vexpand (grid, TRUE);
gtk_widget_set_hexpand (grid, TRUE);
gtk_container_add (GTK_CONTAINER (window), grid);
/* Create the menubar
*/
@ -958,12 +960,12 @@ do_appwindow (void)
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
gtk_table_attach (GTK_TABLE (table),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
0, 0, 1, 1);
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
TRUE);
/* Create document
*/
@ -976,13 +978,13 @@ do_appwindow (void)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_IN);
gtk_table_attach (GTK_TABLE (table),
sw,
/* X direction */ /* Y direction */
0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
0, 0);
gtk_grid_attach (GTK_GRID (grid),
sw,
0, 2, 1, 1);
gtk_widget_set_hexpand (sw, TRUE);
gtk_widget_set_vexpand (sw, TRUE);
gtk_window_set_default_size (GTK_WINDOW (window),
200, 200);
@ -996,27 +998,22 @@ do_appwindow (void)
/* Create the toolbar
*/
handlebox = gtk_handle_box_new ();
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
0, 1, 1, 1);
gtk_container_add (GTK_CONTAINER (handlebox),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
gtk_table_attach (GTK_TABLE (table),
handlebox,
/* X direction */ /* Y direction */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
TRUE);
/* Create statusbar */
statusbar = gtk_statusbar_new ();
gtk_table_attach (GTK_TABLE (table),
statusbar,
/* X direction */ /* Y direction */
0, 1, 3, 4,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_grid_attach (GTK_GRID (grid),
statusbar,
0, 3, 1, 1);
gtk_widget_set_hexpand (statusbar,
TRUE);
/* Show text widget info in the statusbar */
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));

View File

@ -1,136 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Mutter fixed tooltip routine */
/*
* Copyright (C) 2001 Havoc Pennington
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <config.h>
#include "fixedtip.h"
#include "ui.h"
/**
* The floating rectangle. This is a GtkWindow, and it contains
* the "label" widget, below.
*/
static GtkWidget *tip = NULL;
/**
* The actual text that gets displayed.
*/
static GtkWidget *label = NULL;
/*
* X coordinate of the right-hand edge of the screen.
*
* \bug This appears to be a bug; screen_right_edge is calculated only when
* the window is redrawn. Actually we should never cache it because
* different windows are different sizes.
*/
static int screen_right_edge = 0;
/*
* Y coordinate of the bottom edge of the screen.
*
* \bug As with screen_right_edge.
*/
static int screen_bottom_edge = 0;
static gboolean
draw_handler (GtkWidget *tooltips,
cairo_t *cr,
gpointer user_data)
{
gtk_render_background (gtk_widget_get_style_context (tooltips),
cr,
0, 0,
gtk_widget_get_allocated_width (tooltips),
gtk_widget_get_allocated_height (tooltips));
return FALSE;
}
void
meta_fixed_tip_show (Display *xdisplay, int screen_number,
int root_x, int root_y,
const char *markup_text)
{
int w, h;
if (tip == NULL)
{
tip = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (GTK_WINDOW(tip), GDK_WINDOW_TYPE_HINT_TOOLTIP);
{
GdkScreen *gdk_screen;
GdkRectangle monitor;
gint mon_num;
gdk_screen = gdk_display_get_screen (gdk_display_get_default (),
screen_number);
gtk_window_set_screen (GTK_WINDOW (tip),
gdk_screen);
mon_num = gdk_screen_get_monitor_at_point (gdk_screen, root_x, root_y);
gdk_screen_get_monitor_geometry (gdk_screen, mon_num, &monitor);
screen_right_edge = monitor.x + monitor.width;
screen_bottom_edge = monitor.y + monitor.height;
}
gtk_widget_set_app_paintable (tip, TRUE);
gtk_window_set_resizable (GTK_WINDOW (tip), FALSE);
gtk_widget_set_name (tip, "gtk-tooltips");
gtk_container_set_border_width (GTK_CONTAINER (tip), 4);
g_signal_connect (tip, "draw",
G_CALLBACK (draw_handler), NULL);
label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (tip), label);
g_signal_connect (tip, "destroy",
G_CALLBACK (gtk_widget_destroyed), &tip);
}
gtk_label_set_markup (GTK_LABEL (label), markup_text);
gtk_window_get_size (GTK_WINDOW (tip), &w, &h);
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
root_x = MAX(0, root_x - w);
if ((root_x + w) > screen_right_edge)
root_x -= (root_x + w) - screen_right_edge;
gtk_window_move (GTK_WINDOW (tip), root_x, root_y);
gtk_widget_show (tip);
}
void
meta_fixed_tip_hide (void)
{
if (tip)
{
gtk_widget_destroy (tip);
tip = NULL;
}
}

View File

@ -1,69 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001 Havoc Pennington
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* \file fixedtip.h Mutter fixed tooltip routine
*
* Sometimes we want to display a small floating rectangle with helpful
* text near the pointer. For example, if the user holds the mouse over
* the maximise button, we can display a tooltip saying "Maximize".
* The text is localised, of course.
*
* This file contains the functions to create and delete these tooltips.
*
* \todo Since we now consider MetaDisplay a singleton, there can be
* only one tooltip per display; this might quite simply live in
* display.c. Alternatively, it could move to frames.c, which
* is the only place this business is called anyway.
*
* \todo Apparently some UI needs changing (check bugzilla)
*/
#ifndef META_FIXED_TIP_H
#define META_FIXED_TIP_H
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
/**
* Displays a tooltip. There can be only one across the entire system.
* This function behaves identically whether or not a tooltip is already
* displayed, but if it is the window will be reused rather than destroyed
* and recreated.
*
* \param xdisplay An X display.
* \param screen_number The number of the screen.
* \param root_x The X coordinate where the tooltip should appear
* \param root_y The Y coordinate where the tooltip should appear
* \param markup_text Text to display in the tooltip; can contain markup
*/
void meta_fixed_tip_show (Display *xdisplay, int screen_number,
int root_x, int root_y,
const char *markup_text);
/**
* Removes the tooltip that was created by meta_fixed_tip_show(). If there
* is no tooltip currently visible, this is a no-op.
*/
void meta_fixed_tip_hide (void);
#endif

View File

@ -31,7 +31,6 @@
#include <meta/util.h>
#include "core.h"
#include "menu.h"
#include "fixedtip.h"
#include <meta/theme.h>
#include <meta/prefs.h>
#include "ui.h"
@ -98,7 +97,6 @@ static MetaFrameControl get_control (MetaFrames *frames,
MetaUIFrame *frame,
int x,
int y);
static void clear_tip (MetaFrames *frames);
static void invalidate_all_caches (MetaFrames *frames);
static void invalidate_whole_window (MetaFrames *frames,
MetaUIFrame *frame);
@ -273,6 +271,7 @@ meta_frames_init (MetaFrames *frames)
frames->style_variants = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
update_style_contexts (frames);
gtk_widget_set_double_buffered (GTK_WIDGET (frames), FALSE);
@ -297,8 +296,6 @@ meta_frames_destroy (GtkWidget *object)
frames = META_FRAMES (object);
clear_tip (frames);
winlist = NULL;
g_hash_table_foreach (frames->frames, listify_func, &winlist);
@ -723,8 +720,6 @@ meta_frames_unmanage_window (MetaFrames *frames,
{
MetaUIFrame *frame;
clear_tip (frames);
frame = g_hash_table_lookup (frames->frames, &xwindow);
if (frame)
@ -1122,155 +1117,6 @@ meta_frames_repaint_frame (MetaFrames *frames,
gdk_window_process_all_updates ();
}
static void
show_tip_now (MetaFrames *frames)
{
const char *tiptext;
MetaUIFrame *frame;
int x, y, root_x, root_y;
Window root, child;
guint mask;
MetaFrameControl control;
Display *display;
frame = frames->last_motion_frame;
if (frame == NULL)
return;
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
XQueryPointer (display,
frame->xwindow,
&root, &child,
&root_x, &root_y,
&x, &y,
&mask);
control = get_control (frames, frame, x, y);
tiptext = NULL;
switch (control)
{
case META_FRAME_CONTROL_TITLE:
break;
case META_FRAME_CONTROL_DELETE:
tiptext = _("Close Window");
break;
case META_FRAME_CONTROL_MENU:
tiptext = _("Window Menu");
break;
case META_FRAME_CONTROL_MINIMIZE:
tiptext = _("Minimize Window");
break;
case META_FRAME_CONTROL_MAXIMIZE:
tiptext = _("Maximize Window");
break;
case META_FRAME_CONTROL_UNMAXIMIZE:
tiptext = _("Restore Window");
break;
case META_FRAME_CONTROL_SHADE:
tiptext = _("Roll Up Window");
break;
case META_FRAME_CONTROL_UNSHADE:
tiptext = _("Unroll Window");
break;
case META_FRAME_CONTROL_ABOVE:
tiptext = _("Keep Window On Top");
break;
case META_FRAME_CONTROL_UNABOVE:
tiptext = _("Remove Window From Top");
break;
case META_FRAME_CONTROL_STICK:
tiptext = _("Always On Visible Workspace");
break;
case META_FRAME_CONTROL_UNSTICK:
tiptext = _("Put Window On Only One Workspace");
break;
case META_FRAME_CONTROL_RESIZE_SE:
break;
case META_FRAME_CONTROL_RESIZE_S:
break;
case META_FRAME_CONTROL_RESIZE_SW:
break;
case META_FRAME_CONTROL_RESIZE_N:
break;
case META_FRAME_CONTROL_RESIZE_NE:
break;
case META_FRAME_CONTROL_RESIZE_NW:
break;
case META_FRAME_CONTROL_RESIZE_W:
break;
case META_FRAME_CONTROL_RESIZE_E:
break;
case META_FRAME_CONTROL_NONE:
break;
case META_FRAME_CONTROL_CLIENT_AREA:
break;
}
if (tiptext)
{
MetaFrameGeometry fgeom;
GdkRectangle *rect;
int dx, dy;
int screen_number;
meta_frames_calc_geometry (frames, frame, &fgeom);
rect = control_rect (control, &fgeom);
/* get conversion delta for root-to-frame coords */
dx = root_x - x;
dy = root_y - y;
/* Align the tooltip to the button right end if RTL */
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
dx += rect->width;
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
meta_fixed_tip_show (display,
screen_number,
rect->x + dx,
rect->y + rect->height + 2 + dy,
tiptext);
}
}
static gboolean
tip_timeout_func (gpointer data)
{
MetaFrames *frames;
frames = data;
show_tip_now (frames);
return FALSE;
}
#define TIP_DELAY 450
static void
queue_tip (MetaFrames *frames)
{
clear_tip (frames);
frames->tooltip_timeout = g_timeout_add (TIP_DELAY,
tip_timeout_func,
frames);
}
static void
clear_tip (MetaFrames *frames)
{
if (frames->tooltip_timeout)
{
g_source_remove (frames->tooltip_timeout);
frames->tooltip_timeout = 0;
}
meta_fixed_tip_hide ();
}
static void
redraw_control (MetaFrames *frames,
MetaUIFrame *frame,
@ -1299,7 +1145,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
switch (action)
{
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_SHADE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@ -1319,7 +1165,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE:
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@ -1332,7 +1178,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY:
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_HORIZONTALLY:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@ -1345,7 +1191,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY:
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_VERTICALLY:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@ -1358,7 +1204,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case META_ACTION_TITLEBAR_MINIMIZE:
case G_DESKTOP_TITLEBAR_ACTION_MINIMIZE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@ -1371,17 +1217,17 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case META_ACTION_TITLEBAR_NONE:
case G_DESKTOP_TITLEBAR_ACTION_NONE:
/* Yaay, a sane user that doesn't use that other weird crap! */
break;
case META_ACTION_TITLEBAR_LOWER:
case G_DESKTOP_TITLEBAR_ACTION_LOWER:
meta_core_user_lower_and_unfocus (display,
frame->xwindow,
event->time);
break;
case META_ACTION_TITLEBAR_MENU:
case G_DESKTOP_TITLEBAR_ACTION_MENU:
meta_core_show_window_menu (display,
frame->xwindow,
event->x_root,
@ -1389,9 +1235,6 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
event->button,
event->time);
break;
case META_ACTION_TITLEBAR_LAST:
break;
}
return TRUE;
@ -1444,8 +1287,6 @@ meta_frames_button_press_event (GtkWidget *widget,
if (frame == NULL)
return FALSE;
clear_tip (frames);
control = get_control (frames, frame, event->x, event->y);
/* focus on click, even if click was on client area */
@ -1710,8 +1551,6 @@ meta_frames_button_release_event (GtkWidget *widget,
if (frame == NULL)
return FALSE;
clear_tip (frames);
op = meta_core_get_grab_op (display);
if (op == META_GRAB_OP_NONE)
@ -1942,14 +1781,12 @@ meta_frames_motion_notify_event (GtkWidget *widget,
Display *display;
frames = META_FRAMES (widget);
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
display = GDK_DISPLAY_XDISPLAY (gdk_window_get_display (event->window));
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
if (frame == NULL)
return FALSE;
clear_tip (frames);
frames->last_motion_frame = frame;
grab_op = meta_core_get_grab_op (display);
@ -1971,7 +1808,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control;
int x, y;
gdk_window_get_pointer (frame->window, &x, &y, NULL);
gdk_window_get_device_position (frame->window, event->device,
&x, &y, NULL);
/* Control is set to none unless it matches
* the current grab
@ -2012,14 +1850,13 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control;
int x, y;
gdk_window_get_pointer (frame->window, &x, &y, NULL);
gdk_window_get_device_position (frame->window, event->device,
&x, &y, NULL);
control = get_control (frames, frame, x, y);
/* Update prelit control and cursor */
meta_frames_update_prelit_control (frames, frame, control);
queue_tip (frames);
}
break;
@ -2564,8 +2401,6 @@ meta_frames_leave_notify_event (GtkWidget *widget,
meta_frames_update_prelit_control (frames, frame, META_FRAME_CONTROL_NONE);
clear_tip (frames);
return TRUE;
}
@ -2637,7 +2472,6 @@ control_rect (MetaFrameControl control,
return rect;
}
#define RESIZE_EXTENDS 15
#define TOP_RESIZE_HEIGHT 4
static MetaFrameControl
get_control (MetaFrames *frames,
@ -2726,8 +2560,8 @@ get_control (MetaFrames *frames,
* in case of overlap.
*/
if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
x >= (fgeom.width - fgeom.borders.total.right))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
@ -2736,8 +2570,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
x <= (fgeom.borders.total.left + RESIZE_EXTENDS))
else if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
x <= fgeom.borders.total.left)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SW;
@ -2746,8 +2580,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
x <= (fgeom.borders.total.left + RESIZE_EXTENDS) && has_north_resize)
else if (y < (fgeom.borders.invisible.top) &&
x <= fgeom.borders.total.left && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
@ -2756,8 +2590,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS) && has_north_resize)
else if (y < (fgeom.borders.invisible.top) &&
x >= fgeom.width - fgeom.borders.total.right && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
@ -2771,17 +2605,17 @@ get_control (MetaFrames *frames,
if (has_vert && has_north_resize)
return META_FRAME_CONTROL_RESIZE_N;
}
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS))
else if (y >= (fgeom.height - fgeom.borders.total.bottom))
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
}
else if (x <= fgeom.borders.total.left + RESIZE_EXTENDS)
else if (x <= fgeom.borders.total.left)
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
else if (x >= (fgeom.width - fgeom.borders.total.right))
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;

View File

@ -116,7 +116,7 @@ popup_position_func (GtkMenu *menu,
pos = user_data;
gtk_widget_size_request (GTK_WIDGET (menu), &req);
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
*x = pos->x;
*y = pos->y;

Some files were not shown because too many files have changed in this diff Show More