Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add APIs to override decoration managers and customize decorations (Take 2) #3666

Draft
wants to merge 45 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
324452d
Add a way to override the decoration manager
tarek-y-ismail Nov 12, 2024
f07b887
Expose `msd::Manager` through miral.
tarek-y-ismail Nov 12, 2024
ec20cf0
Add option to use and enable/disable a custom (external) decoration
tarek-y-ismail Nov 12, 2024
b94f0ef
Link against miral instead of using an explicit include path
tarek-y-ismail Nov 13, 2024
082ab3d
Use wrappers instead of a bespoke decoration manager init.
tarek-y-ismail Nov 13, 2024
aa64ec6
Move input event listening and resolution to `InputResolver`
tarek-y-ismail Nov 13, 2024
0129261
Move `InputResolver::DeviceEvent` out to `mir::shell::decoration`
tarek-y-ismail Nov 14, 2024
7722708
Expose `msd::{Decoration,BasicManager}` through miral interfaces
tarek-y-ismail Nov 14, 2024
cc81a58
Copy over all of the code needed to render the titlebar
tarek-y-ismail Nov 14, 2024
dced985
Enable custom decorations by default for testing
tarek-y-ismail Nov 14, 2024
1e6b8c2
Use `self` instead of `this` in `DecorationBasicManager::to_adapter`
tarek-y-ismail Nov 14, 2024
ddba2e4
Expose `the_buffer_allocator` in `mir::Server`
tarek-y-ismail Nov 14, 2024
0d24670
Pass `mir::Server` down to where decorations are created
tarek-y-ismail Nov 14, 2024
5304737
Hook up the code needed to get input events and render a titlebar
tarek-y-ismail Nov 14, 2024
e72aab1
Move most rendering and setup code to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
dff4f93
Move `window_state` from `Decoration::Self` to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
ffeae0e
Move `Decoration::update_state` to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
dcc78b7
Add window dragging
tarek-y-ismail Nov 15, 2024
0469164
Split the implementation and interface in `miral::Decoration`
tarek-y-ismail Nov 15, 2024
bb5b298
Implement window resizing and cursor image changing
tarek-y-ismail Nov 18, 2024
6cd489b
Implement minimize, maximize toggle, and close buttons
tarek-y-ismail Nov 18, 2024
c468110
Remove `CMAKE_CURRENT_BINARY_DIR` from decoration example includes
tarek-y-ismail Nov 19, 2024
de222f6
Change decoration titlebar color on focus/unfocus
tarek-y-ismail Nov 19, 2024
04c9a32
Draw additional decoration sides.
tarek-y-ismail Nov 19, 2024
b3765bf
`UserDecoration` colors glow up
tarek-y-ismail Nov 19, 2024
125b389
Merge `Renderer::Buffer(Stream)`
tarek-y-ismail Nov 19, 2024
ea3c6e0
Allow decoration authors to pass custom geometry
tarek-y-ismail Nov 19, 2024
4d76865
Remove parameters in `DeocrationBasicManager` builder lambda.
tarek-y-ismail Nov 20, 2024
41009a4
Const correct a bunch of parameters, methods, and data members
tarek-y-ismail Nov 20, 2024
804b1f3
Alias the rest of the callbacks passed to `DecorationAdapter`
tarek-y-ismail Nov 20, 2024
8aea366
Move `WindowState` and `StaticGeometry` to `miral::decoration`.
tarek-y-ismail Nov 20, 2024
7693ae0
Move `InputContext`'s constructor to `decoration_adapter.cpp`
tarek-y-ismail Nov 20, 2024
35ef710
Move `InputResolverAdapter` to be internal to `decoration_adapter.cpp`
tarek-y-ismail Nov 20, 2024
5e18aa0
Move `Renderer` method definitions to `decoration_adapter.cpp`
tarek-y-ismail Nov 20, 2024
0731b42
Move `DecorationAdapter`, `Renderer`, `InputContext` to
tarek-y-ismail Nov 20, 2024
fe1a97a
Move `DecorationRedrawNotifier` impl to `decoration_adapter.cpp`
tarek-y-ismail Nov 20, 2024
565426d
Hide `DecorationManagerBuilder`'s internals behind pimpl
tarek-y-ismail Nov 20, 2024
d11c2b8
Remove now unused `user_decoration_manager_example.{h,cpp}`
tarek-y-ismail Nov 20, 2024
fe1355a
Re-enable display scale observing for `msd::BasicManager` and
tarek-y-ismail Nov 20, 2024
73f2693
Fix decorations not destroying with their apps.
tarek-y-ismail Nov 21, 2024
d5ae982
Fix application flickering when interacting with decorations.
tarek-y-ismail Nov 21, 2024
2613f31
Remove `DecorationManagerBuilder`, use `DecorationManagerAdapter` in
tarek-y-ismail Nov 21, 2024
6e76cde
Groom symbols
tarek-y-ismail Nov 22, 2024
c921385
Use pimpl in `InputContext`
tarek-y-ismail Nov 22, 2024
c157f0d
process_{up,down} now work with all supported mouse buttons
tarek-y-ismail Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(MIR_VERSION_MAJOR 2)
set(MIR_VERSION_MINOR 18)
set(MIR_VERSION_PATCH 3)
set(MIR_VERSION_MINOR 19)
set(MIR_VERSION_PATCH 0)

add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR})
Expand Down
2 changes: 2 additions & 0 deletions examples/miral-shell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_subdirectory(desktop)
add_subdirectory(spinner)
add_subdirectory(decoration)

add_custom_target(miral-app ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-app.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-app
Expand All @@ -24,4 +25,5 @@ mir_add_wrapped_executable(miral-shell
target_link_libraries(miral-shell
example-shell-lib
miral-spinner
miral-user-decoration-example
)
21 changes: 21 additions & 0 deletions examples/miral-shell/decoration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- Mode: CMake; indent-tabs-mode: nil; tab-width: 2 -*-
#
# Copyright © Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# 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, see <http://www.gnu.org/licenses/>.

add_library(miral-user-decoration-example
decoration.cpp
)

target_link_libraries(miral-user-decoration-example PUBLIC miral)
Loading
Loading