Try to fix navbar overlap
This commit is contained in:
parent
e6c389871f
commit
6b148437ef
@ -35,7 +35,7 @@ client_created_listener(*this) {}
|
||||
int proc(int fd, uint32_t mask, void *data) {
|
||||
LorieCompositor *b = static_cast<LorieCompositor*>(data);
|
||||
if (b == nullptr) {LOGF("b == nullptr"); return 0;}
|
||||
|
||||
|
||||
b->queue.run();
|
||||
return 0;
|
||||
};
|
||||
@ -49,7 +49,7 @@ void LorieCompositor::start() {
|
||||
wl_event_loop_add_fd(wl_display_get_event_loop(display), queue.get_fd(), WL_EVENT_READABLE, &proc, this);
|
||||
|
||||
wl_display_add_client_created_listener(display, &client_created_listener);
|
||||
|
||||
|
||||
wl_display_init_shm (display);
|
||||
wl_resource_t::global_create<LorieCompositor_>(display, this);
|
||||
wl_resource_t::global_create<LorieSeat>(display, this);
|
||||
@ -57,7 +57,7 @@ void LorieCompositor::start() {
|
||||
wl_resource_t::global_create<LorieShell>(display, this);
|
||||
|
||||
backend_init();
|
||||
|
||||
|
||||
wl_display_run(display);
|
||||
}
|
||||
|
||||
@ -66,10 +66,10 @@ struct wl_event_source* LorieCompositor::add_fd_listener(int fd, uint32_t mask,
|
||||
struct wl_event_loop* loop = nullptr;
|
||||
if (display != nullptr)
|
||||
loop = wl_display_get_event_loop(display);
|
||||
|
||||
|
||||
if (loop != nullptr)
|
||||
return wl_event_loop_add_fd(loop, fd, mask, func, data);
|
||||
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -188,12 +188,12 @@ void LorieCompositor::real_keyboard_key_modifiers(uint8_t depressed, uint8_t lat
|
||||
key_modifiers.latched == latched &&
|
||||
key_modifiers.locked == locked &&
|
||||
key_modifiers.group == group) return;
|
||||
|
||||
|
||||
key_modifiers.depressed = depressed;
|
||||
key_modifiers.latched = latched;
|
||||
key_modifiers.locked = locked;
|
||||
key_modifiers.group = group;
|
||||
|
||||
|
||||
client->keyboard.send_modifiers (next_serial(), depressed, latched, locked, group);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ void LorieEGLHelper::swap() {
|
||||
2, // Request opengl ES2.0
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
||||
ctx = eglCreateContext(dpy, cfg, NULL, ctxattribs);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
LOGE("LorieEGLHelper::init : eglCreateContext failed: %s", eglGetErrorText(eglGetError()));
|
||||
@ -166,13 +166,13 @@ void LorieEGLHelper::uninit() {
|
||||
return;
|
||||
}
|
||||
ctx = EGL_NO_CONTEXT;
|
||||
|
||||
|
||||
if (eglDestroySurface(dpy, sfc) != EGL_TRUE) {
|
||||
LOGE("LorieEGLHelper::uninit : eglDestroySurface failed: %s", eglGetErrorText(eglGetError()));
|
||||
return;
|
||||
}
|
||||
sfc = EGL_NO_SURFACE;
|
||||
|
||||
|
||||
if (eglTerminate(dpy) != EGL_TRUE) {
|
||||
LOGE("LorieEGLHelper::uninit : eglTerminate failed: %s", eglGetErrorText(eglGetError()));
|
||||
return;
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
operator struct wl_client*() { return client; }
|
||||
private:
|
||||
struct wl_client *client = NULL;
|
||||
|
||||
|
||||
static void destroyed(struct wl_listener *listener, void *data);
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ private:
|
||||
data_t user_data = nullptr;
|
||||
static void created_callback(struct wl_listener* listener, void *data) {
|
||||
if (listener == nullptr || data == nullptr) return;
|
||||
|
||||
|
||||
new client_t(static_cast<struct wl_client*>(data),
|
||||
(static_cast<wl_client_created_listener_t*>(listener))->user_data);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
// compositor features
|
||||
void start();
|
||||
struct wl_event_source* add_fd_listener(int fd, uint32_t mask, wl_event_loop_fd_func_t func, void *data);
|
||||
|
||||
|
||||
void set_toplevel(LorieSurface *surface);
|
||||
void set_cursor(LorieSurface *surface, uint32_t hotspot_x, uint32_t hotspot_y);
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
wrapper(keyboard_keymap_changed);
|
||||
#undef wrapper
|
||||
|
||||
|
||||
|
||||
LorieRenderer renderer;
|
||||
LorieSurface*& toplevel;
|
||||
LorieSurface*& cursor;
|
||||
@ -69,26 +69,26 @@ public:
|
||||
|
||||
//private:
|
||||
struct wl_display *display = nullptr;
|
||||
|
||||
|
||||
|
||||
|
||||
LorieMessageQueue queue;
|
||||
private:
|
||||
wl_client_created_listener_t<LorieClient, LorieCompositor&> client_created_listener;
|
||||
|
||||
struct LorieClient* get_toplevel_client();
|
||||
uint32_t next_serial();
|
||||
|
||||
|
||||
struct {
|
||||
uint32_t depressed = 0, latched = 0, locked = 0, group = 0;
|
||||
} key_modifiers;
|
||||
};
|
||||
|
||||
class LorieClipboard {
|
||||
public:
|
||||
public:
|
||||
LorieClipboard(LorieDataSource &data_source);
|
||||
LorieDataSource &data_source;
|
||||
int read_fd;
|
||||
|
||||
|
||||
struct wl_array contents;
|
||||
struct wl_array mime_types;
|
||||
struct wl_listener selection_listener;
|
||||
|
@ -7,7 +7,7 @@ class LorieMessageQueue {
|
||||
public:
|
||||
LorieMessageQueue();
|
||||
void write(std::function<void()> func);
|
||||
|
||||
|
||||
template<typename Ret, typename Class, typename ... Args>
|
||||
void call(Ret Class::* __pm, Args&& ... args) {
|
||||
write(std::bind(std::mem_fn(__pm), args...));
|
||||
@ -25,7 +25,7 @@ template<class Class, class T, class... Args>
|
||||
struct LorieFuncWrapper {
|
||||
using TFn = T (Class::*)(Args...);
|
||||
LorieFuncWrapper(TFn fn, Class* cl, LorieMessageQueue& q): cl(cl), ptr(fn), q(q) {};
|
||||
|
||||
|
||||
Class* cl;
|
||||
TFn ptr;
|
||||
LorieMessageQueue& q;
|
||||
|
@ -5,10 +5,10 @@
|
||||
#include <errno.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
LorieMessageQueue::LorieMessageQueue() {
|
||||
LorieMessageQueue::LorieMessageQueue() {
|
||||
pthread_mutex_init(&write_mutex, nullptr);
|
||||
pthread_mutex_init(&read_mutex, nullptr);
|
||||
|
||||
|
||||
fd = eventfd(0, EFD_CLOEXEC);
|
||||
if (fd == -1) {
|
||||
LOGE("Failed to create socketpair for message queue: %s", strerror(errno));
|
||||
|
@ -6,10 +6,16 @@
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
</style>
|
||||
<style name="NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user