mirror of
https://github.com/labwc/labwc.git
synced 2026-04-03 07:15:34 -04:00
make wlroots session backend optional
This commit is contained in:
parent
046d055ac0
commit
dfbea3e156
2 changed files with 13 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include "input/keyboard.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/config.h>
|
||||
#include <wlr/interfaces/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
|
|
@ -21,6 +21,10 @@
|
|||
#include "view.h"
|
||||
#include "workspaces.h"
|
||||
|
||||
#if WLR_HAS_SESSION
|
||||
#include <wlr/backend/session.h>
|
||||
#endif
|
||||
|
||||
enum lab_key_handled {
|
||||
LAB_KEY_HANDLED_FALSE = 0,
|
||||
LAB_KEY_HANDLED_TRUE = 1,
|
||||
|
|
@ -54,7 +58,9 @@ keyboard_reset_current_keybind(void)
|
|||
static void
|
||||
change_vt(unsigned int vt)
|
||||
{
|
||||
#if WLR_HAS_SESSION
|
||||
wlr_session_change_vt(server.session, vt);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "output.h"
|
||||
#include <assert.h>
|
||||
#include <strings.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/backend/wayland.h>
|
||||
#include <wlr/config.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
|
|
@ -48,6 +47,10 @@
|
|||
#define wlr_output_is_drm(output) (false)
|
||||
#endif
|
||||
|
||||
#if WLR_HAS_SESSION
|
||||
#include <wlr/backend/session.h>
|
||||
#endif
|
||||
|
||||
bool
|
||||
output_get_tearing_allowance(struct output *output)
|
||||
{
|
||||
|
|
@ -99,12 +102,14 @@ handle_output_frame(struct wl_listener *listener, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
#if WLR_HAS_SESSION
|
||||
/*
|
||||
* skip painting the session when it exists but is not active.
|
||||
*/
|
||||
if (server.session && !server.session->active) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct wlr_scene_output *scene_output = output->scene_output;
|
||||
struct wlr_output_state *pending = &output->pending;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue