Small fixes
This commit is contained in:
parent
32119a1df7
commit
705e575d6d
1
Makefile
1
Makefile
@ -143,7 +143,6 @@ wayland-protocols: src/wayland/protocols/wlr-layer-shell-unstable-v1.xml
|
|||||||
wayland-scanner client-header src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1-client-header.h
|
wayland-scanner client-header src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1-client-header.h
|
||||||
wayland-scanner private-code src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1.h
|
wayland-scanner private-code src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1.h
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run
|
.PHONY: clean clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run
|
||||||
clean: clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run clean-wayland-protocols
|
clean: clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run clean-wayland-protocols
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ pkg_config_packs := gio-2.0 \
|
|||||||
xext \
|
xext \
|
||||||
"xrandr >= 1.5" \
|
"xrandr >= 1.5" \
|
||||||
xscrnsaver \
|
xscrnsaver \
|
||||||
wayland-client\
|
wayland-client \
|
||||||
|
|
||||||
|
|
||||||
# dunstify also needs libnotify
|
# dunstify also needs libnotify
|
||||||
|
@ -74,12 +74,10 @@ static gboolean run(void *data)
|
|||||||
bool active = queues_length_displayed() > 0;
|
bool active = queues_length_displayed() > 0;
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
LOG_D("Dunst: Window is active");
|
|
||||||
// Call draw before showing the window to avoid flickering
|
// Call draw before showing the window to avoid flickering
|
||||||
draw();
|
draw();
|
||||||
output->win_show(win);
|
output->win_show(win);
|
||||||
} else {
|
} else {
|
||||||
LOG_D("Dunst: Window is NOT active");
|
|
||||||
output->win_hide(win);
|
output->win_hide(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +87,7 @@ static gboolean run(void *data)
|
|||||||
sleep = 100000; // Make sure wayland input is handled in time FIXME
|
sleep = 100000; // Make sure wayland input is handled in time FIXME
|
||||||
gint64 timeout_at = now + sleep;
|
gint64 timeout_at = now + sleep;
|
||||||
|
|
||||||
LOG_D("Dunst: sleeping for %li ms", sleep/1000);
|
LOG_D("Sleeping for %li ms", sleep/1000);
|
||||||
|
|
||||||
if (sleep >= 0) {
|
if (sleep >= 0) {
|
||||||
if (next_timeout < now || timeout_at < next_timeout) {
|
if (next_timeout < now || timeout_at < next_timeout) {
|
||||||
|
12
src/output.c
12
src/output.c
@ -52,12 +52,12 @@ const struct output output_wl = {
|
|||||||
|
|
||||||
const struct output* output_create(void)
|
const struct output* output_create(void)
|
||||||
{
|
{
|
||||||
if (is_running_wayland()){
|
if (is_running_wayland()) {
|
||||||
LOG_I("System is running wayland");
|
LOG_I("Using Wayland output");
|
||||||
|
return &output_wl;
|
||||||
|
} else {
|
||||||
|
LOG_I("Using X11 output");
|
||||||
|
return &output_x11;
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
LOG_I("System is running X11");
|
|
||||||
}
|
|
||||||
return &output_wl;
|
|
||||||
}
|
}
|
||||||
/* vim: set ft=c tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set ft=c tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -141,7 +141,6 @@ static bool queues_notification_is_finished(struct notification *n, struct dunst
|
|||||||
if (n->timeout == 0) // sticky
|
if (n->timeout == 0) // sticky
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* LOG_I("Queues: Still checking if notification is finished"); */
|
|
||||||
bool is_idle = status.fullscreen ? false : status.idle;
|
bool is_idle = status.fullscreen ? false : status.idle;
|
||||||
|
|
||||||
/* don't timeout when user is idle */
|
/* don't timeout when user is idle */
|
||||||
|
@ -173,7 +173,6 @@ static void destroy_output(struct wl_output *output) {
|
|||||||
|
|
||||||
static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
||||||
uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
||||||
LOG_I("Pointer handle motion");
|
|
||||||
ctx.pointer.x = wl_fixed_to_int(surface_x);
|
ctx.pointer.x = wl_fixed_to_int(surface_x);
|
||||||
ctx.pointer.y = wl_fixed_to_int(surface_y);
|
ctx.pointer.y = wl_fixed_to_int(surface_y);
|
||||||
}
|
}
|
||||||
@ -651,7 +650,7 @@ void wl_win_show(window win) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wl_win_hide(window win) {
|
void wl_win_hide(window win) {
|
||||||
LOG_I("Hiding window");
|
LOG_I("Wayland: Hiding window");
|
||||||
ctx.cur_dim.h = 0;
|
ctx.cur_dim.h = 0;
|
||||||
set_dirty();
|
set_dirty();
|
||||||
wl_display_roundtrip(ctx.display);
|
wl_display_roundtrip(ctx.display);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user