summaryrefslogtreecommitdiff
path: root/x11-wm/picom/files/patch-rtprio
diff options
context:
space:
mode:
Diffstat (limited to 'x11-wm/picom/files/patch-rtprio')
-rw-r--r--x11-wm/picom/files/patch-rtprio57
1 files changed, 45 insertions, 12 deletions
diff --git a/x11-wm/picom/files/patch-rtprio b/x11-wm/picom/files/patch-rtprio
index e4d20a12c732..4cf46a51d618 100644
--- a/x11-wm/picom/files/patch-rtprio
+++ b/x11-wm/picom/files/patch-rtprio
@@ -1,8 +1,7 @@
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276962
-https://github.com/yshui/picom/commit/023103c62074
https://github.com/yshui/picom/commit/dff77aae27cf
---- src/meson.build.orig 2024-01-28 18:17:19 UTC
+--- src/meson.build.orig 2024-02-13 10:36:02 UTC
+++ src/meson.build
@@ -23,7 +23,7 @@ required_packages = [
# Some XCB packages are here because their versioning differs (see check below).
@@ -16,13 +15,24 @@ https://github.com/yshui/picom/commit/dff77aae27cf
@@ -59,7 +59,7 @@ if get_option('opengl')
if get_option('opengl')
- cflags += ['-DCONFIG_OPENGL', '-DGL_GLEXT_PROTOTYPES']
-- deps += [dependency('gl', required: true), dependency('egl', required: true), dependency('threads', required:true)]
-+ deps += [dependency('gl', required: true), dependency('egl', required: true)]
+ cflags += ['-DCONFIG_OPENGL']
+- deps += [dependency('epoxy', required: true), dependency('threads', required:true)]
++ deps += [dependency('epoxy', required: true)]
srcs += [ 'opengl.c' ]
endif
---- src/picom.c.orig 2024-01-28 18:17:19 UTC
+@@ -84,10 +84,6 @@ elif (host_system == 'freebsd' or host_system == 'netb
+ elif (host_system == 'freebsd' or host_system == 'netbsd' or
+ host_system == 'dragonfly' or host_system == 'openbsd')
+ cflags += ['-DHAS_KQUEUE']
+-endif
+-
+-if host_system == 'openbsd'
+- deps += [dependency('threads', required: true)]
+ endif
+
+ subdir('backend')
+--- src/picom.c.orig 2024-02-13 10:36:02 UTC
+++ src/picom.c
@@ -17,6 +17,7 @@
#include <fcntl.h>
@@ -32,23 +42,46 @@ https://github.com/yshui/picom/commit/dff77aae27cf
#include <sched.h>
#include <stddef.h>
#include <stdio.h>
-@@ -2557,15 +2558,16 @@ void set_rr_scheduling(void) {
+@@ -33,9 +34,6 @@
+ #include <xcb/render.h>
+ #include <xcb/sync.h>
+ #include <xcb/xfixes.h>
+-#ifdef __OpenBSD__
+-#include <pthread.h>
+-#endif
+
+ #include <ev.h>
+ #include <test.h>
+@@ -2606,14 +2604,8 @@ void set_rr_scheduling(void) {
int ret;
struct sched_param param;
-
+-#ifndef __OpenBSD__
- ret = sched_getparam(0, &param);
-+ int old_policy;
-+ ret = pthread_getschedparam(pthread_self(), &old_policy, &param);
+-#else
+ int old_policy;
+ ret = pthread_getschedparam(pthread_self(), &old_policy, &param);
+-#endif
+-
if (ret != 0) {
log_debug("Failed to get old scheduling priority");
return;
- }
+@@ -2621,16 +2613,12 @@ void set_rr_scheduling(void) {
param.sched_priority = priority;
+
+-#ifndef __OpenBSD__
- ret = sched_setscheduler(0, SCHED_RR, &param);
-+
-+ ret = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
+-#else
+ ret = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
+-#endif
+-
if (ret != 0) {
log_info("Failed to set real-time scheduling priority to %d.", priority);
return;
+ }
++
+ log_info("Set real-time scheduling priority to %d", priority);
+ }
+