mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 12:15:59 +03:00
Barebones app
This commit is contained in:
parent
56764f1b09
commit
251bbf4ab4
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
project(MirCompositor)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@ -10,5 +10,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(MIRAL miral REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
add_executable(compositor src/main.cpp)
|
30
NOTES.md
30
NOTES.md
@ -1,24 +1,24 @@
|
||||
# Notes
|
||||
The following file will serve the purpose of documenting my thought processes and progress as I complete the assignment. I am starting this project on February 18, 2023.
|
||||
|
||||
## Step 1: Virtual box
|
||||
- I installed the mir-builder.ova file, imported it into `virtualbox`, and ran it successfully with the provided login
|
||||
- I successfully built the mir project that was found in the home directory. I followed the documentation here (https://github.com/MirServer/mir/blob/main/doc/getting_involved_in_mir.md) to run the `miral-shell`.
|
||||
|
||||
## Step 2: Setting up the miral app
|
||||
- First I had to install xorg:
|
||||
## Step 1: Setting up the miral app
|
||||
At first, I went the virtual box route, but then I saw how easy it would be to do this locally, so I opted for that instead. On Arch, I did:
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install xinit
|
||||
git clone https://aur.archlinux.org/mir.git
|
||||
cd mir
|
||||
makepkg -si
|
||||
```
|
||||
- I then ran `startx` and, voila, my X server is running.
|
||||
- Now I just need xwayland:
|
||||
```sh
|
||||
sudo apt install xwayland
|
||||
```
|
||||
- Finally, I run the `miral-app` in the bin directory and see that we are running.
|
||||
|
||||
## Step 3: Hacking
|
||||
and voila. It lives!
|
||||
|
||||
## Step 2: Hacking
|
||||
|
||||
### Research
|
||||
I will begin my searching for documentation on how I made write a Mir-based compositor:
|
||||
1. https://mir-server.io/docs/developing-a-wayland-compositor-using-mir This seems like a good match!
|
||||
|
||||
###
|
||||
My task is to build a compositor, so I will first define what is that I need in my compositor. As an MVP, I would like to support:
|
||||
- Window transparency
|
||||
- Drop shadows
|
||||
|
||||
|
12
src/main.cpp
12
src/main.cpp
@ -1,6 +1,16 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
||||
int main() {
|
||||
#include <miral/runner.h>
|
||||
#include <miral/minimal_window_manager.h>
|
||||
#include <miral/set_window_management_policy.h>
|
||||
|
||||
int main(int argc, char const* argv[]) {
|
||||
MirRunner runner{argc, argv};
|
||||
|
||||
return runner.run_with(
|
||||
{
|
||||
set_window_management_policy<MinimalWindowManager>()
|
||||
});
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue
Block a user