detached 21a8658

chore(cef): prepare touchpad branch for review

commit
21a8658c478c2e166bd132959215a523e0436c62
author
brice · · 2026-06-08 21:02 UTC
parent
8453767
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
5 files · +18 -14
M docs/config/index.md +2 -0
@@ -203,6 +203,8 @@ border = "#363636"
203203 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 | Minimum accumulated horizontal swipe delta required for navigation |
204204 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 | Maximum vertical-to-horizontal delta ratio allowed for navigation swipes |
205205 | `default_ui_scale` | float | `1.0` | > 0 | GTK widget UI scale (1.0=100%, 2.0=200%) |
206+
207+`engine.cef.input.touchpad_navigation_min_delta` uses raw GTK touchpad surface units for back/forward gestures. The default `200.0` matches WebKit-style commit distance to reduce accidental navigation; raise or lower it in `config.toml` to tune gesture sensitivity.
206208 | `default_webpage_zoom` | float | `1.2` | > 0 | Default page zoom (1.0=100%, 1.2=120%) |
207209
208210 ## Workspace Configuration
@@ -203,6 +203,8 @@ border = "#363636"
203 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 | Minimum accumulated horizontal swipe delta required for navigation |203 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 | Minimum accumulated horizontal swipe delta required for navigation |
204 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 | Maximum vertical-to-horizontal delta ratio allowed for navigation swipes |204 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 | Maximum vertical-to-horizontal delta ratio allowed for navigation swipes |
205 | `default_ui_scale` | float | `1.0` | > 0 | GTK widget UI scale (1.0=100%, 2.0=200%) |205 | `default_ui_scale` | float | `1.0` | > 0 | GTK widget UI scale (1.0=100%, 2.0=200%) |
206+
207+`engine.cef.input.touchpad_navigation_min_delta` uses raw GTK touchpad surface units for back/forward gestures. The default `200.0` matches WebKit-style commit distance to reduce accidental navigation; raise or lower it in `config.toml` to tune gesture sensitivity.
206 | `default_webpage_zoom` | float | `1.2` | > 0 | Default page zoom (1.0=100%, 1.2=120%) |208 | `default_webpage_zoom` | float | `1.2` | > 0 | Default page zoom (1.0=100%, 1.2=120%) |
207 209
208 ## Workspace Configuration210 ## Workspace Configuration
M docs/reference/configuration.md +2 -0
@@ -73,6 +73,8 @@
7373 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 |
7474 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 |
7575 | `default_ui_scale` | float | `1.0` | > 0 |
76+
77+`engine.cef.input.touchpad_navigation_min_delta` is measured in raw GTK touchpad surface units. The default `200.0` matches WebKit-style commit distance to reduce accidental back/forward navigation and can be overridden in `config.toml`.
7678 | `default_webpage_zoom` | float | `1.2` | > 0 |
7779 | `workspace.new_pane_url` | string | `about:blank` | |
7880 | `workspace.switch_to_tab_on_move` | bool | `true` | |
@@ -73,6 +73,8 @@
73 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 |73 | `engine.cef.input.touchpad_navigation_min_delta` | float | `200.0` | > 0 |
74 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 |74 | `engine.cef.input.touchpad_navigation_max_vertical_ratio` | float | `0.5` | > 0 |
75 | `default_ui_scale` | float | `1.0` | > 0 |75 | `default_ui_scale` | float | `1.0` | > 0 |
76+
77+`engine.cef.input.touchpad_navigation_min_delta` is measured in raw GTK touchpad surface units. The default `200.0` matches WebKit-style commit distance to reduce accidental back/forward navigation and can be overridden in `config.toml`.
76 | `default_webpage_zoom` | float | `1.2` | > 0 |78 | `default_webpage_zoom` | float | `1.2` | > 0 |
77 | `workspace.new_pane_url` | string | `about:blank` | |79 | `workspace.new_pane_url` | string | `about:blank` | |
78 | `workspace.switch_to_tab_on_move` | bool | `true` | |80 | `workspace.switch_to_tab_on_move` | bool | `true` | |
M go.mod +1 -3
@@ -7,7 +7,7 @@ require (
77 github.com/andybalholm/brotli v1.2.1
88 github.com/bnema/purego v0.11.0-bnema.3
99 github.com/bnema/purego-cef v0.13.2
10- github.com/bnema/purego-cef2gtk v0.7.0
10+ github.com/bnema/purego-cef2gtk v0.7.1-0.20260608204515-03f646765b43
1111 github.com/bnema/purego-pipewire v0.1.4
1212 github.com/bnema/purego-sqlite v0.1.3
1313 github.com/bnema/puregotk v0.6.0
@@ -83,5 +83,3 @@ require (
8383 )
8484
8585 tool github.com/a-h/templ/cmd/templ
86-
87-replace github.com/bnema/purego-cef2gtk => ../purego-cef2gtk
@@ -7,7 +7,7 @@ require (
7 github.com/andybalholm/brotli v1.2.17 github.com/andybalholm/brotli v1.2.1
8 github.com/bnema/purego v0.11.0-bnema.38 github.com/bnema/purego v0.11.0-bnema.3
9 github.com/bnema/purego-cef v0.13.29 github.com/bnema/purego-cef v0.13.2
10- github.com/bnema/purego-cef2gtk v0.7.010+ github.com/bnema/purego-cef2gtk v0.7.1-0.20260608204515-03f646765b43
11 github.com/bnema/purego-pipewire v0.1.411 github.com/bnema/purego-pipewire v0.1.4
12 github.com/bnema/purego-sqlite v0.1.312 github.com/bnema/purego-sqlite v0.1.3
13 github.com/bnema/puregotk v0.6.013 github.com/bnema/puregotk v0.6.0
@@ -83,5 +83,3 @@ require (
83 )83 )
84 84
85 tool github.com/a-h/templ/cmd/templ85 tool github.com/a-h/templ/cmd/templ
86-
87-replace github.com/bnema/purego-cef2gtk => ../purego-cef2gtk
M go.sum +2 -2 generated file: collapsed
M internal/infrastructure/cef/webview.go +11 -9
@@ -1523,7 +1523,7 @@ func (wv *WebView) handleScrollInputDiagnostic(event cef2gtk.ScrollEvent) cef2gt
15231523 wv.inputDiagLastLog = now
15241524 wv.inputDiagMu.Unlock()
15251525
1526- logging.FromContext(wv.ctx).Debug().
1526+ logging.FromContext(wv.ctx).Trace().
15271527 Uint64("webview_id", uint64(wv.id)).
15281528 Int("events", count).
15291529 Str("phase", fmt.Sprint(event.Phase)).
@@ -1544,20 +1544,22 @@ func (wv *WebView) handleScrollInputDiagnostic(event cef2gtk.ScrollEvent) cef2gt
15441544 }
15451545
15461546 func (wv *WebView) handleNavigationSwipeAction(action cef2gtk.NavigationSwipeAction) {
1547- logging.FromContext(wv.ctx).Debug().
1548- Uint64("webview_id", uint64(wv.id)).
1549- Str("action", fmt.Sprint(action)).
1550- Bool("can_go_back", wv.CanGoBack()).
1551- Bool("can_go_forward", wv.CanGoForward()).
1552- Msg("cef: touchpad navigation swipe recognized")
1547+ if wv.ctx != nil {
1548+ logging.FromContext(wv.ctx).Debug().
1549+ Uint64("webview_id", uint64(wv.id)).
1550+ Str("action", fmt.Sprint(action)).
1551+ Bool("can_go_back", wv.CanGoBack()).
1552+ Bool("can_go_forward", wv.CanGoForward()).
1553+ Msg("cef: touchpad navigation swipe recognized")
1554+ }
15531555
15541556 switch action {
15551557 case cef2gtk.NavigationSwipeBack:
1556- if err := wv.GoBack(wv.ctx); err != nil {
1558+ if err := wv.GoBack(wv.ctx); err != nil && wv.ctx != nil {
15571559 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad back navigation failed")
15581560 }
15591561 case cef2gtk.NavigationSwipeForward:
1560- if err := wv.GoForward(wv.ctx); err != nil {
1562+ if err := wv.GoForward(wv.ctx); err != nil && wv.ctx != nil {
15611563 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad forward navigation failed")
15621564 }
15631565 }
@@ -1523,7 +1523,7 @@ func (wv *WebView) handleScrollInputDiagnostic(event cef2gtk.ScrollEvent) cef2gt
1523 wv.inputDiagLastLog = now1523 wv.inputDiagLastLog = now
1524 wv.inputDiagMu.Unlock()1524 wv.inputDiagMu.Unlock()
1525 1525
1526- logging.FromContext(wv.ctx).Debug().1526+ logging.FromContext(wv.ctx).Trace().
1527 Uint64("webview_id", uint64(wv.id)).1527 Uint64("webview_id", uint64(wv.id)).
1528 Int("events", count).1528 Int("events", count).
1529 Str("phase", fmt.Sprint(event.Phase)).1529 Str("phase", fmt.Sprint(event.Phase)).
@@ -1544,20 +1544,22 @@ func (wv *WebView) handleScrollInputDiagnostic(event cef2gtk.ScrollEvent) cef2gt
1544 }1544 }
1545 1545
1546 func (wv *WebView) handleNavigationSwipeAction(action cef2gtk.NavigationSwipeAction) {1546 func (wv *WebView) handleNavigationSwipeAction(action cef2gtk.NavigationSwipeAction) {
1547- logging.FromContext(wv.ctx).Debug().1547+ if wv.ctx != nil {
1548- Uint64("webview_id", uint64(wv.id)).1548+ logging.FromContext(wv.ctx).Debug().
1549- Str("action", fmt.Sprint(action)).1549+ Uint64("webview_id", uint64(wv.id)).
1550- Bool("can_go_back", wv.CanGoBack()).1550+ Str("action", fmt.Sprint(action)).
1551- Bool("can_go_forward", wv.CanGoForward()).1551+ Bool("can_go_back", wv.CanGoBack()).
1552- Msg("cef: touchpad navigation swipe recognized")1552+ Bool("can_go_forward", wv.CanGoForward()).
1553+ Msg("cef: touchpad navigation swipe recognized")
1554+ }
1553 1555
1554 switch action {1556 switch action {
1555 case cef2gtk.NavigationSwipeBack:1557 case cef2gtk.NavigationSwipeBack:
1556- if err := wv.GoBack(wv.ctx); err != nil {1558+ if err := wv.GoBack(wv.ctx); err != nil && wv.ctx != nil {
1557 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad back navigation failed")1559 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad back navigation failed")
1558 }1560 }
1559 case cef2gtk.NavigationSwipeForward:1561 case cef2gtk.NavigationSwipeForward:
1560- if err := wv.GoForward(wv.ctx); err != nil {1562+ if err := wv.GoForward(wv.ctx); err != nil && wv.ctx != nil {
1561 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad forward navigation failed")1563 logging.FromContext(wv.ctx).Warn().Err(err).Msg("touchpad forward navigation failed")
1562 }1564 }
1563 }1565 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close