mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 12:15:59 +03:00
feature: close the compositor with meta+shift+e and reenabling clipping (fix to come in mir)
This commit is contained in:
parent
b935769325
commit
40e031b1a1
@ -56,7 +56,7 @@ See the [user guide](USERGUIDE.md) for information on how to use the miracle win
|
||||
# Timeline
|
||||
The goal is to have a tiling manager that I am comfortable daily-driving by summer of 2024.
|
||||
|
||||
**Proof of Concept (Due: January 15th)** Version: 0.1
|
||||
**Proof of Concept (Due: January 15th)** Version: 0.1.0
|
||||
|
||||
Features:
|
||||
- [x] Layout new window
|
||||
@ -70,10 +70,11 @@ Features:
|
||||
- [x] Handle exclusion zones
|
||||
- [x] Handle output creation
|
||||
- [x] Handle output updating
|
||||
- [ ] Handle output deletion
|
||||
- [x] Handle output deletion
|
||||
- [x] Handle fullscreen
|
||||
- [x] Application Quit Behavior
|
||||
|
||||
**Stabilization + Usability (Due: March 1st)** Version: 0.2
|
||||
**Stabilization + Usability (Due: March 1st)** Version: 0.2.0
|
||||
|
||||
Features:
|
||||
- [ ] Fix major bugs
|
||||
|
@ -19,6 +19,7 @@
|
||||
- `Meta + Up`: Resize upward
|
||||
- `Meta + Down`: Resize downward
|
||||
- `Meta + Shift + q`: Quit the selected application
|
||||
- `Meta + Shift + e`: Close the compositor
|
||||
|
||||
# Pointer
|
||||
- Hovering over a window will select the window
|
||||
|
@ -24,7 +24,7 @@ int main(int argc, char const* argv[])
|
||||
ExternalClientLauncher external_client_launcher;
|
||||
WindowManagerOptions window_managers
|
||||
{
|
||||
add_window_manager_policy<miracle::MiracleWindowManagementPolicy>("tiling", external_client_launcher, internal_client_launcher)
|
||||
add_window_manager_policy<miracle::MiracleWindowManagementPolicy>("tiling", external_client_launcher, internal_client_launcher, runner)
|
||||
};
|
||||
|
||||
Keymap config_keymap;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <miral/toolkit_event.h>
|
||||
#include <miral/application_info.h>
|
||||
#include <miral/zone.h>
|
||||
#include <miral/runner.h>
|
||||
#include <mir/log.h>
|
||||
#include <linux/input.h>
|
||||
#include <iostream>
|
||||
@ -72,10 +73,12 @@ bool is_tileable(T& requested_specification)
|
||||
MiracleWindowManagementPolicy::MiracleWindowManagementPolicy(
|
||||
const miral::WindowManagerTools & tools,
|
||||
miral::ExternalClientLauncher const& external_client_launcher,
|
||||
miral::InternalClientLauncher const& internal_client_launcher)
|
||||
miral::InternalClientLauncher const& internal_client_launcher,
|
||||
miral::MirRunner& runner)
|
||||
: window_manager_tools{tools},
|
||||
external_client_launcher{external_client_launcher},
|
||||
internal_client_launcher{internal_client_launcher}
|
||||
internal_client_launcher{internal_client_launcher},
|
||||
runner{runner}
|
||||
{
|
||||
}
|
||||
|
||||
@ -160,6 +163,11 @@ bool MiracleWindowManagementPolicy::handle_keyboard_event(MirKeyboardEvent const
|
||||
active_tree->tree.close_active_window();
|
||||
return true;
|
||||
}
|
||||
else if (scan_code == KEY_E && modifiers & mir_input_event_modifier_shift)
|
||||
{
|
||||
runner.stop();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -10,6 +10,11 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace miral
|
||||
{
|
||||
class MirRunner;
|
||||
}
|
||||
|
||||
namespace miracle
|
||||
{
|
||||
class DisplayListener;
|
||||
@ -27,7 +32,8 @@ public:
|
||||
MiracleWindowManagementPolicy(
|
||||
miral::WindowManagerTools const&,
|
||||
miral::ExternalClientLauncher const&,
|
||||
miral::InternalClientLauncher const&);
|
||||
miral::InternalClientLauncher const&,
|
||||
miral::MirRunner&);
|
||||
~MiracleWindowManagementPolicy() = default;
|
||||
|
||||
bool handle_keyboard_event(MirKeyboardEvent const* event) override;
|
||||
@ -78,6 +84,7 @@ private:
|
||||
miral::WindowManagerTools window_manager_tools;
|
||||
miral::ExternalClientLauncher const external_client_launcher;
|
||||
miral::InternalClientLauncher const internal_client_launcher;
|
||||
miral::MirRunner& runner;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -605,12 +605,6 @@ void Node::_set_window_rectangle(geom::Rectangle area)
|
||||
|
||||
void Node::constrain()
|
||||
{
|
||||
// TODO: Constraining is broken at the moment, at least on my machine.
|
||||
// For now, we will disable this feature, but we should fix it ASAP.
|
||||
bool is_disabled = true;
|
||||
if (is_disabled)
|
||||
return;
|
||||
|
||||
if (is_window())
|
||||
{
|
||||
auto& info = tools.info_for(window);
|
||||
|
Loading…
Reference in New Issue
Block a user