Commit Graph

2445 Commits

Author SHA1 Message Date
Neil Roberts
ed358c8f4b meta-texture-rectangle: Use Cogl's API to create a rectangle texture
Cogl now has public experimental API to create a rectangle texture
which we can use instead of creating a foreign texture with GL. This
avoids Mutter depending on Cogl including a GL header from its public
headers which it might not do in future.

https://bugzilla.gnome.org/show_bug.cgi?id=672711
2012-04-25 14:54:09 +01:00
Robert Bragg
a22859a64a shaped-texture: never slice shape mask texture
Since Cogl doesn't support multi-texturing with sliced textures and the
shape texture is combined with the texture-from-pixmap texture we need
to make sure we never construct a sliced mask texture. This patch simply
passes the COGL_TEXTURE_NO_SLICE flag to cogl_texture_from_data when
creating the shape mask texture.

https://bugzilla.gnome.org/show_bug.cgi?id=674731
2012-04-25 11:57:33 +01:00
Jasper St. Pierre
c44438b19f Revert "Remove a bunch of dead code"
This reverts commit 0d794f28f0.

I thought this was marked ACN. It wasn't.
2012-04-24 18:02:33 -04:00
Jasper St. Pierre
b58366d3ad theme: Remove unused "widget" parameter to frame style drawing
It seems that the only usage of the "widget" parameter throughout
the entire call chain was to pass between two function calls as
mutual recursion.

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
6900128b2f theme: Remove unused entry points
meta_draw_op_draw, meta_draw_op_list_draw, and meta_frame_style_draw were
all unused

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
c0b4d68390 meta-window-actor: Remove some unused constants
https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
0d794f28f0 Remove a bunch of dead code
Code isn't version control. We don't need bug links and commented out
code to remind us of how things were done originally.

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
e389eff79d Remove meta_compositor_update_workspace_geometry
This callback is just dead code

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
41adbdda12 prefs: Remove a dead declaration
https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:41:04 -04:00
Jasper St. Pierre
2d6555ca4d prefs: Remove live-hidden-windows preference
The preference existed, even though it was hard-coded to true. Just
remove it for good.

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:40:47 -04:00
Jasper St. Pierre
044d58951e Switch to gtk-doc syntax
https://bugzilla.gnome.org/show_bug.cgi?id=673752
2012-04-24 15:20:39 -04:00
Florian Müllner
9c97e8999e keybindings: Remove 'toggle-recording' binding
The keybinding is only useful when using GNOME Shell, so now that we
can define keybindings outside of mutter, move it there.

https://bugzilla.gnome.org/show_bug.cgi?id=674376
2012-04-24 17:36:46 +02:00
Florian Müllner
8809673a74 display: Cancel overlay key presses on mouse button events
Currently pressing the overlay key only triggers the overview if
no other key is pressed between KeyPress and KeyRelease. Extend
this logic to pointer events, so that KeyPress + ButtonPress actions
are treated explicitly different from "pure" overlay key presses.
In particular, this change allows to re-use the overlay key as mouse
button modifier.

https://bugzilla.gnome.org/show_bug.cgi?id=662476
2012-04-17 23:53:36 +02:00
Jasper St. Pierre
68321d9bf4 keybindings: Use a GSettings object rather than a schema, to support extensions
If we want to support keybindings from extensions installed in the user's
directory, we can't take a schema, as the GSettings object needs to have
a special GSettingsSchemaSource.

https://bugzilla.gnome.org/show_bug.cgi?id=673014
2012-04-16 20:31:45 -04:00
Giovanni Campagna
3aad30143c default plugin: use the right type for varargs
Coordinates in Clutter are double, so twice the size of an int, and
if not correctly casted memory corruption occurs.

https://bugzilla.gnome.org/show_bug.cgi?id=673809
2012-04-10 03:45:25 +02:00
Owen W. Taylor
93d06d4368 Don't try to auto-maximize not-maximizable windows
Starting the auto-maximize process on a window like a
META_WINDOW_DESKTOP window that is not maximizable gets placement into
a confused state and eventually results in the window being positioned
at the wrong position (the position that an auto-maximized window would
be restored to.)

https://bugzilla.gnome.org/show_bug.cgi?id=673566
2012-04-05 14:53:11 -04:00
Owen W. Taylor
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
Jasper St. Pierre
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
Pavel Vasin
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
Pavel Vasin
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Lionel Landwerlin
78dc480e86 screen: don't use unreffed pointer 2012-03-19 14:58:32 +00:00
Jasper St. Pierre
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
Rui Matos
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
Stefano Facchini
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Rui Matos
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
Rui Matos
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
Florian Müllner
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
Adel Gadllah
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
Adel Gadllah
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
Florian Müllner
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
Damien Radtke
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
Owen W. Taylor
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
Jasper St. Pierre
0b7f2f8cd3 theme-viewer: Fix invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2012-03-13 00:48:29 -04:00
Jasper St. Pierre
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
Rui Matos
1d98f1fee8 prefs: Handle the new META_PREF_DYNAMIC_WORKSPACES enum value
Avoids a -Werror compiler error.
2012-03-12 01:10:27 +01:00
Florian Müllner
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
Florian Müllner
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
Rui Matos
3f3e3ce37e plugins/default: Fix compiler error 2012-03-09 14:05:28 +01:00
Jasper St. Pierre
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
Rui Matos
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
Jasper St. Pierre
01c363bb6a Use a META_ prefix for enum types, not MUTTER_ 2012-02-23 16:39:28 -05:00
Robert Bragg
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
Adel Gadllah
3cb912aee2 MetaShapedTexture: Implement get_paint_volume
Add a get_paint_volume implementation to MetaShapedTexture.
2012-02-21 18:09:25 +01:00
Jasper St. Pierre
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