Skip to content

Commit

Permalink
Prevent use parent-frame parameter on winit for now
Browse files Browse the repository at this point in the history
  • Loading branch information
declantsien committed Apr 14, 2024
1 parent cbf2d8f commit 03bd58e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/emacs-sys/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ impl FrameRef {
};
f.set_parent(parent_frame);
f.store_param(FrameParam::ParentFrame, parent_frame);

if cfg!(have_winit) && parent_frame.is_not_nil() {
error!("Winit currently doesn't support parent-frame parameter");
}

let unsplittable =
f.is_minibuf_only() || dpyinfo.gui_arg(params, FrameParam::Unsplittable).is_t();
f.set_no_split(unsplittable);
Expand Down
10 changes: 10 additions & 0 deletions lisp/term/winit-win.el
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,16 @@ This returns an error if any Emacs frames are X frames."
;; Initiate drag and drop
;; TODO


(defun child-frame-support-p ()
"Winit currently doesn't support child frame."
nil)

(eval-after-load 'posframe
(advice-add 'posframe-workable-p :override 'child-frame-support-p))
(eval-after-load 'corfu
(advice-add 'corfu--popup-support-p :override 'child-frame-support-p))


(provide 'winit-win)
(provide 'term/winit-win)
Expand Down

0 comments on commit 03bd58e

Please sign in to comment.