[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0594e91261: Fix processing of emacs:window_id inside DND messages
From: |
Po Lu |
Subject: |
master 0594e91261: Fix processing of emacs:window_id inside DND messages if it already exists |
Date: |
Sat, 26 Mar 2022 06:15:25 -0400 (EDT) |
branch: master
commit 0594e9126167c64c8315c1e44d3f61c530259755
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix processing of emacs:window_id inside DND messages if it already exists
* src/haiku_support.cc (MessageReceived): Use DropPoint instead
of getting it manually.
(be_drag_message): Replace window_id if it already exists.
---
src/haiku_support.cc | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index a1616258bc..39df06e436 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -725,17 +725,16 @@ public:
&& windowid == this->window_id)
return;
- if (msg->FindPoint ("_drop_point_", &whereto) == B_OK)
- {
- this->ConvertFromScreen (&whereto);
+ whereto = msg->DropPoint ();
- rq.window = this;
- rq.message = DetachCurrentMessage ();
- rq.x = whereto.x;
- rq.y = whereto.y;
+ this->ConvertFromScreen (&whereto);
- haiku_write (DRAG_AND_DROP_EVENT, &rq);
- }
+ rq.window = this;
+ rq.message = DetachCurrentMessage ();
+ rq.x = whereto.x;
+ rq.y = whereto.y;
+
+ haiku_write (DRAG_AND_DROP_EVENT, &rq);
}
else if (msg->GetPointer ("menuptr"))
{
@@ -4084,7 +4083,9 @@ be_drag_message (void *view, void *message, bool
allow_same_view,
block_input_function ();
- if (!allow_same_view)
+ if (!allow_same_view &&
+ (msg->ReplaceInt32 ("emacs:window_id", window->window_id)
+ == B_NAME_NOT_FOUND))
msg->AddInt32 ("emacs:window_id", window->window_id);
if (!vw->LockLooper ())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0594e91261: Fix processing of emacs:window_id inside DND messages if it already exists,
Po Lu <=