Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions src/NewTools-Window-Profiles/CavroisWindowManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -728,36 +728,28 @@ CavroisWindowManager >> initializeBlocks [
self cellSize ifNotNil: [ :size |
self resetCells.
self createPlaceHolderGrid: size ].
self applyWorldResize ].
UIManager default defer: [ self applyWorldResize ] ].

WorldMorph dragActionBlock: [ :aClient |
((aClient isKindOf: SystemWindow) or:
(aClient isKindOf: SpWindowMorph)) ifTrue: [
((aClient isKindOf: SystemWindow) or: (aClient isKindOf: SpWindowMorph)) ifTrue: [
self cellSize ifNotNil: [
| dragProcess |
self cellDisplay.
dragProcess := [
[ aClient owner notNil ] whileTrue: [
self
handleWindowDrag: aClient
at: aClient position.
(Delay forMilliseconds: 2) wait ] ] forkAt:
Processor userBackgroundPriority.
self handleWindowDrag: aClient at: aClient position.
(Delay forMilliseconds: 2) wait ] ] forkAt: Processor userBackgroundPriority.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you ask pablo or guille because I'm nervous to have more processes around.
The defer: is good because it is in the UI cycle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will ask someone

aClient setProperty: #cavroisDragProcess toValue: dragProcess ] ] ].

WorldMorph dropActionBlock: [ :anEvent |
| dragProcess |
dragProcess := anEvent contents
valueOfProperty: #cavroisDragProcess
ifAbsent: nil.
dragProcess := anEvent contents valueOfProperty: #cavroisDragProcess ifAbsent: nil.
dragProcess ifNotNil: [
dragProcess terminate.
anEvent contents removeProperty: #cavroisDragProcess ].
self cellSize ifNotNil: [
self removeVisualPlaceholders.
self
handleCellWindowDrop: anEvent contents
at: anEvent contents position ] ]
self handleCellWindowDrop: anEvent contents at: anEvent contents position ] ]
]

{ #category : 'internals' }
Expand Down
Loading