-
Notifications
You must be signed in to change notification settings - Fork 647
Check all dependencies for xcb/wayland #2142
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DaveDavenport
added a commit
that referenced
this pull request
Jun 14, 2025
* Start moving xcb-specific stuff to their own directory * Move some generic stuff from xcb.h to display.h * Build wayland protocols via meson * Display something on wayland with layer shell Based on sardemff7 previous wayland attempt * Continue work on wayland mode - Fix mouse support - Handle key repeats - Positioning - Fix periodic count updates * Move wayland stuff around * Make xcb and wayland implementations coexist * Factorize some view code * Avoid some indirections * Put most of view implementation in common * wayland: High DPI support * Avoid calling cleanup when display proxy is NULL * Add notes about Wayland support in README * Hack for recent versions of meson It seems like since meson 0.55.0, subprojects with name separators don't work at all (they were causing a warning before). This is a quick dirty fix, until we fix this upstream. Fixes #2 * Use TOP layer instead of OVERLAY on Wayland Overlay is reserved for lock screens and similar programs. Fixes #7 * Run indenter * Account for no active view state in various callbacks * Do not crash when no buffer in pool Was causing segfaults when window content updates too fast. * Fix font configuration on wayland Fixes #9 * Fix fullscreen in wayland mode Fixes #6 * wayland: set anchors on both size when auto-sizing See swaywm/wlroots#2422, swaywm/sway#5712 * Revert "Use TOP layer instead of OVERLAY on Wayland" This reverts commit dc1b159. Given the current options, it's probably better to show rofi on top of lock screens than not show it on top of full screen windows. Discussion: lbonn#12 lbonn#7 * Run indenter * Initial clipboard support for wayland Using wl_data and primary_selection protocols * Require wayland-protocols >= 1.17 Required for X11 clipboard support * [Meson] Fix version in rofi.pc rofi.pc: pkgconf version 1.7.0-wayland is invalid * [Doc] Update some wayland-specific information * re-organize dropped features list * add a list of user-maintained packages * [Doc] Update badges for this fork * [Doc] Fix link to INSTALL.md in README.md * Implement async clipboard support for Wayland This uses GIOChannels and the Glib event loop to read the file descriptor in an asynchronous fashion. * Remove unused/surplus xcb-related includes Includes in the rofi code base are a complete mess; there are many needless includes and many files rely on transitive includes. I used include-what-you-use tool to find them. There are much more, I cherry picked only suggestions relevant to the goal - allow building rofi without XCB dependencies. This doesn't break X11 support and it can be upstreamed (after rebasing and removing changes in wayland-stuff). * Allow build without X11/XCB backend * ci: generate tarballs * [CI] Polish * use recent meson with .gitattributes * add release upload * build with different flag combinations * 1.7.0+wayland1 * Set version to -dev * README: mention swayr * [Meson] Fix version in rofi.pc again rofi.pc: pkgconf version 1.7.0+wayland1 is invalid * [Doc] Add repology versions badge to INSTALL * Fix cursor size Default to a size of 24 pixels Use the environment variable XCURSOR_SIZE if it's set * [Wayland] Implement partial support for offset properties on window ...using zwlr_layer_surface_v1::set_margin. It's only partial because surface margin has effect only when the the window is located on edge of the screen, not in center. Also the anchor property is not implemented, the anchor point is always the edge of the window corresponding to the location property. * [Doc] update note about x-offset/y-offset * Set version to -dev * Set version to -dev * Readme: clarify and simplify wayland section * [Doc] Mention fork integration in nixpkgs * Set version to -dev * wayland: quick fix for changing height We use the surface size of a fullscreen layer to calculate screen size. But when height is recomputed and given as a percentage, this definition becomes self-referencing. Do a quick fix by caching the monitor resolution. * [Build] Fix meson distribution data/ should not be ignored anymore * wayland: fix some compiler warnings * Fix CI * Fix wayland-only build * [Window] Initial support for wayland window switcher The code still lacks a lot of features of XCB Window mode, but at least following should work: - Activate and Delete (close) actions - matching by window title - live update - icon lookup by app_id * [Window] Formatting support for Wayland window mode Use `window-format` to configure lines in the Wayland Window view. Note that only `{t}` (title) and `{c}` (class) are supported on Wayland. It is suggested to change the format string to `{c} {t}`. * Enable Window mode by default on wayland. * [Window] window-match-fields support for Wayland window mode The only supported fields are 'title' and 'app-id' ('class') due to a Wayland protocol limitations. * [Build] Fix update-manpage in release tarballs * Set -dev version * Reformat xcb/display.c To match xcb.c upstream (954fc72) * Wayland: Fix incomplete merge/refactor of xcb display * Wayland: fix wayland-only build * Fix for segfault after updating to KDE 5.26 * [WaylandWindow] Apply changes from b3c46d2: Add format option to disable padding with space the "window-format" entries. * [WaylandWindow] Remove redundant icon fetcher query. rofi_icon_fetcher is async, so we won't know which query succeeded on the first try. All subsequent attempts use cached_icon_uid, and the result of the first query will never be used. Do the same as XCB window mode and request only lowercase app_id. * [Doc] Update Fedora package link. rofi-wayland is available from the official Fedora repositories. * [Doc] Update on window mode in README * Fix redraw bug when changing window height See #59 * Wayland: real fullscreen support See #64 * Wayland: fix NULL pointer access * [Doc] remove some links to upstream rofi To not spam upstream project with wayland-related inquiries * Add information about the openSUSE package It is just a regular package in Factory. * Propose new PRs to go the 'wayland' branch, not the upstream one. 'next' branch is AFAIK for new contributions to the parent repo of this program, not our Wayland version. * [IconFetcher] Apply scaling when loading images and icons Partially fixes #45 * Wayland: Apply scaling to cursor surface Loading cursor theme and creating cursor surface are postponed to wayland_pointer_enter because we don't know the display scale in the early wayland_display_setup. Partially fixes #45 * Bump to 1.7.5+wayland2 A few bug fixes and features are worth releasing! * Set -dev version * Wayland: fix wayland-only mode again * Doc: Clarify issue template and CONTRIBUTING * [CI] Better test xcb and wayland-only builds * [Doc] Fix github issue templates * Pass the xkb `group` (a.k.a. `layout`) to `nk_bindings` The `group` is used by xkb to support switching between multiple layouts, without telling `nk_bindings` about this rofi always sees key presses as if they're in the first layout. * hover select * Revert "[IconFetcher] Apply scaling when loading images and icons" This reverts commit 2c0fcf9. * [IconFetcher] Re-introduce icon scaling on wayland This time, preserving ABI compatibility with upstream rofi Fixes #96 * Enable pango markup for -window-format in wayland Strings are already escaped when necessary. The x11 counterpart was implemented in #1288. * Restrict WM detection to XCB backend Fixes `rofi --help` after e409322 * [Window] Set mode type for Wayland implementation. Reformat to match other Mode definitions. The `.type` is required after d27cee8. * [Wayland] Support wl_output version 4. - Double-buffer the properties. - Fetch name, geometry and transform properties - we need these to calculate DPI and to implement `monitor` configuration field. * [Wayland] Print monitor layout * [Wayland] Support -m/-monitor <name>. Defer layer surface creation until we read the configuration and know the value of `config.monitor`. Wait for Wayland output details and try to select a matching output by name. Numeric values of -5..n are intentionally not supported, because * the order of `wl_output` globals is not defined and may change between sessions * the best we can do for -5..-1 is to let the compositor decide `wid:` in theory can be emulated via `xdg-foreign`, but that requires a regular `xdg_toplevel` instead of a layer surface. * [Wayland] Implement `config.dpi` support. The correct value of `config.dpi` is required to support physical units in the themes (e.g. `mm` `in sidebar-v2`). * [Doc] Update wayland limitations list * [Wayland] Fix crash during layer shell destruction Rofi will no longer crash if the current output is disconnected but will respawn on the next output chosen by the compositor Fixes #50 * Re-indent Wayland sources with clang-format * [Wayland] Clear `frame_cb` after destroying resources * [Wayland] Cursor types support * [Wayland] Compositor-side cursors via cursor-shape-v1 * Document ebuild for Gentoo in GURU Linking to the GURU installation instructions in gentoo wiki instead of enumerating them here to ensure it is less likely to bitrot. * [WaylandWindow] Unmap surface before sending activation request Fixes lbonn#117 * [WaylandWindow] Fix missing escaping * [Wayland] Fix remaining non-strict C prototypes * [Wayland] Fix implicit deps in view-internal.h * [Wayland] Inhibit compositor shortcuts ... with the dedicated wayland protocol. This way, rofi can re-use compositor bindings. The canonical example is window switching with Alt-Tab. * [Wayland] Update layer shell protocol version 2 -> 5 * [Wayland] Make bindings inhibitor opt-in Fixes #119 * [Build] Fix deprecated format() in meson.build In Wayland builds * [Config] Rename global-kbindings to global-kb * [Wayland] Fix last missing non-strict prototype * [Wayland] Fix axis events handling This was very buggy, we were counting the events twice... * always use pointer frame, it's available since v5 * drop axis handler * use axis_discrete or axis_120 (v >= 8) instead * fail on some protocol minimum version checks * simplify output protocol version check Fixes #120 * [WaylandWindow] Remove a scary log Happens when destroy() is called without previous init() * [Doc] Fix -global-kb docs And revert erroneous change in historical docs * Bump to 1.7.5+wayland3 * Set -dev version * [Wayland] Handle clipboard pasting more securely Only receive clipboard offers when pasting instead of storing the data indefinitely. This is also more performant by default as it is not doing unnecessary work. * [Wayland] Fix CodeQL overflow warning * Update documentation with the new rofi-wayland Arch package * wayland/display: Fix mmap use > From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail. - https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> * [Wayland] Fix touchpad scrolling Magic values were determined empirically... Fixes #134 * [Wayland] Add missing methods in wl_data_device_listener * Update rofi-sensible-terminal to include foot * Remove duplicated disable history code * Fixing incorrect link in INSTALL.md * Fix a shadowing warning * Fix imdkit detection config.h needs to be included before ifdef check... * Rofi 1.7.7+wayland1 * Set -dev version * Add tag in gh artifacts names * Rofi 1.7.8+wayland1 * Review files exported in tarballs * Wayland: fix key repeat rate Fixes #81 * Wayland: remove some dead code Found with Codacy https://app.codacy.com/gh/davatorium/rofi/pull-requests/2099 * Fix a merge conflict resolution error * Rofi 1.7.9+wayland1 * Set version to next's dev * Print some info about the display backend in --help * Sync back a lot of the docs with main rofi * Fix one outdated copyright notice * [Build] Remove autoconf tools. * Add `-info` option. Include wayland version. isssue: #2133 * Remove GCOV from help/info output. issue: #2133 * Remove some remaining m4 utils * Remove libgwater autotools directives * Remove autotools CI steps * Remove travis configuration * Restore issue threads CI workflows * Fix building error true->TRUE * Remove dead screenshot code * Clean up gitignore * Add xcb compile status in info Also try to make the option printing more consistent * [Issues] Add rofi -info to templates and documentation. issue: #2134 * [Build] Update build instructions for enabling/disabling wayland/x11 Also by default they both need to be available, you can disable depending on your needs. * Remove ternary operator from function call argument. * Restore doxygen check on CI * Fix github actions (hopefully) * [Build] Use auto-option for enabling/disabling wayland/xcb * Check all dependencies for xcb/wayland (#2142) * [Doc] Update build instructions with changes to backend selection. remove ref. to fork from README. * [Wayland] If there is one monitor use dpi of that monitor. * [Wayland] HiDPI: Try the first transparent frame trick * Revert dpi detection hacks - "[Wayland] HiDPI: Try the first transparent frame trick" commit 146c7b1. - "[Wayland] If there is one monitor use dpi of that monitor." commit 9afe543. * [Wayland] Estimate DPI from one detected monitor (#2148) * [Wayland] Estimate DPI from one detected monitor This will work for single-monitor setup Co-Authored-by: lbonn * [Wayland] Update the DPI estimation to also use monitor name if available. * [Doc] Update DPI setting for wayland in manpage. --------- Co-authored-by: Qball <qball@blame.services> --------- Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Co-authored-by: Jakub Jirutka <jakub@jirutka.cz> Co-authored-by: Quantum <quantum2048@gmail.com> Co-authored-by: Omar Zeghouani <59267627+ram02z@users.noreply.github.com> Co-authored-by: sporif <sporif@posteo.net> Co-authored-by: Aleksei Bavshin <alebastr89@gmail.com> Co-authored-by: waicool20 <waicool20@gmail.com> Co-authored-by: Matěj Cepl <mcepl@cepl.eu> Co-authored-by: MoetaYuko <loli@yuko.moe> Co-authored-by: Wim Looman <git@nemo157.com> Co-authored-by: ddmetz <77217897+ddmetz@users.noreply.github.com> Co-authored-by: Liao Junxuan <mikeljx@126.com> Co-authored-by: Jay Faulkner <jay@jvf.cc> Co-authored-by: Robin Candau <robincandau@protonmail.com> Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Co-authored-by: Onur <onurkalkanmv@gmail.com> Co-authored-by: SWarrener <120340315+SWarrener@users.noreply.github.com> Co-authored-by: Qball <qball@blame.services>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like one way to do it.