|
|
@ -8,12 +8,8 @@ use glutin::{
|
|
|
|
};
|
|
|
|
};
|
|
|
|
use skia_safe::Rect;
|
|
|
|
use skia_safe::Rect;
|
|
|
|
|
|
|
|
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
|
|
|
|
use super::keyboard_manager::KeyboardManager;
|
|
|
|
use super::keyboard_manager::KeyboardManager;
|
|
|
|
use crate::bridge::UiCommand;
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
use crate::bridge::{SerialCommand, UiCommand};
|
|
|
|
use crate::bridge::{SerialCommand, UiCommand};
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
|
|
|
use crate::channel_utils::LoggingTx;
|
|
|
|
use crate::channel_utils::LoggingTx;
|
|
|
|
use crate::renderer::{Renderer, WindowDrawDetails};
|
|
|
|
use crate::renderer::{Renderer, WindowDrawDetails};
|
|
|
|
|
|
|
|
|
|
|
@ -166,19 +162,12 @@ impl MouseManager {
|
|
|
|
// If dragging and we haven't already sent a position, send a drag command
|
|
|
|
// If dragging and we haven't already sent a position, send a drag command
|
|
|
|
if self.dragging.is_some() && has_moved {
|
|
|
|
if self.dragging.is_some() && has_moved {
|
|
|
|
self.command_sender
|
|
|
|
self.command_sender
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
.send(SerialCommand::Drag {
|
|
|
|
.send(UiCommand::Drag {
|
|
|
|
|
|
|
|
button: self.dragging.as_ref().unwrap().to_owned(),
|
|
|
|
button: self.dragging.as_ref().unwrap().to_owned(),
|
|
|
|
grid_id: relevant_window_details.id,
|
|
|
|
grid_id: relevant_window_details.id,
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
})
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
.send(SerialCommand::Drag {
|
|
|
|
|
|
|
|
grid_id: relevant_window_details.id,
|
|
|
|
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
|
|
|
|
}.into())
|
|
|
|
}.into())
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
|
|
|
.ok();
|
|
|
|
.ok();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// otherwise, update the window_id_under_mouse to match the one selected
|
|
|
|
// otherwise, update the window_id_under_mouse to match the one selected
|
|
|
@ -214,22 +203,13 @@ impl MouseManager {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
self.command_sender
|
|
|
|
self.command_sender
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
.send(SerialCommand::MouseButton {
|
|
|
|
.send(UiCommand::MouseButton {
|
|
|
|
|
|
|
|
button: button_text.clone(),
|
|
|
|
button: button_text.clone(),
|
|
|
|
action,
|
|
|
|
action,
|
|
|
|
grid_id: details.id,
|
|
|
|
grid_id: details.id,
|
|
|
|
position: position.into(),
|
|
|
|
position: position.into(),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
})
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
.send(SerialCommand::MouseButton {
|
|
|
|
|
|
|
|
button: button_text.to_string(),
|
|
|
|
|
|
|
|
action,
|
|
|
|
|
|
|
|
grid_id: details.id,
|
|
|
|
|
|
|
|
position: position.into(),
|
|
|
|
|
|
|
|
}.into())
|
|
|
|
}.into())
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
|
|
|
.ok();
|
|
|
|
.ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -266,12 +246,8 @@ impl MouseManager {
|
|
|
|
.map(|details| details.id)
|
|
|
|
.map(|details| details.id)
|
|
|
|
.unwrap_or(0),
|
|
|
|
.unwrap_or(0),
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
};
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
}.into();
|
|
|
|
}.into();
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
|
|
|
for _ in 0..(new_y - previous_y).abs() {
|
|
|
|
for _ in 0..(new_y - previous_y).abs() {
|
|
|
|
self.command_sender.send(scroll_command.clone()).ok();
|
|
|
|
self.command_sender.send(scroll_command.clone()).ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -296,12 +272,8 @@ impl MouseManager {
|
|
|
|
.map(|details| details.id)
|
|
|
|
.map(|details| details.id)
|
|
|
|
.unwrap_or(0),
|
|
|
|
.unwrap_or(0),
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
position: self.drag_position.into(),
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
modifier_string: keyboard_manager.format_modifier_string(true),
|
|
|
|
};
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
}.into();
|
|
|
|
}.into();
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
|
|
|
for _ in 0..(new_x - previous_x).abs() {
|
|
|
|
for _ in 0..(new_x - previous_x).abs() {
|
|
|
|
self.command_sender.send(scroll_command.clone()).ok();
|
|
|
|
self.command_sender.send(scroll_command.clone()).ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
|