1
0
Fork 0
Commit graph

258 commits

Author SHA1 Message Date
Owen W. Taylor
9d69b2a963 MetaBackground: add properties to set vignette settings
Make the vignette options properties so they can be animated;
modify the function-call API for meta_background_actor_set_vignette()
to correspond more closely to the 3 properties.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
a4a688ed83 Rewrite background code
The old requirement that multiple MetaBackgroundActor objects be
layered on top of each to produce blended backgrounds resulted in
extremely inefficient drawing since the entire framebuffer had
to be read and written multiple times.

 * Replace the MetaBackground ClutterContent with a plain GObject
   that serves to hold the background parameters and prerender
   textures to be used to draw the background. It handles
   colors, gradients, and blended images, but does not handle
   vignetting

 * Add vignetting to MetaBackgroundActor directly.

 * Add MetaBackgroundImage and MetaBackgroundImageCache to allow
   multiple MetaBackground objects to share the same images

By removing the usage of ClutterContent, the following optimizations
were easy to add:

 Blending is turned off when the actor is fully opaque
 Nearest-neighbour filtering is used when drawing 1:1

The GLSL vignette code is slightly improved to use a vertex shader
snippet for computing the texture coordinate => position in actor
mapping.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Jasper St. Pierre
711f0c0c50 common: Make UNKNOWN a flag, not a combination of all directions
This was the original intention, but it was thought to be easier
to mark this as a combination of all directions. It turned out to
instead cause subtle bugs since code that blindly checked & DIR_WEST or
similar turned out to get it wrong when it was UNKNOWN, so just make
it an explicit flag.

This fixes the cursor appearing in the wrong place when starting a
keyboard resize.
2014-08-19 15:11:10 -04:00
Jasper St. Pierre
f42258327b util: Move the text direction stuff out of MetaUI
GTK+ doesn't need to be initialized to get locale direction,
which means we can do this without bringing up MetaUI at all.
2014-08-17 22:59:43 -04:00
Jasper St. Pierre
652fe57cdd prefs: Completely remove references to REVERSES
And fill up the gap in the flags as well
2014-08-17 22:48:51 -04:00
Christophe Fergeau
20a6243c85 Remove use of META_KEY_BINDING_REVERSES
Now that the internal mutter bindings and gnome-shell stopped using
META_KEY_BINDING_REVERSES, and after moving the 'adding shift reverses
the keybinding action' logic to gnome-control-center, we can remove
META_KEY_BINDING_REVERSES from mutter.

Plugin API is broken as this constant is removed from the exported
headers. ABI is broken as using this flag is now a noop.

https://bugzilla.gnome.org/show_bug.cgi?id=732385
2014-08-17 19:29:43 +02:00
Christophe Fergeau
c5c6b2257f Add meta_key_binding_is_reversed()
MetaKeyBinding can be marked as being reversed
(META_KEY_BINDING_IS_REVERSED), but MetaKeyHandlerFunc callbacks
cannot check whether this flag was set or not on the MetaKeyBinding
which triggered the callback.

https://bugzilla.gnome.org/show_bug.cgi?id=732295
2014-08-17 19:29:43 +02:00
Jasper St. Pierre
d0c004c93c common: Don't define _WGO_BASE inside the enum
Doing this causes gobject-introspection to mess up and think that
the enum prefix is the empty string. Just use the long name within
the enum defines.
2014-08-16 15:50:39 -04:00
Jasper St. Pierre
19795c1681 workspace: Add a "workspace-index" property to MetaWorkspace
This will be used to replace some of the hooks that are used to call
into window.c, so that the workspace index property is properly kept up
to date.

We can't name the property "index" since it causes conflicts with the
meta_workspace_index method. This should really be called
meta_workspace_get_index, but oh well.
2014-08-16 14:56:38 -04:00
Jasper St. Pierre
67be4e2bf3 window: Don't use GTK+ to fetch the drag threshold
Just look it up in GSettings ourselves.
2014-08-15 18:35:20 -04:00
Jasper St. Pierre
d06e4beb7f display: Use a named mask constant inside is_moving / is_resizing
This helps clear up what's going on a bit.
2014-08-15 17:43:00 -04:00
Jasper St. Pierre
517e8f6fbd common: Create a better encoding for MetaGrabOp
MetaGrabOp is painful and tedious to work with, because it's a
sequential series of values, meaning we have to use a giant unreadable
switch statement to figure out some basic things about the value.

To solve this, modify the encoding for MetaGrabOp and for the specific
window grab operations so that they're a set of bitflags that we can
easily check.
2014-08-15 16:08:49 -04:00
Jasper St. Pierre
467465c99c backend: Create the stage in the backend, rather than the compositor
This allows creating the stage much earlier than it otherwise would have
been. Our initialization sequence has always been a bit haphazard, with
first the MetaBackend created, then the MetaDisplay, and inside of that,
the MetaScreen and MetaCompositor.

