<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 3/31/2025 11:19 AM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnVE=c8og+f1m3E6sgbpBXKx_1Gp3eafF=rM8bXzPxVPyA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">
<div>When I create a subclass of <font face="monospace">SystemWindow</font>
that handles mouse events, I lose the ability to drag the
window. It becomes sticky. I want to listen for right-click
events. How can I retain the ability to drag the window?
Here's simple code that demonstrates the issue:</div>
<div><br>
</div>
<div><font face="monospace">SystemWindow subclass: #MyWindow<br>
instanceVariableNames: ''<br>
classVariableNames: ''<br>
poolDictionaries: ''<br>
category: 'Demo'<br>
</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">handlesMouseDown: aMouseEvent<br>
^ true</font><br>
</div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">MyWindow new openInWorld</font></div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size: 12.8px;"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Hi Mark,<br>
<br>
This will work:<br>
<br>
handlesMouseDown: aMouseEvent<br>
^(self internalizeFromWorld: aMouseEvent eventPosition) y >
self labelHeight<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>