Merge lp://qastaging/~3v1n0/unity/unity-decorations into lp://qastaging/unity
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Christopher Townsend | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 3632 | ||||||||||||
Proposed branch: | lp://qastaging/~3v1n0/unity/unity-decorations | ||||||||||||
Merge into: | lp://qastaging/unity | ||||||||||||
Diff against target: |
10234 lines (+6824/-1487) 64 files modified
CMakeLists.txt (+5/-0) config.h.cmake (+1/-0) decorations/CMakeLists.txt (+38/-0) decorations/DecoratedWindow.cpp (+654/-0) decorations/DecoratedWindow.h (+73/-0) decorations/DecorationsDataPool.cpp (+153/-0) decorations/DecorationsDataPool.h (+59/-0) decorations/DecorationsEdge.cpp (+137/-0) decorations/DecorationsEdge.h (+64/-0) decorations/DecorationsEdgeBorders.cpp (+99/-0) decorations/DecorationsEdgeBorders.h (+43/-0) decorations/DecorationsGrabEdge.cpp (+102/-0) decorations/DecorationsGrabEdge.h (+53/-0) decorations/DecorationsInputMixer.cpp (+176/-0) decorations/DecorationsInputMixer.h (+66/-0) decorations/DecorationsManager.cpp (+386/-0) decorations/DecorationsManager.h (+74/-0) decorations/DecorationsPriv.h (+165/-0) decorations/DecorationsTitle.cpp (+116/-0) decorations/DecorationsTitle.h (+61/-0) decorations/DecorationsWidgets.cpp (+493/-0) decorations/DecorationsWidgets.h (+190/-0) decorations/DecorationsWindowButton.cpp (+216/-0) decorations/DecorationsWindowButton.h (+58/-0) decorations/pch/decorations_pch.hh (+39/-0) panel/PanelMenuView.cpp (+116/-254) panel/PanelMenuView.h (+9/-14) plugins/unityshell/CMakeLists.txt (+27/-2) plugins/unityshell/src/unityshell.cpp (+291/-412) plugins/unityshell/src/unityshell.h (+29/-17) plugins/unityshell/src/unityshell_glow.cpp (+4/-9) plugins/unityshell/unityshell.xml.in (+69/-1) tests/CMakeLists.txt (+14/-9) tests/decoration_mock_item.h (+88/-0) tests/test_decorations_input_mixer.cpp (+493/-0) tests/test_decorations_widgets.cpp (+512/-0) tests/test_texture_cache.cpp (+16/-1) tests/test_unity_window_style.cpp (+3/-3) unity-shared/CMakeLists.txt (+14/-1) unity-shared/CompizUtils.cpp (+181/-0) unity-shared/CompizUtils.h (+116/-0) unity-shared/DebugDBusInterface.cpp (+6/-1) unity-shared/DecorationStyle.cpp (+640/-0) unity-shared/DecorationStyle.h (+141/-0) unity-shared/Introspectable.cpp (+4/-1) unity-shared/IntrospectionData.cpp (+21/-0) unity-shared/IntrospectionData.h (+8/-0) unity-shared/PanelStyle.cpp (+58/-259) unity-shared/PanelStyle.h (+16/-38) unity-shared/PluginAdapter.cpp (+28/-311) unity-shared/PluginAdapter.h (+0/-22) unity-shared/StandaloneDecorationStyle.cpp (+146/-0) unity-shared/StandaloneWindowManager.cpp (+15/-20) unity-shared/StandaloneWindowManager.h (+2/-3) unity-shared/TextureCache.cpp (+6/-3) unity-shared/TextureCache.h (+3/-2) unity-shared/UnityWindowStyle.cpp (+1/-1) unity-shared/UnityWindowStyle.h (+1/-1) unity-shared/WindowButtonPriv.h (+1/-0) unity-shared/WindowButtons.cpp (+69/-79) unity-shared/WindowButtons.h (+1/-0) unity-shared/WindowManager.h (+4/-5) unity-shared/XWindowManager.cpp (+146/-11) unity-shared/XWindowManager.h (+4/-7) |
||||||||||||
To merge this branch: | bzr merge lp://qastaging/~3v1n0/unity/unity-decorations | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christopher Townsend (community) | Approve | ||
Brandon Schaefer (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
decorations: added new unity-decorations fully gtk-css-themed inside unity
Description of the change
Added new decorations to unity, inside unity itself instead of depending on the
compiz "decor" plugin and on a decorator (gtk-window-
My mission: «Everything changes, but nothing changes»; so completely new backend,
same results.
- Support for full Gtk3 Theming (https:/
- Improved resizing speed when using "Normal Resize" in compiz
- Removed duplicated textures, IPC between compiz and the decorator
- Anti aliased corners!!
Screenshot:
- Ambiance: http://
- Radiance: http://
Things to do:
- Add right-click window menu support
- Add "force quit" dialog
Not supported:
- Window buttons positions (we want a consistent user experience in unity, that
covers both the windows and the top panel and here the window buttons are, by
design on the top left corner of a window. Always).
- Custom actions on bar clicks (maybe to be supported later)
- Different decorators, just use themes.
This branch needs has a "soft dependency" on lp:~3v1n0/ubuntu-themes/unity-decorations
(for proper theming) and on lp:~3v1n0/compiz/disable-decor-with-unity to disable
decor plugin on settings.
=================
Technical details (use a better diff visualizer for review, like bzr qdiff):
- Added DecorationsManager: that handles all the windows, creates them and
redirect to the proper target the relative events.
- DecoratedWindow: wraps a CompWindow, set the extents, generates the background
textures, the top layout and draws them on screen.
Both DecorationsManager is allocated and controlled by UnityScreen (that redirects
the events to it), while each UnityWindow controls a DecoratedWindow, and redirects
to it the relevant compiz calls.
As for the decoration widgets, since I needed a simple way to handle textures and
to create a simple layout for displaying them, depending on the window size and
positioning, I've decided to write a small "widgets library" used to paint elements
and handle input events. What I called decoration::Item is basically a simple
widget with a geometry and that can be added into a container and managed by it.
Also, I've built an "InputMixer" (event compositor) that has the role to redirect
events to the proper widget that it manages.
So, with these tools, I've built all the widgets that are in a decoration:
- A DecorationsEdge
input-only widgets that care about mouse events, draw the right mouse pointers
and allow to resize and move a window (now the GrabEdge has the same logic of
the PanelGrabArea).
- A Layout containing the window buttons and the window title.
To properly theme the decorations I've built a decoration::Style class that
defines custom gtk-css parameters for an "UnityDecoration" widget that is used
for theming the whole decorations; read the values, caches the relevant settings
and emits signals when theme or font parameters changes. panel::Style has been
rewritten to use decoration::Style as its main source.
Other aspects:
- Removed all the unneeded code for decorating, undecorating and monitoring
decorations from PluginAdapter.
- Moved some XLib-only calls from PluginAdapter to XWindowManager and optimized
GetWindowName using the new GetStringProperty.
- Removing the unneeded code from PanelMenuView that was handling the decorations
and use decoration::Style on it; also remove a lot of unneeded redraws.
- Use decoration::Style for painting fake-decorations in UnityWindow.
- Added CompizUtils to unity-shared-
and functions that are useful for other components that are handling things
with compiz (allows removing duplicated code from UnityWindow as well).
- Added decoration:
- Shadows are based on simple pixmaps that are generated through cairo just
once per session (or when the shadow settings change) and shared by all
the windows.
- Fixed linking of standalone components (and tests) against libunity-
(now the library dir is added to dpath, no need to use LD_LIBRARY_PATH any more).
- Added compiz settings to override theme shadow parameters.
- Improved fallback window buttons (now they're filled with foreground color).
- All the decoration objects support debug introspection for autopilot tests.
- Added unit tests for decoration::Item and InputMixer, more tests to come later.
PASSED: Continuous integration, rev:3890 jenkins. qa.ubuntu. com/job/ unity-ci/ 563/ jenkins. qa.ubuntu. com/job/ unity-trusty- amd64-ci/ 99 jenkins. qa.ubuntu. com/job/ unity-trusty- armhf-ci/ 95 jenkins. qa.ubuntu. com/job/ unity-trusty- i386-ci/ 97
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- ci/563/ rebuild
http://