Refactor this out so that the MetaBackend creates the Clutter
stage. Besides the clarity of early initialization, we now have much
easier access to the stage, allowing us to use it for things such as
key focus and beyond.
2014-08-13 20:08:46 -04:00
Jasper St. Pierre
e935b52e51 display: Move composite version checks here 2014-08-13 19:32:39 -04:00
Rui Matos
7d54631ebf backends: Make MetaBackend available to introspection
This moves meta-backend.h under meta/ and, for now, just exposes to
introspection the methods that we actually need in gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=734301
2014-08-07 11:31:59 +02:00
Cosimo Cecchi
cd84317346 compositor: add support for unminimize compositor effects
https://bugzilla.gnome.org/show_bug.cgi?id=733789
2014-07-26 17:26:40 +02:00
Carlos Garnacho
41fdc4ac2e display: Add meta_display_is_pointer_emulating_sequence()
This function tells the obvious on X11, and implements a similar mechanism
on wayland to determine the "pointer emulating" sequence, or one to stick
with when implementing single-touch behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=733631
2014-07-24 18:05:56 +02:00
Owen W. Taylor
3a57f843d5 Add a framework for restarting the compositor with nice visuals
The current GNOME Shell Alt-F2 restart looks very messy and also
provides no indication to the user what is going on. We need to
restart the compositor to switch in and out of stereo mode, so
add a framework for doing this more cleanly:

Additions:

 meta_restart(): restarts the compositor with a message
 MetaDisplay::show-restart-message: signal the embedding
    shell to show a message
 MetaDisplay::restart: signal the embedding shell to restart
    itself.
 meta_is_restart(): indicates whether the current instance is a
                    restart so we can suppress login animations.

A helper program meta-restart-helper holds the composite overlay
window up during the restart to avoid visual artifacts.

https://bugzilla.gnome.org/show_bug.cgi?id=733026
2014-07-16 18:09:25 -04:00
Giovanni Campagna
f807207b65 window: expose meta_window_is_client_decorated() in the API 2014-07-08 12:10:54 +02:00
Jasper St. Pierre
24d7c5ebe3 compositor: Simplify meta_window_actor_set_updates_frozen
Since we always call it with the same value, just push that
value into the implementation.
2014-06-17 13:10:42 -04:00
Jasper St. Pierre
188e4e1b92 window: Rename get_input_rect to get_buffer_rect
With get_input_region existing, get_input_rect is a misnomer. Really,
it's about the geometry of the output surface, and it's only used that
way in the compositor code.

Way back when in GNOME 3.2, get_input_rect was added when we added
invisible borders. get_outer_rect was always synonymous with server-side
geometry of the toplevel. get_outer_rect was used for both user-side
policy (the "frame rect") and to get the geometry of the window.

Invisible borders were meant to extend the input region of the frame
window silently. Since most users of get_outer_rect cared about the
frame rect, we kept that the same and added a new method, get_input_rect
to get the full rect of the framed window with all invisible borders for
input kept on.

As time went on and CSD and Wayland became a reality, the relationship
between the server-side geometry and the "frame rect" became more
complicated, as can be evidenced by the recent commits. Since clients
don't tend to be framed anymore, they set their own input region.

get_buffer_rect is also sort of a poor name, since X11 doesn't really
have buffers, but we don't really have many other alternatives.

This doesn't change any of the code, nor the meaning. It will always
refer to the rectangle where the toplevel should be placed.
2014-06-17 10:33:52 -04:00
Rico Tzschichholz
8734477d52 meta: Add generated meta-version.h
Avoid populating *_VERSION constants through cflags in pkg-config-file
which could be overridden by the project using it. Properly prefix the
defines with META_ to make gi-scanner happy.
2014-06-05 14:05:16 +02:00
Rico Tzschichholz
8766db2593 common: Do not leak MetaResizePopup to the public api 2014-06-04 15:53:29 +02:00
Rico Tzschichholz
f5a4e996a8 display: Remove the screen from get_tab_list 2014-06-03 14:40:15 +02:00
Florian Müllner
b64548ee1f Pass button_rect when opening window menu from button
When opening the window menu without an associated control - e.g.
by right-clicking the titlebar or by keyboard - using coordinates
for the menu position is appropriate. However when the menu is
associated with a window button, the expected behavior in the
shell can be implemented much easier with the full button geometry:
the menu will point to the center of the button's bottom edge
rather than align to the left/right side of the titlebar as it
does now, and the clickable area where a release event does not
dismiss the menu will match the actual clickable area in mutter.

