mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Start to build out window management functions
This commit is contained in:
parent
47b28bd335
commit
82bc36c681
5 changed files with 85 additions and 1 deletions
15
sway/main.c
15
sway/main.c
|
|
@ -3,6 +3,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <wlc/wlc.h>
|
||||
#include "config.h"
|
||||
#include "handlers.h"
|
||||
|
||||
struct sway_config *config;
|
||||
|
||||
|
|
@ -27,7 +28,19 @@ void load_config() {
|
|||
int main(int argc, char **argv) {
|
||||
load_config();
|
||||
|
||||
static struct wlc_interface interface = { };
|
||||
static struct wlc_interface interface = {
|
||||
.output = {
|
||||
.created = handle_output_created,
|
||||
.destroyed = handle_output_destroyed,
|
||||
.resolution = handle_output_resolution_change
|
||||
},
|
||||
.view = {
|
||||
.created = handle_view_created,
|
||||
.destroyed = handle_view_destroyed,
|
||||
.focus = handle_view_focus
|
||||
}
|
||||
};
|
||||
|
||||
if (!wlc_init(&interface, argc, argv)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue