fix: drag file in x11 app fail

update readme
This commit is contained in:
DreamMaoMao 2025-02-17 15:13:28 +08:00
parent 6287b292fe
commit 5f1aa15a35
2 changed files with 7 additions and 10 deletions

View file

@ -86,7 +86,6 @@ cp wallpaper ~/.config/maomao/ -r
the config file is `~/.config/maomao/config.conf`
the autostart file is `~/.config/maomao/autostart.sh`
# Due to the project is in preliminary development stage, there may be some crash bug, if you have encountered collapse is unusual, please open the issue, and provide the `~/.config/maomao/crash.log`.
# thanks for some refer repo
- https://github.com/dqrk0jeste/owl - for basal window animaition

View file

@ -1603,6 +1603,10 @@ buttonpress(struct wl_listener *listener, void *data) {
const MouseBinding *b;
struct wlr_surface *surface;
struct wlr_surface *old_pointer_focus_surface =
seat->pointer_state.focused_surface;
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
switch (event->state) {
@ -1617,7 +1621,7 @@ buttonpress(struct wl_listener *listener, void *data) {
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
focusclient(c, 1);
if (!surface)
if (surface != old_pointer_focus_surface)
wlr_seat_pointer_notify_clear_focus(seat);
keyboard = wlr_seat_get_keyboard(seat);
@ -2644,8 +2648,6 @@ void dwl_ipc_output_release(struct wl_client *client,
void focusclient(Client *c, int lift) {
struct wlr_surface *old_keyboard_focus_surface =
seat->keyboard_state.focused_surface;
struct wlr_surface *old_pointer_focus_surface =
seat->pointer_state.focused_surface;
if (locked)
return;
@ -2660,13 +2662,9 @@ void focusclient(Client *c, int lift) {
if (c && lift)
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
if (c && client_surface(c) == old_keyboard_focus_surface &&
client_surface(c) == old_pointer_focus_surface)
if (c && client_surface(c) == old_keyboard_focus_surface)
return;
else {
wlr_seat_pointer_notify_clear_focus(seat);
wlr_seat_keyboard_notify_clear_focus(seat);
}
if (c && c->mon && c->mon != selmon) {
selmon = c->mon;