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 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 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
3065115
Add option to use and enable/disable a custom (external) decoration
tarek-y-ismail Nov 12, 2024
640de3e
Link against miral instead of using an explicit include path
tarek-y-ismail Nov 13, 2024
86720fa
Use wrappers instead of a bespoke decoration manager init.
tarek-y-ismail Nov 13, 2024
bc4c48d
Move input event listening and resolution to `InputResolver`
tarek-y-ismail Nov 13, 2024
7aeeb65
Move `InputResolver::DeviceEvent` out to `mir::shell::decoration`
tarek-y-ismail Nov 14, 2024
266f9d5
Expose `msd::{Decoration,BasicManager}` through miral interfaces
tarek-y-ismail Nov 14, 2024
5b065de
Copy over all of the code needed to render the titlebar
tarek-y-ismail Nov 14, 2024
e446979
Enable custom decorations by default for testing
tarek-y-ismail Nov 14, 2024
9d98118
Use `self` instead of `this` in `DecorationBasicManager::to_adapter`
tarek-y-ismail Nov 14, 2024
98fbb29
Expose `the_buffer_allocator` in `mir::Server`
tarek-y-ismail Nov 14, 2024
6966bba
Pass `mir::Server` down to where decorations are created
tarek-y-ismail Nov 14, 2024
4d36c36
Hook up the code needed to get input events and render a titlebar
tarek-y-ismail Nov 14, 2024
6f70331
Move most rendering and setup code to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
5a36226
Move `window_state` from `Decoration::Self` to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
c0faac6
Move `Decoration::update_state` to `DecorationAdapter`
tarek-y-ismail Nov 15, 2024
323efed
Add window dragging
tarek-y-ismail Nov 15, 2024
a3f4c35
Split the implementation and interface in `miral::Decoration`
tarek-y-ismail Nov 15, 2024
33703f0
Implement window resizing and cursor image changing
tarek-y-ismail Nov 18, 2024
851709a
Implement minimize, maximize toggle, and close buttons
tarek-y-ismail Nov 18, 2024
cb0a912
Remove `CMAKE_CURRENT_BINARY_DIR` from decoration example includes
tarek-y-ismail Nov 19, 2024
d127352
Change decoration titlebar color on focus/unfocus
tarek-y-ismail Nov 19, 2024
099239f
Draw additional decoration sides.
tarek-y-ismail Nov 19, 2024
a140ce0
`UserDecoration` colors glow up
tarek-y-ismail Nov 19, 2024
550966a
Merge `Renderer::Buffer(Stream)`
tarek-y-ismail Nov 19, 2024
fa2811d
Allow decoration authors to pass custom geometry
tarek-y-ismail Nov 19, 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