-
Notifications
You must be signed in to change notification settings - Fork 37
Support Wayland in desktop manager #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
f039615 to
b5ca268
Compare
configure.ac
Outdated
| [enable_x11="${enableval}"], | ||
| [enable_x11=yes]) | ||
|
|
||
| if test "x$enable_wayland" = "xno" && test "x&$enable_x11" = "xno"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if test "x$enable_wayland" = "xno" -a "x&$enable_x11" = "xno"; then
is shorter
|
|
||
| gio_modules="gthread-2.0 gio-unix-2.0 >= 2.18.0" | ||
| PKG_CHECK_MODULES(GIO, [$gio_modules]) | ||
| AC_SUBST(GIO_CFLAGS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think it's better to not separate GIO_FLAGS from the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we were calling e.g. PKG_CHECK_MODULES twice for those Gio packages and we aren't using just GIO_CFLAGS in a Makefile.am, but always as part of FM_CFLAGS, so I thought it might as well just be part of the rest.
| dest_w, dest_h); | ||
| #endif | ||
| } | ||
| else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This else does not make sense if no wayland enabled, it newer happens in that case because IS_X11 will be TRUE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and the compiler will the optimize it out and #ifdef HAVE_WAYLAND isn't needed, because it's not some Wayland-specific API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't be so sure about compiler optimization. And even if that is the case then using #if improves the code readability not enforcing the reader to make all the logic calculations, that really helps to not spend extra time on that.
| dest_w, dest_h); | ||
| if(IS_X11()) | ||
| { | ||
| #ifdef HAVE_X11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes no sense at all. If HAVE_X11 undefined then IS_X11 is FALSE, i.e. at this point HAVE_X11 is 100% defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The #ifdef's inside the if(IS_X11()) make sense, because else you get compiler errors due to it using X11-specific APIs that you won't have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, in such case enclose all if...else into #ifdef please.
| g_signal_connect(screen, "monitors-changed", G_CALLBACK(on_screen_size_changed), self); | ||
| if(IS_X11()) | ||
| { | ||
| #ifdef HAVE_X11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above, please. This #ifdef makes no sense.
|
Everything should work now, though I want to do a bit more testing (and of course finish lxde/libfm#70). Here's a new screenshot: |
|
@LStranger When will this patch be merged in? |
|
Please make it possible to build with wayland-only gtk+ build. Now the build fails with error |

This PR adds optional Wayland support to PCManFM's desktop manager through the GTK Layer Shell library.
To do:
This PR depends on lxde/libfm#70 for right-click menus to work properly.
I set the dependency on v0.5.2 of GTK Layer Shell even though it would successfully compile with earlier versions, because that's the version some issue that would make the
search_windowunusable got fixed.