<div dir="ltr"><div>Hello! I’m looking into the dispatching routine in AWT/Swing and stumbled upon the following piece of code in <a href="https://github.com/openjdk/jdk/blob/4a9cc8a000cafb3ad77a33710054b567e8553652/src/java.desktop/share/classes/java/awt/Container.java#L4591"><i>java.awt.LightweightDispatcher#processMouseEvent</i></a>:</div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">case MouseEvent.MOUSE_DRAGGED:<br>    if (isMouseGrab(e)) {<br>        retargetMouseEvent(met, id, e);<br>    }<br>    break;</blockquote><div><br></div>In case of <i>MOUSE_DRAGGED</i> events, <i>isMouseGrab</i> basically checks if the event has any pressed mouse buttons (in modifiers). I wonder why it has been handled explicitly? AFAIU <i>MOUSE_DRAGGED</i> events always have some pressed mouse buttons, otherwise that’s not possible to drag, don’t they?<br></div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best regards,<div>Nikita Provotorov</div></div></div></div></div>