Skip to content

Commit

Permalink
Merge branch 'main' of github.com:rcaelers/workrave
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaelers committed Jan 28, 2024
2 parents 96a13a4 + eebb81c commit bc8ca1a
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 25 deletions.
10 changes: 5 additions & 5 deletions libs/input-monitor/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (PLATFORM_OS_UNIX)
unix/UnixInputMonitorFactory.cc
unix/MutterInputMonitor.cc
unix/WaylandInputMonitor.cc
${CMAKE_CURRENT_BINARY_DIR}/unix/protocols//ext-idle-notify-v1.c
${CMAKE_CURRENT_BINARY_DIR}/ext-idle-notify-v1.c
)

target_include_directories(workrave-libs-input-monitor PRIVATE ${CMAKE_SOURCE_DIR}/libs/input-monitor/src/unix)
Expand All @@ -22,13 +22,13 @@ if (PLATFORM_OS_UNIX)
target_link_libraries(workrave-libs-input-monitor ${WAYLAND_CLIENT_LIBRARIES})

add_custom_command(
OUTPUT unix/protocols/ext-idle-notify-v1.c unix/protocols/ext-idle-notify-v1-client.hq
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/unix/protocols/ext-idle-notify-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/unix/protocols/ext-idle-notify-v1.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/unix/protocols/ext-idle-notify-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/unix/protocols//ext-idle-notify-v1-client.h
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ext-idle-notify-v1.c ${CMAKE_CURRENT_BINARY_DIR}/ext-idle-notify-v1-client.h
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/unix/protocols/ext-idle-notify-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/ext-idle-notify-v1.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/unix/protocols/ext-idle-notify-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/ext-idle-notify-v1-client.h
DEPENDS unix/protocols/ext-idle-notify-v1.xml
VERBATIM
)
target_include_directories(workrave-libs-input-monitor PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/unix/)
target_include_directories(workrave-libs-input-monitor PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif()

if (PLATFORM_OS_WINDOWS)
Expand Down
2 changes: 1 addition & 1 deletion libs/input-monitor/src/unix/WaylandInputMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <memory>
#include <gdk/gdkwayland.h>

#include "protocols/ext-idle-notify-v1-client.h"
#include "ext-idle-notify-v1-client.h"
#include "debug.hh"

static const struct wl_registry_listener registry_listener = {
Expand Down
5 changes: 3 additions & 2 deletions libs/input-monitor/src/windows/Harpoon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ bool
Harpoon::init(IConfigurator::Ptr config, HarpoonHookFunc func)
{
TRACE_ENTRY();
assert(HARPOON_MAX_UNBLOCKED_APPS);
init_critical_filename_list(config);

bool debug, mouse_lowlevel, keyboard_lowlevel;
bool debug = false;
bool mouse_lowlevel = false;
bool keyboard_lowlevel = false;

config->get_value_with_default("advanced/harpoon/debug", debug, false);

Expand Down
1 change: 1 addition & 0 deletions libs/utils/include/utils/W32ActiveSetup.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <windows.h>
#include <vector>
#include <string>

class W32ActiveSetup
{
Expand Down
18 changes: 11 additions & 7 deletions libs/utils/src/Paths.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ Paths::get_application_directory()
GetModuleFileNameA(GetModuleHandle(nullptr), app_dir_name, sizeof(app_dir_name));
// app_dir_name == c:\program files\workrave\lib\workrave.exe
char *s = strrchr(app_dir_name, '\\');
assert(s);
*s = '\0';
// app_dir_name == c:\program files\workrave\lib
s = strrchr(app_dir_name, '\\');
assert(s);
*s = '\0';
// app_dir_name == c:\program files\workrave
if (s != nullptr)
{
*s = '\0';
// app_dir_name == c:\program files\workrave\lib
s = strrchr(app_dir_name, '\\');
if (s != nullptr)
{
*s = '\0';
}
// app_dir_name == c:\program files\workrave
}
return std::filesystem::path(app_dir_name);
#elif defined(PLATFORM_OS_MACOS)
char execpath[MAXPATHLEN + 1];
Expand Down
16 changes: 8 additions & 8 deletions ui/app/toolkits/gtkmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ if (PLATFORM_OS_UNIX)
platforms/unix/gtktrayicon.c
platforms/unix/UnixLocker.cc
platforms/unix/WaylandWindowManager.cc
${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.c
${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/xdg-shell.c
${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-unstable-v1.c
${CMAKE_CURRENT_BINARY_DIR}/xdg-shell.c
)

if (HAVE_INDICATOR)
Expand All @@ -56,17 +56,17 @@ if (PLATFORM_OS_UNIX)
target_include_directories(workrave-toolkit-gtkmm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols)

add_custom_command(
OUTPUT platforms/unix/protocols/wlr-layer-shell-unstable-v1.c platforms/unix/protocols/wlr-layer-shell-unstable-v1-client.hq
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1-client.h
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-unstable-v1.c ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-unstable-v1-client.h
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-unstable-v1.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/wlr-layer-shell-unstable-v1.xml ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-unstable-v1-client.h
DEPENDS platforms/unix/protocols/wlr-layer-shell-unstable-v1.xml
VERBATIM
)

add_custom_command(
OUTPUT platforms/unix/protocols/xdg-shell.c platforms/unix/protocols/wlr-layer-shell-unstable-v1-client.h
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/xdg-shell.xml ${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/xdg-shell.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/xdg-shell.xml ${CMAKE_CURRENT_BINARY_DIR}/platforms/unix/protocols/xdg-shell-client.h
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell.c ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-client.h
COMMAND ${WAYLAND_SCANNER} private-code ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/xdg-shell.xml ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell.c
COMMAND ${WAYLAND_SCANNER} client-header ${CMAKE_CURRENT_SOURCE_DIR}/platforms/unix/protocols/xdg-shell.xml ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-client.h
DEPENDS platforms/unix/protocols/xdg-shell.xml
VERBATIM
)
Expand Down
2 changes: 1 addition & 1 deletion ui/app/toolkits/gtkmm/GtkUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ GtkUtil::set_always_on_top(Gtk::Window *window, bool ontop)
#if defined(PLATFORM_OS_WINDOWS)

HWND hwnd = (HWND)GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(window->gobj())));
WindowsCompat::SetWindowOnTop(hwnd, on_top);
WindowsCompat::SetWindowOnTop(hwnd, ontop);

#else

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <gtkmm.h>
#include <wayland-client-core.h>

#include "protocols/wlr-layer-shell-unstable-v1-client.h"
#include "wlr-layer-shell-unstable-v1-client.h"

class LayerSurface
{
Expand Down

0 comments on commit bc8ca1a

Please sign in to comment.