Commit graph

2313 commits

Author SHA1 Message Date
Aleksei Bavshin
cb6fd22118 [WaylandWindow] Unmap surface before sending activation request
Fixes lbonn/rofi#117
2024-02-26 19:32:40 +01:00
lbonn
a4c8135533 Merge remote-tracking branch 'upstream/next' into wayland 2024-02-18 11:40:11 +01:00
Dave Davenport
1c8159c4c8 [DRun] Drun read url field from cache. 2024-02-18 11:35:39 +01:00
lbonn
f539a08222
[Build] Reduce amount of warnings (#1944)
* one unused parameter in recursivebrowser.c
* overlength strings are overly pedantic, modern compilers support large
  strings
* __FUNCTION__ creeped back in after #288
2024-02-16 18:41:07 +01:00
lbonn
070c830a92 Merge remote-tracking branch 'upstream/next' into wayland 2024-02-16 17:54:10 +01:00
Dave Davenport
3a5f95d69e [View] Don't use xcb surface to render to png, but create surface. 2024-02-16 13:36:21 +01:00
Dave Davenport
831bddc68b [Box] When estimating height, set correct width on children
Issue: #1943
2024-02-15 09:13:37 +01:00
Qball Cow
13c2a61766 [ThreadPool] Sort items in the queue based on priority 2024-02-11 14:00:03 +01:00
Aleksei Bavshin
b88dddd1a1 [Wayland] Compositor-side cursors via cursor-shape-v1 2024-01-08 16:08:01 +01:00
Aleksei Bavshin
8f259ce9b0 [Wayland] Cursor types support 2024-01-08 16:08:01 +01:00
Aleksei Bavshin
1592525edb [Wayland] Clear frame_cb after destroying resources 2024-01-08 16:08:01 +01:00
Aleksei Bavshin
5bc2f09241 Re-indent Wayland sources with clang-format 2024-01-07 14:02:17 +01:00
lbonn
2520c1ea16 [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
2024-01-06 16:30:19 +01:00
Aleksei Bavshin
8ea79da037 [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`).
2024-01-05 17:10:52 +01:00
Aleksei Bavshin
ecdd2b2347 [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.
2024-01-05 17:10:52 +01:00
Aleksei Bavshin
22ec839f27 [Wayland] Print monitor layout 2024-01-05 17:10:52 +01:00
Aleksei Bavshin
53d99c49ad [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.
2024-01-05 17:10:52 +01:00
Aleksei Bavshin
ad784f1f0d [Window] Set mode type for Wayland implementation.
Reformat to match other Mode definitions.

The `.type` is required after d27cee8.
2024-01-05 17:10:52 +01:00
Aleksei Bavshin
9e09a0729d Restrict WM detection to XCB backend
Fixes `rofi --help` after e409322
2024-01-05 17:10:52 +01:00
Liao Junxuan
b29518f034 Enable pango markup for -window-format in wayland
Strings are already escaped when necessary. The x11 counterpart was implemented
in davatorium/rofi#1288.
2023-12-20 15:52:05 +01:00
Qball Cow
11d801ea9e [View] On mode switch force refilter instead of queuing.
issue: #1928
2023-12-17 17:26:34 +01:00
Dave Davenport
d042e20fff [View] Allow float delay
fixes: #1926
2023-12-08 13:51:04 +01:00
MoetaYuko
36621af0e4 [IconFetcher] Re-introduce icon scaling on wayland
This time, preserving ABI compatibility with upstream rofi

Fixes #96
2023-11-30 16:49:47 +01:00
lbonn
102e6de7a9 Revert "[IconFetcher] Apply scaling when loading images and icons"
This reverts commit 2c0fcf9da9.
2023-11-30 16:49:47 +01:00
ddmetz
78888dd80d hover select 2023-11-30 10:36:47 +01:00
Dave Davenport
b43a82f86d [View] Always forward motion to the grabbed widget first. 2023-11-24 12:26:24 +01:00
Dave Davenport
24c3258379 [IconFetcher] If last step fails to load icon, don't error out make warning 2023-11-16 15:25:40 +01:00
Dave Davenport
dbc1f8dcb4 [Dmenu][Script] Add 'display' row option to override whats displayed. 2023-11-06 20:02:48 +01:00
Dave Davenport
3c87321258 [DRun] Allow url field to be searched and fix c/p error
Issue: #1914
2023-10-31 13:24:37 +01:00
Dave Davenport
1481030947 [DRUN] Add {url} to drun-display-format.
Escape exec.

fixes: #1914
2023-10-31 11:28:45 +01:00
Wim Looman
5cd1e3ca2b 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.
2023-10-11 21:24:16 +02:00
Dave Davenport
c78179dcc8 [lexer] Add dmenu as enabled option for media type.
fixes: #1903
2023-10-03 21:06:53 +02:00
Dave Davenport
a6d297591e [XCB] Make sure that window maker is 0 terminated before usage.
Thanks to Omar Polo and bsdmp
2023-09-30 15:58:31 +02:00
vE5li
05327773d9
Fix text color when cursor-color is set (#1901)
* Fix text color when cursor color is set

* Add comment
2023-09-27 18:23:18 +02:00
Quentin Glidic
1243dca65b
gitmodules: Update libnkutils
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2023-09-25 18:04:32 +02:00
Dave Davenport
b5f1e97e0f [XCB] Try to be smarter with where mouse click started.
fixes: #1896
2023-09-24 20:06:08 +02:00
lbonn
7c79169309 Wayland: fix wayland-only mode again 2023-09-24 01:57:11 +02:00
lbonn
bb85634182 Merge remote-tracking branch 'upstream/next' into wayland 2023-09-14 17:37:40 +02:00
Nikita Zlobin
a53daa68c4 [View|Textbox] cleanups to drawing code 2023-08-29 21:36:03 +02:00
Nikita Zlobin
9b2b52b13e Clip text with extents rectangle
Fonts are not ideal, some characters have mismatch between reported and
painted size.
2023-08-27 21:10:00 +02:00
Dave Davenport
51a8df9da5 [Rofi] Expand cache-dir
Fixes: #1892
2023-08-24 19:46:29 +02:00
Dave Davenport
6caaf36df6 [Theme] Fix opening abs path if no/wrong extension (backward comp.) 2023-08-15 19:28:33 +02:00
Dave Davenport
ad06fb9516 [Theme] Try to fix importing of theme.
- Fix the two place of resolving into one method.
- Do not accept file in CWD.
- Prefer file if it exists in same directory as parent file that
  imported it.

fixes: #1889
2023-08-15 19:12:14 +02:00
Nikita Zlobin
528419269e script: Let script handle empty custom input 2023-08-11 08:51:00 +02:00
Nikita Zlobin
82f9605c30 widget_draw: clean useless calls in corner drawing
Signed-off-by: Dave Davenport <qball@gmpclient.org>
2023-07-24 22:56:00 +02:00
Nikita Zlobin
45688b0a53 Fix border segments stitch
Signed-off-by: Dave Davenport <qball@gmpclient.org>
2023-07-24 22:56:00 +02:00
Nikita Zlobin
386b92dace Remaining modi words in the code
Signed-off-by: Dave Davenport <qball@gmpclient.org>
2023-07-23 18:44:15 +02:00
Nikita Zlobin
81641d0f30 Better descriptions for sort options group
It's unobvious from documentation, that sort only works against filtered menu.

Signed-off-by: Dave Davenport <qball@gmpclient.org>
2023-07-23 18:44:15 +02:00
MoetaYuko
0b223c16f3 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
2023-07-23 14:10:10 +02:00
MoetaYuko
2c0fcf9da9 [IconFetcher] Apply scaling when loading images and icons
Partially fixes #45
2023-07-23 14:10:10 +02:00