Skip to content

Commit

Permalink
Fixed Qt's context stealing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Apr 15, 2016
1 parent d68c88f commit 5c1c438
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controller.lisp
Expand Up @@ -188,6 +188,12 @@
(dolist (scene (loops controller))
(unpack (resource-pathname "quicksave.sav") scene)))

(defclass acquire-context (event)
())

(define-handler (controller acquire-context) (ev)
(acquire-context *main*))

(defclass execute (event)
((func :initarg :func :reader func)
(bindings :initarg :bindings :reader bindings)
Expand Down
1 change: 1 addition & 0 deletions editor/editor.lisp
Expand Up @@ -62,6 +62,7 @@

(define-subwidget (editor game-view) (q+:make-qmdisubwindow editor)
(setf (q+:widget game-view) main)
(setf (parent main) game-view)
(setf (q+:window-title game-view) "Game View")
(q+:add-sub-window area game-view))

Expand Down
3 changes: 3 additions & 0 deletions windowing.lisp
Expand Up @@ -118,3 +118,6 @@

(defmethod height ((object qobject))
(q+:height object))

(defmethod (setf parent) :after (parent (main main))
(issue (scene main) 'acquire-context))

0 comments on commit 5c1c438

Please sign in to comment.