mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Move input handler init() and finish() functions to input/input.c
This commit is contained in:
parent
b359b1560c
commit
797e743c8a
4 changed files with 32 additions and 4 deletions
10
include/input/input.h
Normal file
10
include/input/input.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_INPUT_H
|
||||
#define LABWC_INPUT_H
|
||||
|
||||
struct seat;
|
||||
|
||||
void input_handlers_init(struct seat *seat);
|
||||
void input_handlers_finish(struct seat *seat);
|
||||
|
||||
#endif /* LABWC_INPUT_H */
|
||||
18
src/input/input.c
Normal file
18
src/input/input.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "input/cursor.h"
|
||||
#include "input/input.h"
|
||||
#include "input/keyboard.h"
|
||||
|
||||
void
|
||||
input_handlers_init(struct seat *seat)
|
||||
{
|
||||
cursor_init(seat);
|
||||
keyboard_init(seat);
|
||||
}
|
||||
|
||||
void
|
||||
input_handlers_finish(struct seat *seat)
|
||||
{
|
||||
cursor_finish(seat);
|
||||
keyboard_finish(seat);
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
labwc_sources += files(
|
||||
'cursor.c',
|
||||
'gestures.c',
|
||||
'input.c',
|
||||
'keyboard.c',
|
||||
'key-state.c',
|
||||
'touch.c',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <wlr/types/wlr_touch.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/mem.h"
|
||||
#include "input/input.h"
|
||||
#include "input/keyboard.h"
|
||||
#include "input/key-state.h"
|
||||
#include "labwc.h"
|
||||
|
|
@ -415,8 +416,7 @@ seat_init(struct server *server)
|
|||
}
|
||||
wlr_cursor_attach_output_layout(seat->cursor, server->output_layout);
|
||||
|
||||
cursor_init(seat);
|
||||
keyboard_init(seat);
|
||||
input_handlers_init(seat);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -431,8 +431,7 @@ seat_finish(struct server *server)
|
|||
input_device_destroy(&input->destroy, NULL);
|
||||
}
|
||||
|
||||
cursor_finish(seat);
|
||||
keyboard_finish(seat);
|
||||
input_handlers_finish(seat);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue