|
|
commit 736c20f7a2ee0ab2b40850e3872844c584c576c0
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Aug 31 10:43:10 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Aug 31 10:43:10 2022 +0200
Wayland platform: remove redirection of stderr.
libdecor/build/Makefile | 4 ++--
libdecor/build/fl_libdecor.c | 4 ----
src/CMakeLists.txt | 2 +-
src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 2 +-
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git libdecor/build/Makefile libdecor/build/Makefile
index 0491b6a..b391e6b 100644
--- libdecor/build/Makefile
+++ libdecor/build/Makefile
@@ -44,10 +44,10 @@ depend:
: echo "libdecor/build: make depend..."
fl_libdecor.o : fl_libdecor.c ../src/libdecor.c ../../src/xdg-shell-protocol.c ../../src/xdg-decoration-protocol.c ../../src/text-input-protocol.c
- $(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"/usr/local/lib/libdecor/plugins-1\"
+ $(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"\"
fl_libdecor-plugins.o : fl_libdecor-plugins.c ../src/plugins/cairo/libdecor-cairo.c
- $(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor-plugins.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"/usr/local/lib/libdecor/plugins-1\"
+ $(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor-plugins.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"\"
libdecor-cairo-blur.o : ../src/plugins/cairo/libdecor-cairo-blur.c
$(CC) $(CFLAGS_DECOR) -c ../src/plugins/cairo/libdecor-cairo-blur.c
diff --git libdecor/build/fl_libdecor.c libdecor/build/fl_libdecor.c
index a091555..a4d3e81 100644
--- libdecor/build/fl_libdecor.c
+++ libdecor/build/fl_libdecor.c
@@ -111,16 +111,12 @@ LIBDECOR_EXPORT struct libdecor *libdecor_new(struct wl_display *wl_display, str
wl_callback_add_listener(context->init_callback, &init_wl_display_callback_listener, context);
wl_list_init(&context->frames);
// attempt to dynamically load a libdecor plugin with dlopen()
- FILE *old_stderr = stderr;
- stderr = fopen("/dev/null", "w+"); // avoid "Couldn't open plugin directory" messages
if (init_plugins(context) != 0) { // attempt to load plugin by dlopen()
// no plug-in was found by dlopen(), use built-in plugin instead
// defined in the source code of the built-in plugin: libdecor-cairo.c or libdecor-gtk.c
extern const struct libdecor_plugin_description libdecor_plugin_description;
context->plugin = libdecor_plugin_description.constructor(context);
}
- fclose(stderr); // restore stderr as it was before
- stderr = old_stderr;
wl_display_flush(wl_display);
return context;
diff --git src/CMakeLists.txt src/CMakeLists.txt
index a9bc917..17f8674 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -502,7 +502,7 @@ if (OPTION_USE_WAYLAND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLIBDECOR_PLUGIN_DIR=${LIBDECOR_PLUGIN_DIR} ")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_SYSTEM_LIBDECOR")
else()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/src -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\\\"/usr/local/lib/libdecor/plugins-1\\\" ")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/src -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\\\"\\\" ")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SYSTEM_LIBDECOR=0 -DHAVE_MEMFD_CREATE -DHAVE_MKOSTEMP -DHAVE_POSIX_FALLOCATE")
endif (OPTION_USE_SYSTEM_LIBDECOR)
diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 29a0371..9ef33ad 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1119,6 +1119,7 @@ void Fl_Wayland_Screen_Driver::open_display_platform() {
Fl::fatal("No Wayland connection\n");
}
}
+puts("Using Wayland backend");
wl_list_init(&seats);
wl_list_init(&outputs);
@@ -1135,7 +1136,6 @@ void Fl_Wayland_Screen_Driver::open_display_platform() {
Fl::add_fd(wl_display_get_fd(wl_display), FL_READ, (Fl_FD_Handler)fd_callback, wl_display);
fl_create_print_window();
Fl_Wayland_System_Driver::too_late_to_disable = true;
-puts("Using Wayland backend");
}
void Fl_Wayland_Screen_Driver::close_display() {
[ Direct Link to Message ] | |
|
| |