So add an additional show_window_menu_for_rect() function and
use it when opening the menu from a button.

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:49:48 +02:00
Jasper St. Pierre
626516d12e window: Remove meta_window_move as well
Move to meta_window_move_frame everywhere...
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
d4058d947b window: Remove meta_window_get_rect
It's a bad API that returns weird results you wouldn't expect.
2014-05-27 15:15:41 -04:00
Florian Müllner
0a9187a6e9 window: Add accessor method for gtk_theme_variant
This is useful information for UI associated with a window, so add
a corresponding method.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
Florian Müllner
31db32e826 Actually implement opening the app menu
The last commit added support for the "appmenu" button in decorations,
but didn't actually implement it. Add a new MetaWindowMenuType parameter
to the show_window_menu () functions and use it to ask the compositor
to display the app menu when the new button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
Florian Müllner
c2ea650b3c Add support for app-menu button in window decorations
We want to synchronize the button layouts of our server side
decorations and GTK+'s client side ones. However each currently
may contain buttons not supported by the other, which makes this
unnecessarily tricky.
So add support for a new "appmenu" button in the layout, to display
the fallback app menu in the decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:05 +02:00
Jasper St. Pierre
6513cbb470 Add back coordinates to the window menu
It looks weird to have Alt+Space pop up under the cursor instead
of the top-left corner of the window, and the Wayland request will
pass through the coordinates as well.

Add it to the compositor interface, and extend the
_GTK_SHOW_WINDOW_MENU ClientMessage to support it as well.
2014-05-22 10:50:57 -04:00
Jasper St. Pierre
50b81fe4b9 x11: Add support for a new _GTK_SHOW_WINDOW_MENU request
To show the window menu from a client-side decoration.
2014-05-21 18:55:47 -04:00
Jasper St. Pierre
6c37f6e601 window: Remove meta_window_resize
It's unused, and it's a poor API. resize_with_gravity and resize_frame
are better.
2014-05-21 12:16:56 -04:00
Jasper St. Pierre
8640982e68 Convert window menus to a compositor implementation 2014-05-17 15:16:23 -04:00
Jasper St. Pierre
b05953d960 cursor: Add a META_CURSOR_NONE
This is for cases where we have a MetaCursorReference that does
not have an X cursor equivalent... we have to return something!
2014-05-17 13:27:16 -04:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Jasper St. Pierre
41235fcb86 keybindings: Remove now-unused meta_screen_grab_all_keys 2014-04-28 17:34:33 -04:00
Rico Tzschichholz
ca75513880 prefs: Add center-new-windows setting 2014-04-25 15:26:24 +02:00
Jasper St. Pierre
ebb6847bd1 ui: Don't use grab ops for grab negotation
Grab operations are now always taken on the backend connection, and
this breaks GTK+'s event handling.

Instead of taking a grab op, just do the handling ourselves. The
GTK+ connection will get an implicit grab, which means pointer /
keyboard events won't be sent to the rest of mutter, which is good.
2014-04-24 13:36:40 -04:00
Jasper St. Pierre
6c743dad88 xrandr: Rewrite to be based on the X11 display connection 2014-04-23 10:24:26 -04:00
Jasper St. Pierre
e55dd4e3f4 display: Rename META_GRAB_OP_WAYLAND_CLIENT to WAYLAND_POPUP
We're going to introduce other grab ops soon.
2014-04-20 12:03:24 -04:00
Jasper St. Pierre
92340fd8da display: Kill #if 0'd support for _NET_RESTACK_WINDOW requests
The code has been dead and broken for a long, long time now.
2014-04-18 10:12:11 -04:00
Elad Alfassa
40214b72bf keybindings: Add keybindings to switch to last workspace
When using dynamic workspaces, the last workspaces can vary, so it makes sense
to have a keybinding to go directly to it.

https://bugzilla.gnome.org/show_bug.cgi?id=659288
2014-04-16 21:41:26 +02:00
Robert Ancell
f68d65a5ae xrandr: Use specified output property name for backlight control
Backlight controls are set using the "BACKLIGHT" XRANDR output property.
This should be "Backlight" according to the XRANDR spec [1].

Some drivers (Intel) export both properties and some only the specified property (nvidia).
Users of drivers that only export the specified property cannot change their backlight using XRANDR.

[1] http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt section 9.1

https://bugzilla.gnome.org/show_bug.cgi?id=723606
2014-04-09 12:17:58 -07:00
Jasper St. Pierre
b0ea0afd2f display: Remove meta_display_get_ignored_modifier_mask
It's unused, in both here and in gnome-shell.
2014-04-07 17:16:29 -04:00
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Jasper St. Pierre
be02fa1120 xwayland: Switch to the new Xwayland DDX 2014-04-02 13:24:57 -04:00
Jasper St. Pierre
8373c90cd8 background: Remove load_still_frame
Nothing uses it, and it's incompatible with XWayland anyway.
2014-04-02 12:35:24 -04:00
Jasper St. Pierre
5bcc78498f Move MetaLauncher to meta-backend 2014-03-31 23:44:46 -04:00
Jasper St. Pierre
3f70bdd331 display: Revert API break for get_tab_list
gnome-shell apparently uses this, and we shouldn't break it.
2014-03-27 12:48:05 -04:00