Commit graph

2365 commits

Author SHA1 Message Date
lbonn
2baa809d8a Merge remote-tracking branch 'upstream/next' into wayland 2024-11-06 18:51:32 +01:00
lbonn
c38dc9a1d9 Re-indent recursivebrowser.c with clang-format 2024-11-04 10:12:06 +01:00
Dave Davenport
9d785b5ce1
Add -Wshadow to build system. (#2042)
* Add -Wshadow to build system.

Issue: #2036

* Take out unintended change

* [Icon] Add more descriptive variable name.
2024-10-20 12:54:13 +02:00
Dave Davenport
df7d8b65f0 [textbox] Fix aliasing variable name. (thanks to xsy420)
Issue: #2036
2024-10-18 22:01:09 +02:00
Dave Davenport
186b0e7be0 [Textbox] Use FontMetrics font height (if available) to get height 2024-10-03 17:32:53 +02:00
Qball Cow
7402e451e2 [Theme] Fixes recursion in double_inside
fixes: #2021
2024-09-01 09:56:03 +02:00
Amos Bird
558ab34aa3
Try to support modifiers in XIM again (#2015) 2024-08-02 18:39:36 +02:00
Amos Bird
8eb8ff3b6f
Better XIM interaction by filtering modifiers (#2000) 2024-07-09 20:51:23 +02:00
Amos Bird
8b612f08cf
Fix ime and enable build option (#1999) 2024-07-09 17:53:02 +02:00
lbonn
a7c03695c4 Fix some compiler warnings
* -Wno-inline in autoconf builds (was already in meson builds)
* Use non-deprecated name for g_spawn_check_wait_status
* Update libgwater
2024-07-08 23:17:40 +02:00
Dave Davenport
8f06e0a370 #1995: Disable history in password mode, move disabling into create_view. 2024-07-07 20:34:24 +02:00
lbonn
d88b475bad [Wayland] Add missing methods in wl_data_device_listener 2024-06-24 23:26:56 +02:00
giomatfois62
75ae2a41f0
[WIP] xdg thumbnails fetching with fallback on mimetype icons (#1939)
* implemented xdg thumbnails fetching with fallback on mimetype icons for menu entries in filebrowser mode

* included original license text

* added md5 header and source file

* implemented xdg compatible thumbnail's creation

* added -preview-cmd string option to program settings

* support custom command to create images for entries with thumbnail:// prefix

* fix custom thumbnailer command crash caused by null uri when entry is not a valid filename

* check entry_name is not NULL or empty when generating thumbnails;
use snprintf to avoid static analyzer complains

* avoid using gstrvbuilder to build thumbnailer command args

* fixed static analyzer complain about always wrong condition

* use g_spawn_check_exit_status to avoid bump to glib 2.70

* removed md5-c dependency and use glib checksum implementation

* fixed meson build after md5-c library removal

* support thumbnail generation in recursivebrowser mode

* restored check rofi_icon_fetcher_file_is_image

* create thumbnail directories if not existing

* use g_malloc0, g_strdup and g_strdup_printf

* fixed formatting with clang-format

* don't wait for jobs in execution when finalizing the icon fetcher worker threadpool

* destroy and rebuild the icon fetcher worker threadpool when the current page is changed

* added query_started boolean member to IconFetcherEntry;
check if an icon fetcher query was started on an IconFetcherEntry and submit the query again otherwise

* force icon cache lookup even if the item has a valid icon_fetch_uid (the fetching job could have been discarded before starting)

* search binaries in PATH when executing thumbnailer command

* mark icon query as not started in threadpool item free_func

* added listview page_changed_callback; rebuild icon fetcher threadpool in page_changed_callback

* [listview] Add missing code documentation param

* Create rofi-thumbnails.5.markdown

* Updated documentation with apparmor issues and workaround

* [Doc] Ship rofi-thumbnails.5

With some formatting fixes

* use a more compact thumbnailer example

---------

Co-authored-by: giomatfois62 <giomatfois62@yahoo.it>
Co-authored-by: Dave Davenport <DaveDavenport@users.noreply.github.com>
Co-authored-by: lbonn <github@lbonnans.net>
2024-06-21 18:47:38 +02:00
Istvan Petres
5133f50f30
Add -transient-window mode (#1988)
* Add -transient-window mode

This will add a new mode for the rofi window so when you run it with
-transient-window

instead of
-normal-window

it will get the currently focused window and then use that as the parent window and set itself as transient of that window.  It is useful so that when you  use a keyboard shortcut to start rofi it will always popup on the window you are working on and so it doesn't make you refocus/move your head on large monitors :)

* Fixed other windows to be focusable in transient mode

and added print_help_msg for this new -transient-window option.

* Added -transient-window option to doc too
2024-06-09 18:57:29 +02:00
lbonn
93ad86da10 [Wayland] Fix touchpad scrolling
Magic values were determined empirically...

Fixes #134
2024-06-07 00:14:29 +02:00
Nikita Zlobin
bd0ba45db8 Fix scrolling for vertical layout with horizontal packing
Current scrolling effect looks interesting, but impractical, when with
multiple columns.

Signed-off-by: Dave Davenport <qball@gmpclient.org>
2024-06-06 18:42:55 +02:00
Nikita Zlobin
753cd1e9e1 Place continuous scroll center in middle column
Signed-off-by: Dave Davenport <qball@gmpclient.org>
2024-06-06 18:42:55 +02:00
Qball Cow
dee97eb540 [Script] Fix keep-selection add keep-filter
Fixes: #1962
2024-05-12 21:35:26 +02:00
Qball Cow
9580c4a191 [RecursiveBrowser] Make implementation not recursive.
Do stat when DT_UNKNOWN is given back when reading directory.

Issue: #1954
2024-05-12 13:41:32 +02:00
Samuel Dionne-Riel
b04bedca44 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>
2024-05-05 21:05:47 +02:00
lbonn
51dec9d65b Merge remote-tracking branch 'upstream/next' into wayland 2024-05-04 12:29:49 +02:00
ortango
5b9939b287
Add border_width to window coordinates (#1969)
* Update xcb.c

window coors relative to border_width.

* Add border_width to window coordinates

Normalize the geometry between reparenting and non- window managers.

* remove WM_ROOT_WINDOW_OFFSET

* remove WM_ROOT_WINDOW_OFFSET
* only translate reparent
2024-04-25 16:14:39 +02:00
Dave Davenport
9b6e70b365 [IconFetcher] Don't check for extension for image file.
Issue: 1977
2024-04-18 22:32:50 +02:00
martinsifrar
4f098751cd
[IconFetcher] Fix failing decode of animated GIFs. (#1975) 2024-04-15 12:56:09 +02:00
Dave Davenport
1063b6ec05 [Run] Store display and exec string 2024-03-11 12:32:12 +01:00
Dave Davenport
04f16052a9 [Run] Don't re-quote history items. 2024-03-11 12:04:08 +01:00
lbonn
9cae4a9b61
[Modes] Remove dead code in mode implems (#1960)
NEXT, PREVIOUS and QUICK_SWITCH are handled in mode.c since
96cd34d24f (#1184)
2024-03-11 11:07:29 +01:00
Dave Davenport
af6fb83a51 [View] Work around GThreadPool 1 pointer bug.
* Also fix typo in icon fetcher.
2024-03-08 09:38:15 +01:00
lbonn
47ae31eb5d [Wayland] Fix CodeQL overflow warning 2024-03-06 11:54:20 +01:00
lbonn
d8ba203f6e [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.
2024-03-06 10:19:24 +01:00
Dave Davenport
3d29715e1e [IconFetcher] Don't free on removal from thread-pool 2024-03-02 19:38:05 +01:00
lbonn
ccea31234a [WaylandWindow] Remove a scary log
Happens when destroy() is called without previous init()
2024-03-01 18:26:23 +01:00
Dave Davenport
8061e4e7c2 Add an item-free method to the thread-pool 2024-03-01 15:28:48 +01:00
lbonn
37b8e9fb99 [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
2024-03-01 11:27:45 +01:00
lbonn
217d6c46d4 [Wayland] Fix last missing non-strict prototype 2024-02-29 10:30:52 +01:00
Qball Cow
42d6bb9af4 [Window] write code so clang-check does not complain about leak.
Does not solve the possible, but very unlikely leak, but keeps
clang-check happy.
2024-02-29 00:00:36 +01:00
Dave Davenport
afc65ac125 [script|dmenu] Add option to make row permanent.
fixes: #1952
2024-02-28 20:47:18 +01:00
lbonn
2a8380f260 [Config] Rename global-kbindings to global-kb 2024-02-28 12:02:53 +01:00
lbonn
ccb8385d93 Merge remote-tracking branch 'upstream/next' into wayland 2024-02-28 09:31:31 +01:00
lbonn
0cec298f91 [Wayland] Make bindings inhibitor opt-in
Fixes #119
2024-02-28 09:29:04 +01:00
Qball Cow
f2c0f75fd2 [run] fix missing doxygen and add explanation. 2024-02-28 00:54:23 +01:00
Qball Cow
ee1b68aea6 [Run] When passing raw entry, pass it unquoted to history
fixes: #1951
2024-02-28 00:46:23 +01:00
Dave Davenport
eae65b2c07 Replace deprecated g_memdup by g_memdup2 2024-02-27 20:53:26 +01:00
Dave Davenport
3a97e0cb91 Replace deprecated by g_memdup to g_memdup2 2024-02-27 20:47:51 +01:00
lbonn
d53738170c [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.
2024-02-27 14:09:18 +01:00
lbonn
d2ad9fe828 [Wayland] Fix remaining non-strict C prototypes 2024-02-27 13:34:41 +01:00
lbonn
6c1a425d87 [WaylandWindow] Fix missing escaping 2024-02-27 13:31:02 +01:00
lbonn
54a2c45120 Merge remote-tracking branch 'upstream/next' into wayland 2024-02-27 13:29:54 +01:00
Aleksei Bavshin
cb6fd22118 [WaylandWindow] Unmap surface before sending activation request
Fixes lbonn/rofi#117
2024-02-26 19:32:40 +01:00
Qball Cow
43790b3eda Fix compiler warnings in window mode. 2024-02-25 23:39:05 +01:00