Add SUPER+Drag to drag the window
This commit is contained in:
1 parent
5a5d08080c
commit
7e1d16e671
4 files changed
+19
No files matched your search
@@ -193,6 +193,7 @@ pub enum KeyAssignment {
|
||||
OpenLinkAtMouseCursor,
|
||||
CompleteSelection(ClipboardCopyDestination),
|
||||
CompleteSelectionOrOpenLinkAtMouseCursor(ClipboardCopyDestination),
|
||||
StartWindowDrag,
|
||||
|
||||
AdjustPaneSize(PaneDirection, usize),
|
||||
ActivatePaneDirection(PaneDirection),
|
||||
@@ -532,6 +533,14 @@ impl InputMap {
|
||||
},
|
||||
PasteFrom(ClipboardPasteSource::PrimarySelection)
|
||||
],
|
||||
[
|
||||
Modifiers::SUPER,
|
||||
MouseEventTrigger::Drag {
|
||||
streak: 1,
|
||||
button: MouseButton::Left,
|
||||
},
|
||||
StartWindowDrag
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ brief notes about them may accumulate here.
|
||||
* Fixed: line-based mouse selection (default: triple click) now extends forwards to include wrapped lines. [#466](https://github.com/wez/wezterm/issues/466)
|
||||
* New: introduced [custom_block_glyphs](config/lua/config/custom_block_glyphs.md) option to ensure that block glyphs don't have gaps. [#433](https://github.com/wez/wezterm/issues/433)
|
||||
* Fixed: the [RIS](https://vt100.net/docs/vt510-rm/RIS) escape wasn't clearing the scrollback. [#511](https://github.com/wez/wezterm/issues/511)
|
||||
* New: you can now drag the wezterm window via the tab bar
|
||||
* New: holding SUPER+Drag will drag the wezterm window. This is assignable, but not yet documented.
|
||||
|
||||
### 20210203-095643-70a364eb
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ pub struct TermWindow {
|
||||
scroll_drag_start: Option<isize>,
|
||||
split_drag_start: Option<PositionedSplit>,
|
||||
window_drag_position: Option<MouseEvent>,
|
||||
current_mouse_event: Option<MouseEvent>,
|
||||
prev_cursor: PrevCursorPos,
|
||||
last_scroll_info: RenderableDimensions,
|
||||
|
||||
@@ -262,6 +263,7 @@ impl WindowCallbacks for TermWindow {
|
||||
scroll_drag_start: self.scroll_drag_start.clone(),
|
||||
split_drag_start: self.split_drag_start.clone(),
|
||||
window_drag_position: None,
|
||||
current_mouse_event: None,
|
||||
prev_cursor: self.prev_cursor.clone(),
|
||||
last_scroll_info: self.last_scroll_info.clone(),
|
||||
clipboard_contents: Arc::clone(&clipboard_contents),
|
||||
@@ -477,6 +479,7 @@ impl TermWindow {
|
||||
scroll_drag_start: None,
|
||||
split_drag_start: None,
|
||||
window_drag_position: None,
|
||||
current_mouse_event: None,
|
||||
prev_cursor: PrevCursorPos::new(),
|
||||
last_scroll_info: RenderableDimensions::default(),
|
||||
clipboard_contents: Arc::clone(&clipboard_contents),
|
||||
@@ -1251,6 +1254,9 @@ impl TermWindow {
|
||||
ExtendSelectionToMouseCursor(mode) => {
|
||||
self.extend_selection_at_mouse_cursor(*mode, pane)
|
||||
}
|
||||
StartWindowDrag => {
|
||||
self.window_drag_position = self.current_mouse_event.clone();
|
||||
}
|
||||
OpenLinkAtMouseCursor => {
|
||||
// They clicked on a link, so let's open it!
|
||||
// We need to ensure that we spawn the `open` call outside of the context
|
||||
|
||||
@@ -24,6 +24,8 @@ impl super::TermWindow {
|
||||
None => return,
|
||||
};
|
||||
|
||||
self.current_mouse_event.replace(event.clone());
|
||||
|
||||
let config = &self.config;
|
||||
// Round the x coordinate so that we're a bit more forgiving of
|
||||
// the horizontal position when selecting cells
|
||||
|
||||
Reference in new issue
Block a user