1
0
Fork 0
Commit graph

2400 commits

Author SHA1 Message Date
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
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
Rui Matos
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
Owen W. Taylor
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
Ryan Lortie
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
Florian Müllner
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
Owen W. Taylor
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
Jasper St. Pierre
2eb3ff4bfb prefs: Fix memory leak 2011-12-19 09:45:41 -05:00
Jasper St. Pierre
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
Jasper St. Pierre
264c555af0 Do not use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=664028
2011-12-15 16:06:07 -05:00
Adel Gadllah
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
Lionel Landwerlin
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
Florian Müllner
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
Lionel Landwerlin
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
Ryan Lortie
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
Colin Walters
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
Jasper St. Pierre
3a4512cd91 Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662153
2011-12-13 19:53:57 -05:00
Marc-Antoine Perennou
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Florian Müllner
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
Rico Tzschichholz
b1a69d1e89 prefs: Fix typo 2011-11-14 20:13:56 +01:00
Florian Müllner
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
Rico Tzschichholz
1a51d307c8 Fix installation of mutter-schemas.convert 2011-11-11 21:39:54 +01:00
Florian Müllner
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
Rico Tzschichholz
a2726f41c9 ui: Replace deprecated gtk_widget_size_request 2011-11-11 09:33:42 +01:00
Jasper St. Pierre
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
Jasper St. Pierre
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
Rui Matos
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
Rui Matos
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
Tim Cuthbertson
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
Jasper St. Pierre
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
Jasper St. Pierre
1b04a40dce mutter-mag: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 21:21:56 -04:00
Jasper St. Pierre
8087872130 theme-viewer: Fix layout
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
Jasper St. Pierre
3ad25a62cd ui: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
Jasper St. Pierre
7ecd673d23 mutter-window-demo: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
Jasper St. Pierre
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