Skip to content

Commit

Permalink
Fix double click open on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Sep 28, 2023
1 parent 9218f5a commit a8eb5c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Plugins/Qt/QTMGuiHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ QTMGuiHelper::eventFilter (QObject *obj, QEvent *event) {
if (event->type() == QEvent::FileOpen) {
static bool new_window_flag= false;
QFileOpenEvent* openEvent = static_cast<QFileOpenEvent *>(event);
const char* s = openEvent->file().toUtf8().constData();
string s= from_qstring(openEvent->file().toUtf8());
if (!is_empty (s)) {
//qDebug ("File Open Event %s", s);
const char *win= new_window_flag? ":new-window": ":current-window";
exec_delayed (scheme_cmd (list_object (symbol_object ("load-buffer"),
const char *win= new_window_flag? ":new-window": ":current-window";
exec_delayed (scheme_cmd (list_object (symbol_object ("load-buffer"),
object (url_system (s)), eval (win))));
}
new_window_flag= true;
return true;
} else {
Expand Down

0 comments on commit a8eb5c0

Please sign in to comment.