XWorkstation.st
changeset 8706 92fd4a337e50
parent 8681 66d2c2026494
child 8756 731ac340b5cf
equal deleted inserted replaced
8705:849f2a5e40a3 8706:92fd4a337e50
  3818 
  3818 
  3819     |xdndAwareAtom|
  3819     |xdndAwareAtom|
  3820 
  3820 
  3821     xdndAwareAtom := self atomIDOf:#XdndAware create:false.
  3821     xdndAwareAtom := self atomIDOf:#XdndAware create:false.
  3822     xdndAwareAtom isNil ifTrue:[
  3822     xdndAwareAtom isNil ifTrue:[
  3823 	"/ mh - window manager is not DND capable
  3823         "/ mh - window manager is not DND capable
  3824 	Logger info:'display does not support Xdnd'.
  3824         Logger info:'display does not support Xdnd'.
  3825 	^ self.
  3825         ^ self.
  3826     ].
  3826     ].
       
  3827     
  3827     "/ protocol version 3 is from 1998...
  3828     "/ protocol version 3 is from 1998...
  3828     "/ protocol version 4 from 1999 added root-window drop support...
  3829     "/ protocol version 4 from 1999 added root-window drop support...
  3829     "/ protocol version 5 from 2002 added some info to XdndFinished...
  3830     "/ protocol version 5 from 2002 added some info to XdndFinished...
  3830     self
  3831     self
  3831 	setProperty:xdndAwareAtom
  3832         setProperty:xdndAwareAtom
  3832 	type:#ATOM
  3833         type:#ATOM
  3833 	value:3
  3834         value:3
  3834 	for:aWindowOrWindowID
  3835         for:aWindowOrWindowID
  3835 
  3836 
  3836     "
  3837     "
  3837      Display setXdndAwarePropertyFor:Transcript
  3838      Display setXdndAwarePropertyFor:Transcript
  3838      Display getProperty:#'XdndAware' from:Transcript delete:false
  3839      Display getProperty:#'XdndAware' from:Transcript delete:false
  3839     "
  3840     "
  3840 
  3841 
  3841     "Created: / 30-10-2018 / 12:59:27 / Claus Gittinger"
  3842     "Created: / 30-10-2018 / 12:59:27 / Claus Gittinger"
  3842     "Modified (comment): / 30-10-2018 / 21:02:45 / Claus Gittinger"
  3843     "Modified (format): / 22-06-2019 / 15:08:46 / Claus Gittinger"
  3843 !
  3844 !
  3844 
  3845 
  3845 xdndMessage:event data:data view:targetView
  3846 xdndMessage:event data:data view:targetView
  3846     "handle a xdnd drag&drop protocol message"
  3847     "handle a xdnd drag&drop protocol message.
       
  3848      Ignored for now"
  3847 
  3849 
  3848     Logger info:'xdnd: %1 - %2 - %3' with:event with:data with:targetView.
  3850     Logger info:'xdnd: %1 - %2 - %3' with:event with:data with:targetView.
  3849 
  3851 
  3850     "Created: / 30-10-2018 / 21:06:49 / Claus Gittinger"
  3852     "Created: / 30-10-2018 / 21:06:49 / Claus Gittinger"
       
  3853     "Modified (comment): / 22-06-2019 / 15:08:33 / Claus Gittinger"
  3851 ! !
  3854 ! !
  3852 
  3855 
  3853 !XWorkstation methodsFor:'drawing'!
  3856 !XWorkstation methodsFor:'drawing'!
  3854 
  3857 
  3855 _displayLineFromX:x0 y:y0 toX:x1 y:y1 in:aDrawableId with:aGCId
  3858 _displayLineFromX:x0 y:y0 toX:x1 y:y1 in:aDrawableId with:aGCId
  5625     ].
  5628     ].
  5626     self buttonRelease:logicalButton x:x y:y view:view
  5629     self buttonRelease:logicalButton x:x y:y view:view
  5627 !
  5630 !
  5628 
  5631 
  5629 clientMessage:targetView type:typeAtom format:format data:data
  5632 clientMessage:targetView type:typeAtom format:format data:data
  5630     |sensor|
  5633     |sensor xdndAwareAtom dndProtocolAtom|
  5631 
  5634 
  5632     targetView isNil ifTrue:[
  5635     targetView isNil ifTrue:[
  5633 	"targetView is gone? Anyway, cannot do anything with this event..."
  5636         "targetView is gone? Anyway, cannot do anything with this event..."
  5634 	^ self.
  5637         ^ self.
  5635     ].
  5638     ].
  5636 
  5639 
  5637     "DND drag&drop protocol"
  5640     (xdndAwareAtom := self atomIDOf:#XdndAware create:false) notNil ifTrue:[
  5638     (typeAtom == (self atomIDOf:#XdndAware)) ifTrue:[
  5641         "DND drag&drop protocol"
  5639 	self xdndMessage:nil data:data view:targetView.
  5642         (typeAtom == xdndAwareAtom) ifTrue:[
  5640 	^ self.
  5643             self xdndMessage:nil data:data view:targetView.
  5641     ].
  5644             ^ self.
  5642 
  5645         ].
  5643     "DND drag&drop protocol"
  5646     ].
  5644     (format == 32 and:[typeAtom == (self atomIDOf:#DndProtocol)]) ifTrue:[
  5647 
  5645 	self dndMessage:nil data:data view:targetView.
  5648     (dndProtocolAtom := self atomIDOf:#DndProtocol create:false) notNil ifTrue:[
  5646 	^ self.
  5649         "DND drag&drop protocol"
       
  5650         (format == 32 and:[typeAtom == dndProtocolAtom]) ifTrue:[
       
  5651             self dndMessage:nil data:data view:targetView.
       
  5652             ^ self.
       
  5653         ].
  5647     ].
  5654     ].
  5648 
  5655 
  5649     sensor := targetView sensor.
  5656     sensor := targetView sensor.
  5650     "not posted, if there is no sensor ..."
  5657     "not posted, if there is no sensor ..."
  5651     sensor notNil ifTrue:[
  5658     sensor notNil ifTrue:[
  5652 	sensor clientMessage:typeAtom format:format eventData:data view:targetView
  5659         sensor clientMessage:typeAtom format:format eventData:data view:targetView
  5653     ].
  5660     ].
  5654 
  5661 
  5655     "Created: / 04-04-1997 / 17:49:26 / cg"
  5662     "Created: / 04-04-1997 / 17:49:26 / cg"
  5656     "Modified: / 30-10-2018 / 21:05:15 / Claus Gittinger"
  5663     "Modified: / 22-06-2019 / 15:07:49 / Claus Gittinger"
  5657 !
  5664 !
  5658 
  5665 
  5659 configure:view relativeTo:anotherViewId x:x y:y width:w height:h borderWidth:borderWidth above:aboveViewId overrideRedirect:overrideBool
  5666 configure:view relativeTo:anotherViewId x:x y:y width:w height:h borderWidth:borderWidth above:aboveViewId overrideRedirect:overrideBool
  5660     "forward a size-change event for some view"
  5667     "forward a size-change event for some view"
  5661 
  5668