aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2025-03-11 12:13:07 -0600
committerJosh Rahm <rahm@google.com>2025-03-11 12:13:07 -0600
commitb0ac29dc21a8ccd95a269c82d9eda47392c084a4 (patch)
tree18a46e69d5fba070ad05c562123392171c4b166f
parent0a7f561f3821968605c16a03ea278e3611b6c775 (diff)
downloadwetterhorn-b0ac29dc21a8ccd95a269c82d9eda47392c084a4.tar.gz
wetterhorn-b0ac29dc21a8ccd95a269c82d9eda47392c084a4.tar.bz2
wetterhorn-b0ac29dc21a8ccd95a269c82d9eda47392c084a4.zip
Update to wlroots 0.18.
-rw-r--r--Setup.hs23
-rw-r--r--harness/CMakeLists.txt2
-rw-r--r--harness/src/wl.c11
m---------wlroots0
4 files changed, 22 insertions, 14 deletions
diff --git a/Setup.hs b/Setup.hs
index f3a2180..e8a6b6b 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,14 +1,15 @@
+import Control.Exception
import Control.Monad (forM_, when)
+import Data.Maybe (fromJust)
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.Types.HookedBuildInfo
import System.Directory
import System.Environment (getArgs)
import System.FilePath
-import System.Posix.Files (createSymbolicLink, removeLink)
+import System.Posix.Files
import System.Process
import Text.Printf
-import Data.Maybe (fromJust)
main = do
putStrLn "Running Setup.hs"
@@ -19,10 +20,10 @@ main = do
let buildPath = fromJust (flagToMaybe $ configDistPref conf)
callCommand $
- printf "cd wlroots && meson setup %s -Dexamples=false -Dbackends=x11,drm,libinput --reconfigure" (wlrootsDir buildPath)
+ printf "cd wlroots && meson setup %s -Dexamples=false -Dbackends=x11,drm,libinput --reconfigure" (wlrootsDir buildPath)
callCommand $
- printf "cmake -B %s -S harness" (harnessDir buildPath)
+ printf "cmake -B %s -S harness" (harnessDir buildPath)
lnF ("../" ++ harnessDir buildPath) "harness/build"
@@ -33,14 +34,13 @@ main = do
callCommand $ printf "cd wlroots && ninja -C %s" (wlrootsDir path)
callCommand $
- printf "make -C %s" (harnessDir path)
+ printf "make -C %s" (harnessDir path)
lnF (printf "%s/wtr_harness" (harnessDir path)) "wtr_harness"
return emptyHookedBuildInfo,
postCopy = \a f pd _ -> do
forM_ (flagToMaybe (copyDistPref f)) $ \copyDest -> do
-
let pluginFile = copyDest </> "build" </> "wtr.so" </> "wtr.so"
lnF pluginFile "wtr.so"
}
@@ -53,10 +53,17 @@ main = do
lnF from to = do
printf "%s -> %s\n" from to
- flip when (removeLink to) =<< doesExist to
+ flip
+ when
+ ( do
+ printf "Removing %s." to
+ removeLink to
+ )
+ =<< doesExist to
createSymbolicLink from to
doesExist f = do
b1 <- doesFileExist f
b2 <- doesDirectoryExist f
- return (b1 || b2)
+ b3 <- catch (pathIsSymbolicLink f) (\(e :: SomeException) -> return False)
+ return (b1 || b2 || b3)
diff --git a/harness/CMakeLists.txt b/harness/CMakeLists.txt
index 13bbafd..0af759c 100644
--- a/harness/CMakeLists.txt
+++ b/harness/CMakeLists.txt
@@ -77,5 +77,5 @@ add_executable (wtr_harness ${SOURCES} ${PLUGIN_LOAD} ${PLUGIN_INTF}
target_link_libraries(wtr_harness dl)
target_link_directories(wtr_harness PUBLIC
"${CMAKE_CURRENT_BINARY_DIR}/../wlroots")
-target_link_libraries(wtr_harness wlroots wayland-server xkbcommon pthread)
+target_link_libraries(wtr_harness wlroots-0.18 wayland-server xkbcommon pthread)
target_link_options(wtr_harness PRIVATE -Wl,--wrap=pthread_create)
diff --git a/harness/src/wl.c b/harness/src/wl.c
index 8281b03..3386a63 100644
--- a/harness/src/wl.c
+++ b/harness/src/wl.c
@@ -487,9 +487,9 @@ static void server_cursor_axis(struct wl_listener *listener, void *data)
struct tinywl_server *server = wl_container_of(listener, server, cursor_axis);
struct wlr_pointer_axis_event *event = data;
/* Notify the client with pointer focus of the axis event. */
- wlr_seat_pointer_notify_axis(server->seat, event->time_msec,
- event->orientation, event->delta,
- event->delta_discrete, event->source);
+ wlr_seat_pointer_notify_axis(
+ server->seat, event->time_msec, event->orientation, event->delta,
+ event->delta_discrete, event->source, event->relative_direction);
}
static void server_cursor_frame(struct wl_listener *listener, void *data)
@@ -843,7 +843,8 @@ int main(int argc, char *argv[])
* output hardware. The autocreate option will choose the most suitable
* backend based on the current environment, such as opening an X11 window
* if an X11 server is running. */
- server.backend = wlr_backend_autocreate(server.wl_display, &server.session);
+ server.backend = wlr_backend_autocreate(
+ wl_display_get_event_loop(server.wl_display), &server.session);
if (server.backend == NULL) {
wlr_log(WLR_ERROR, "failed to create wlr_backend");
return 1;
@@ -884,7 +885,7 @@ int main(int argc, char *argv[])
/* Creates an output layout, which a wlroots utility for working with an
* arrangement of screens in a physical layout. */
- server.output_layout = wlr_output_layout_create();
+ server.output_layout = wlr_output_layout_create(server.wl_display);
/* Configure a listener to be notified when new outputs are available on the
* backend. */
diff --git a/wlroots b/wlroots
-Subproject 767eedd3cbe9900687bf3b82236320dcd7b77aa
+Subproject cda69b696d65a53d5d5e75dfed059a3803e0d70