summaryrefslogtreecommitdiff
path: root/x11/wofi/files/patch-glib-2.56
diff options
context:
space:
mode:
Diffstat (limited to 'x11/wofi/files/patch-glib-2.56')
-rw-r--r--x11/wofi/files/patch-glib-2.5622
1 files changed, 15 insertions, 7 deletions
diff --git a/x11/wofi/files/patch-glib-2.56 b/x11/wofi/files/patch-glib-2.56
index d0057e833751..0e010bb48e23 100644
--- a/x11/wofi/files/patch-glib-2.56
+++ b/x11/wofi/files/patch-glib-2.56
@@ -9,9 +9,17 @@ ld: error: undefined symbol: g_app_info_launch_uris_finish
>>> referenced by drun.c
>>> wofi@exe/modes_drun.c.o:(launch_done)
---- modes/drun.c.orig 2020-03-10 05:37:36 UTC
+--- modes/drun.c.orig 2020-07-28 23:18:44 UTC
+++ modes/drun.c
-@@ -315,6 +315,7 @@ struct widget* wofi_drun_get_widget(void) {
+@@ -19,6 +19,7 @@
+ #include <libgen.h>
+
+ #include <sys/stat.h>
++#include <errno.h>
+
+ #include <map.h>
+ #include <utils.h>
+@@ -373,6 +374,7 @@ struct widget* wofi_drun_get_widget(void) {
return NULL;
}
@@ -19,18 +27,18 @@ ld: error: undefined symbol: g_app_info_launch_uris_finish
static void launch_done(GObject* obj, GAsyncResult* result, gpointer data) {
GError* err = NULL;
if(g_app_info_launch_uris_finish(G_APP_INFO(obj), result, &err)) {
-@@ -329,6 +330,7 @@ static void launch_done(GObject* obj, GAsyncResult* re
+@@ -387,6 +389,7 @@ static void launch_done(GObject* obj, GAsyncResult* re
}
exit(1);
}
+#endif
- void wofi_drun_exec(const gchar* cmd) {
- GDesktopAppInfo* info = g_desktop_app_info_new_from_filename(cmd);
-@@ -338,7 +340,14 @@ void wofi_drun_exec(const gchar* cmd) {
- printf("%s\n", g_app_info_get_commandline(G_APP_INFO(info)));
+ static void set_dri_prime(GDesktopAppInfo* info) {
+ bool dri_prime = g_desktop_app_info_get_boolean(info, "PrefersNonDefaultGPU");
+@@ -404,7 +407,14 @@ void wofi_drun_exec(const gchar* cmd) {
exit(0);
} else {
+ set_dri_prime(info);
+#if GLIB_CHECK_VERSION(2, 60, 0)
g_app_info_launch_uris_async(G_APP_INFO(info), NULL, NULL, NULL, launch_done, (gchar*) cmd);
+#else