xpra icon
Bug tracker and wiki

Opened 3 years ago

Closed 9 months ago

Last modified 7 months ago

#770 closed enhancement (fixed)

drag and drop support

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: blocker Milestone: 1.0
Component: core Version: trunk
Keywords: Cc: dennis.schridde@…

Description (last modified by Antoine Martin)

At the very least, we should support drag and drop within the same application, since all this stays server side.

If we do support some form of remote to local drag and drop (ie: dropping a URL on a browser), we may want to include some form of filtering, like the clipboard filter file.

I'm not sure if we want to use GTK for this, it may just end up getting in the way, just like it did with clipboard - with which it shares a lot of concepts (selections, conversions, etc). Still useful for a quick test application.

Some pointers:

Attachments (9)

Dropper.java (5.7 KB) - added by Antoine Martin 3 years ago.
a simple Java app which accepts drops and shows the flavors available
VeryBasicDnD.java (6.1 KB) - added by Antoine Martin 3 years ago.
updated example code
relative-motion.patch (5.1 KB) - added by Antoine Martin 3 years ago.
hackish patch for testing relative motion events
java-debug.patch (12.3 KB) - added by Antoine Martin 3 years ago.
extra logging that I've used to help diagnose what Java is doing
ticket770_windows-v-fedora21_windows-mouse-focus_epiphany-click.txt (61.2 KB) - added by alas 3 years ago.
click on drop menu in epiphany, drop menu non-selectable
ticket770_windows-v-fedora21_windows-mouse-focus2_firefox-click.txt (60.9 KB) - added by alas 3 years ago.
click on drop menu in firefox, try to select with a second click, non-responsive
ticket770_windows-v-fedora21_windows-mouse-focus3_firefox-hold.txt (51.5 KB) - added by alas 3 years ago.
click and hold on drop menu in firefox, select by un-click, drop menu works as expected
ticket770_osx_mouse-windows-focus_epiphany-hold.txt (147.9 KB) - added by alas 3 years ago.
osx client click-hold epiphany, drop menu non-interactive
ticket770_osx_mouse-windows-focus_firefox-hold.txt (19.7 KB) - added by alas 3 years ago.
osx client click-hold firefox, drop menu behaves as expected

Download all attachments as: .zip

Change History (48)

comment:1 Changed 3 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

Changed 3 years ago by Antoine Martin

Attachment: Dropper.java added

a simple Java app which accepts drops and shows the flavors available

Changed 3 years ago by Antoine Martin

Attachment: VeryBasicDnD.java added

updated example code

comment:2 Changed 3 years ago by Antoine Martin

Right, so this works... but only some of the time!

x11trace (excerpts):

  • working case:
    000:<:0326:  8: Request(27): UngrabPointer time=CurrentTime(0x00000000)
    000:<:0327:  8: Request(32): UngrabKeyboard time=CurrentTime(0x00000000)
    000:<:0328: 24: Request(26): GrabPointer owner-events=false(0x00) grab-window=0x00000044 event-mask=ButtonPress,ButtonRelease,ButtonMotion,VisibilityChange,OwnerGrabButton pointer-mode=Asynchronous(0x01) 
    keyboard-mode=Asynchronous(0x01) confine-to=None(0x00000000) cursor=0x0080003e time=0x02088077
    000:>:0328: Event LeaveNotify(8) detail=Ancestor(0x00) mode=Grab(0x01) flags=same-screen time=0x0208808f root=0x00000044 event=0x0080000e child=None(0x00000000) root-x=99 root-y=125 event-x=99 event-y=97 
    state=Mod2,Button1
    000:>:0328: Event LeaveNotify(8) detail=Virtual(0x01) mode=Grab(0x01) flags=same-screen time=0x0208808f root=0x00000044 event=0x00800007 child=0x0080000e root-x=99 root-y=125 event-x=95 event-y=69 state=M
    od2,Button1
    000:>:0328:32: Reply to GrabPointer: status=Success(0x00)
    000:<:0329: 16: Request(31): GrabKeyboard grab-window=0x00000044 time=0x02088077 pointer-mode=Asynchronous(0x01) keyboard-mode=Asynchronous(0x01)
    000:>:0329: Event FocusOut(10) detail=Ancestor(0x00) event=0x00800010 mode=Grab(0x01)
    000:>:0329:32: Reply to GrabKeyboard: status=Success(0x00)
    000:>:0329: Event MotionNotify(6) detail=Normal(0x00) time=0x0208809d root=0x00000044 event=0x00000044 child=0x0040002b root-x=100 root-y=125 event-x=100 event-y=125 state=Mod2,Button1 same-screen=true(0x
    01)
    000:<:032a: 24: Request(20): GetProperty delete=false(0x00) window=0x0040002b property=0x128("WM_STATE") type=0x128("WM_STATE") long-offset=0x00000000 long-length=0x00000001
    000:>:032a:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:>:032a: Event MotionNotify(6) detail=Normal(0x00) time=0x0208809f root=0x00000044 event=0x00000044 child=0x0040002b root-x=103 root-y=125 event-x=103 event-y=125 state=Mod2,Button1 same-screen=true(0x
    01)
    000:<:032b:  8: Request(15): QueryTree window=0x0040002b
    000:>:032b:44: Reply to QueryTree: root=0x00000044 parent=0x00000044 children=0x0040002c,0x0040003b,0x004003f8;
    000:>:032b: Event MotionNotify(6) detail=Normal(0x00) time=0x020880a2 root=0x00000044 event=0x00000044 child=0x0040002b root-x=104 root-y=125 event-x=104 event-y=125 state=Mod2,Button1 same-screen=true(0x
    01)
    000:<:032c: 24: Request(20): GetProperty delete=false(0x00) window=0x004003f8 property=0x128("WM_STATE") type=0x128("WM_STATE") long-offset=0x00000000 long-length=0x00000001
    000:>:032c:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:<:032d:  8: Request(15): QueryTree window=0x004003f8
    000:>:032d:36: Reply to QueryTree: root=0x00000044 parent=0x0040002b children=;
    000:<:032e: 24: Request(20): GetProperty delete=false(0x00) window=0x00800007 property=0x17b("XdndAware") type=any(0x0) long-offset=0x00000000 long-length=0x00000001
    000:>:032e:36: Reply to GetProperty: type=0x4("ATOM") bytes-after=0x00000000 data=;
    000:<:032f: 24: Request(20): GetProperty delete=false(0x00) window=0x00800007 property=0x17c("XdndProxy") type=0x21("WINDOW") long-offset=0x00000000 long-length=0x00000001
    000:>:032f:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:<:0330: 44: Request(25): SendEvent propagate=false(0x00) destination=0x00800007 event-mask=0 ClientMessage(33) format=0x20 window=0x00800007 type=0x17e("XdndEnter") data=0x08,0x00,0x80,0x00,0x01,0x00,
    0x00,0x05,0xe2,0x00,0x00,0x00,0xaf,0x01,0x00,0x00,0x1f,0x00,0x00,0x00;
    000:<:0331: 44: Request(25): SendEvent propagate=false(0x00) destination=0x00800007 event-mask=0 ClientMessage(33) format=0x20 window=0x00800007 type=0x17f("XdndPosition") data=0x08,0x00,0x80,0x00,0x00,0x
    00,0x00,0x00,0x7d,0x00,0x64,0x00,0x9d,0x80,0x08,0x02,0x76,0x01,0x00,0x00;
    000:<:0332: 44: Request(25): SendEvent propagate=false(0x00) destination=0x00800007 event-mask=0 ClientMessage(33) format=0x20 window=0x00800007 type=0x17f("XdndPosition") data=0x08,0x00,0x80,0x00,0x00,0x
    00,0x00,0x00,0x7d,0x00,0x67,0x00,0x9f,0x80,0x08,0x02,0x76,0x01,0x00,0x00;
    
  • non-working case:
    000:<:02b2:  8: Request(27): UngrabPointer time=CurrentTime(0x00000000)
    000:<:02b3:  8: Request(32): UngrabKeyboard time=CurrentTime(0x00000000)
    000:<:02b4: 24: Request(26): GrabPointer owner-events=false(0x00) grab-window=0x00000044 event-mask=ButtonPress,ButtonRelease,ButtonMotion,VisibilityChange,OwnerGrabButton pointer-mode=Asynchronous(0x01) keyboard-mode=Asynchronous(0x01) confine-to=None(0x00000000) cursor=0x0080003a time=0x020eba0a
    000:>:02b4: Event LeaveNotify(8) detail=Ancestor(0x00) mode=Grab(0x01) flags=same-screen time=0x020eba1e root=0x00000044 event=0x0080000e child=None(0x00000000) root-x=53 root-y=123 event-x=53 event-y=95 state=Mod2,Button1
    000:>:02b4: Event LeaveNotify(8) detail=Virtual(0x01) mode=Grab(0x01) flags=same-screen time=0x020eba1e root=0x00000044 event=0x00800007 child=0x0080000e root-x=53 root-y=123 event-x=49 event-y=67 state=Mod2,Button1
    000:>:02b4:32: Reply to GrabPointer: status=Success(0x00)
    000:>:02b4: Event MotionNotify(6) detail=Normal(0x00) time=0x020eba1e root=0x00000044 event=0x00000044 child=0x0040002b root-x=61 root-y=124 event-x=61 event-y=124 state=Mod2,Button1 same-screen=true(0x01)
    000:<:02b5: 16: Request(31): GrabKeyboard grab-window=0x00000044 time=0x020eba0a pointer-mode=Asynchronous(0x01) keyboard-mode=Asynchronous(0x01)
    000:>:02b5: Event FocusOut(10) detail=Ancestor(0x00) event=0x00800010 mode=Grab(0x01)
    000:>:02b5:32: Reply to GrabKeyboard: status=Success(0x00)
    000:<:02b6: 24: Request(20): GetProperty delete=false(0x00) window=0x0040002b property=0x128("WM_STATE") type=0x128("WM_STATE") long-offset=0x00000000 long-length=0x00000001
    000:>:02b6:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:<:02b7:  8: Request(15): QueryTree window=0x0040002b
    000:>:02b7:44: Reply to QueryTree: root=0x00000044 parent=0x00000044 children=0x0040002c,0x0040003b,0x00400406;
    000:<:02b8: 24: Request(20): GetProperty delete=false(0x00) window=0x0040003b property=0x128("WM_STATE") type=0x128("WM_STATE") long-offset=0x00000000 long-length=0x00000001
    000:>:02b8:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:<:02b9:  8: Request(15): QueryTree window=0x0040003b
    000:>:02b9:36: Reply to QueryTree: root=0x00000044 parent=0x0040002b children=;
    000:<:02ba: 24: Request(20): GetProperty delete=false(0x00) window=0x00600022 property=0x128("WM_STATE") type=0x128("WM_STATE") long-offset=0x00000000 long-length=0x00000001
    000:>:02ba:36: Reply to GetProperty: type=0x128("WM_STATE") bytes-after=0x00000000 data=0x00000001;
    000:<:02bb: 24: Request(20): GetProperty delete=false(0x00) window=0x00600022 property=0x17b("XdndAware") type=any(0x0) long-offset=0x00000000 long-length=0x00000001
    000:>:02bb:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:<:02bc: 24: Request(20): GetProperty delete=false(0x00) window=0x00600022 property=0x189("_MOTIF_DRAG_RECEIVER_INFO") type=any(0x0) long-offset=0x00000000 long-length=0x0000ffff
    000:>:02bc:32: Reply to GetProperty: type=None(0x0) bytes-after=0x00000000 
    000:>:02bc: Event MotionNotify(6) detail=Normal(0x00) time=0x020eba34 root=0x00000044 event=0x00000044 child=0x0040002b root-x=63 root-y=124 event-x=63 event-y=124 state=Mod2,Button1 same-screen=true(0x01)
    000:>:02bc: Event MotionNotify(6) detail=Normal(0x00) time=0x020eba35 root=0x00000044 event=0x00000044 child=0x0040002b root-x=64 root-y=124 event-x=64 event-y=124 state=Mod2,Button1 same-screen=true(0x01)
    000:>:02bc: Event MotionNotify(6) detail=Normal(0x00) time=0x020eba5b root=0x00000044 event=0x00000044 child=0x0040002b root-x=66 root-y=124 event-x=66 event-y=124 state=Mod2,Button1 same-screen=true(0x01)
    

Looks like the DND code picks the wrong window sometimes (ie below: the xterm I launch from), and then decides that DND is not supported.
This probably comes from QueryTree.

  • bad case:
    Xpra-WorldWindow
    Xpra-CorralWindow-0x600022" (xterm)
    
  • good case:
    Xpra-WorldWindow
    "no-name" (Java event window)
    Xpra-CorralWindow-0xc00007" (Java)
    
  • another good case:
    Xpra-WorldWindow
    Xpra-CorralWindow-0xc00007" (Java)
    

Which looks like it is coming from or somewhere near XDragSourceContextPeer which eventually calls down to http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/awt/X11/XlibUtil.java's getChildWindows (which uses a set, which is not ordered and would explain the randomness aspect).

comment:3 Changed 3 years ago by Antoine Martin

After building Java from source with home made patches to add extra logging, I can see:

  • non working trace:
    Jan 15, 2015 1:07:29 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: getToplevelWindow(800007) candWindow=sun.awt.X11.XFramePeer@2032e1d1(800007)
    Jan 15, 2015 1:07:29 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: toplevel=sun.awt.X11.XFramePeer@2032e1d1(800007)
    Jan 15, 2015 1:07:29 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: returning toplevel.getWindow()=8388615
    Jan 15, 2015 1:07:29 PM sun.awt.X11.XDropTargetRegistry updateEmbedderDropSite
    INFO: updateEmbedderDropSite(800007) xbaseWindow=sun.awt.X11.XFramePeer@2032e1d1(800007)
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    createTransferable(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    StringSelection(Item 2)
    Jan 15, 2015 1:07:30 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag(java.awt.datatransfer.StringSelection@61304000, [226, 407, 31, 409, 410, 411, 412, 413, 414, 415, 408], {226=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 407=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 31=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 409=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 410=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 411=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 412=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 413=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 414=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 415=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 408=java.awt.datatransfer.DataFlavor[mimetype=text/plain;representationclass=java.io.InputStream;charset=unicode]})
    Jan 15, 2015 1:07:30 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragWindow=800008, dropActions=1, rootWindow=44
    Jan 15, 2015 1:07:30 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragProtocol=sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8
    Jan 15, 2015 1:07:30 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragProtocol=sun.awt.X11.MotifDnDDragSourceProtocol@ce76ef6
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290765, x = 95, y = 105, x_root = 95, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: state changed from 272 to 0, calling updateSourceAction
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290765, x = 95, y = 105, x_root = 95, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=0, subwindow=40002b
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(40002b) children=[40002c, 40003b, 400447]
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(40002c) children=[]
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..) not found!
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(40003b) children=[600022]
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(600022) is true toplevel
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..)=600022
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..)=600022
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290765, x = 100, y = 105, x_root = 100, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290765, x = 100, y = 105, x_root = 100, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290766, x = 105, y = 105, x_root = 105, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290766, x = 105, y = 105, x_root = 105, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290766, x = 111, y = 105, x_root = 111, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290766, x = 111, y = 105, x_root = 111, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290766, x = 116, y = 105, x_root = 116, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    
    
  • working trace:
    Jan 15, 2015 1:02:53 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: getToplevelWindow(800007) candWindow=sun.awt.X11.XFramePeer@2032e1d1(800007)
    Jan 15, 2015 1:02:53 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: toplevel=sun.awt.X11.XFramePeer@2032e1d1(800007)
    Jan 15, 2015 1:02:53 PM sun.awt.X11.XDropTargetRegistry getToplevelWindow
    INFO: returning toplevel.getWindow()=8388615
    Jan 15, 2015 1:02:53 PM sun.awt.X11.XDropTargetRegistry updateEmbedderDropSite
    INFO: updateEmbedderDropSite(800007) xbaseWindow=sun.awt.X11.XFramePeer@2032e1d1(800007)
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    getSourceActions(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    createTransferable(javax.swing.JList[,5,24,334x51,alignmentX=0.0,alignmentY=0.0,border=,flags=50331944,maximumSize=,minimumSize=,preferredSize=,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],visibleRowCount=0,layoutOrientation=0])
    StringSelection(Item 3)
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag(java.awt.datatransfer.StringSelection@61304000, [226, 407, 31, 409, 410, 411, 412, 413, 414, 415, 408], {226=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 407=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 31=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 409=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 410=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 411=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 412=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 413=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 414=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 415=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String], 408=java.awt.datatransfer.DataFlavor[mimetype=text/plain;representationclass=java.io.InputStream;charset=unicode]})
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragWindow=800008, dropActions=1, rootWindow=44
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragProtocol=sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer startDrag
    INFO: startDrag: dragProtocol=sun.awt.X11.MotifDnDDragSourceProtocol@ce76ef6
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015604, x = 83, y = 120, x_root = 83, y_root = 120, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: state changed from 272 to 0, calling updateSourceAction
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015604, x = 83, y = 120, x_root = 83, y_root = 120, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=0, subwindow=40002b
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(40002b) children=[40002c, 4003d6, 40003b]
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(40002c) children=[]
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..) not found!
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(4003d6) children=[800007]
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(800007) is true toplevel
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..)=800007
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
    INFO: findClientWindow(..)=800007
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer doUpdateTargetWindow
    INFO: doUpdateTargetWindow(40002b, 8015604) attached using sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: sendEnterMessage
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: sendMoveMessage
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015604, x = 88, y = 120, x_root = 88, y_root = 120, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015604, x = 88, y = 120, x_root = 88, y_root = 120, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: sendMoveMessage
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015605, x = 93, y = 122, x_root = 93, y_root = 122, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015605, x = 93, y = 122, x_root = 93, y_root = 122, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: sendMoveMessage
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015608, x = 100, y = 124, x_root = 100, y_root = 124, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
    INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015608, x = 100, y = 124, x_root = 100, y_root = 124, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8, targetRootSubwindow=40002b, subwindow=40002b
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: sendMoveMessage
    canImport(javax.swing.TransferHandler$TransferSupport@6b573212)
    canImport(javax.swing.TransferHandler$TransferSupport@6b573212)
    canImport(javax.swing.TransferHandler$TransferSupport@6b573212)
    canImport(javax.swing.TransferHandler$TransferSupport@6b573212)
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: processMouseMove(XMotionEvent = type = MotionNotify, serial = 652, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015635, x = 107, y = 124, x_root = 107, y_root = 124, state = 272, is_hint = 0, same_screen = true, ) dragInProgress=true
    Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer processMouseMove
    INFO: postDragSourceDragEvent: MOUSE_MOVED
    

I think TILS are:

INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 658, send_event = false, display = 140270009602512, window = 44, root = 68, subwindow = 4194347, time = 8290765, x = 95, y = 105, x_root = 95, y_root = 105, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=0, subwindow=40002b
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(40002b) children=[40002c, 40003b, 400447]
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(40002c) children=[]
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..) not found!
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(40003b) children=[600022]
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(600022) is true toplevel
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..)=600022
Jan 15, 2015 1:07:31 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..)=600022

vs

INFO: updateTargetWindow(XMotionEvent = type = MotionNotify, serial = 630, send_event = false, display = 140602735480256, window = 44, root = 68, subwindow = 4194347, time = 8015604, x = 83, y = 120, x_root = 83, y_root = 120, state = 272, is_hint = 0, same_screen = true, ) dragProtocol=null, targetRootSubwindow=0, subwindow=40002b
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(40002b) children=[40002c, 4003d6, 40003b]
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(40002c) children=[]
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..) not found!
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(4003d6) children=[800007]
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(800007) is true toplevel
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..)=800007
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer findClientWindow
INFO: findClientWindow(..)=800007
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer doUpdateTargetWindow
INFO: doUpdateTargetWindow(40002b, 8015604) attached using sun.awt.X11.XDnDDragSourceProtocol@23b2a3b8
Jan 15, 2015 1:02:55 PM sun.awt.X11.XDragSourceContextPeer updateTargetWindow
INFO: sendEnterMessage

I am stumped. (and also found a bug with xkbmap_mod_pointermissing... see r8479)

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:4 Changed 3 years ago by Antoine Martin

Since Java calls findClientWindow on the window it gets from the XMotionEvent, I thought that maybe we were somehow using the wrong window when generating the mouse motion events. So the patch above replaces the GTK calls with relative motion events, which could be useful for #137 and may be worth applying in any case, after cleaning it up.
But that doesn't seem to change the window id that Java sees, and it then still picks the wrong window half the time!

This patch is really ugly and broken, we can probably skip a lot of the messy logic and just rely on X11Keyboard.window_at_pointer to return None if we're not in the window we are looking for? Needs testing with OR windows, etc.

It is worth mentioning that GTK's window_at_pointer does not seem to work properly, it doesn't seem to be aware of the window size changes... Which could be causing us other problems elsewhere (focus, geometry, events..).

Changed 3 years ago by Antoine Martin

Attachment: relative-motion.patch added

hackish patch for testing relative motion events

comment:5 Changed 3 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew

Well, in the end, I refused to let this bug go, I just could not see any way of getting Java to not traverse the window tree all the way up to the world window (which then causes it to pick the wrong window as target), so r8484 completely changes the way windows are organized: they are now all children of the root window and the "world window" is just another window. This matches what other window managers do, and does not seem to have any other negative impacts. It is also cleaner / makes more sense.

I guess it could be backported to v0.14.x eventually, after a long time settling in the 0.15 branch.

afarr: this one is a BIG FYI, it is a very significant change. Which could potentially cause us some focus problems (or maybe even fixes for existing problems!).

Last edited 3 years ago by Antoine Martin (previous) (diff)

Changed 3 years ago by Antoine Martin

Attachment: java-debug.patch added

extra logging that I've used to help diagnose what Java is doing

comment:6 Changed 3 years ago by alas

Resolution: fixed
Status: newclosed

Tested (perhaps redundantly) successfully with windows 0.15.0 r8522 and OSX 0.15.0 r8527 against fedora 20 0.15.0 r8527 - quite a success (I remember this was breaking browsers at one point).

Nice work!

Closing (but I'll watch for focus issues that might relate).

comment:7 Changed 3 years ago by Antoine Martin

This change has now been in trunk for a month and nothing seems to have been broken by it, so I have backported it in r8644.

comment:8 Changed 3 years ago by Antoine Martin

Milestone: 0.160.15
Priority: minorblocker
Resolution: fixed
Status: closedreopened

Just got an email from Calvin saying that this was causing problems in 0.14.x, so it looks like this will need to be reverted before the release.

comment:9 Changed 3 years ago by alas

It's odd...

  • Testing with your fedora 20 0.14.19 dist against my osx 0.14.20 r8648 build client, the drop downs work as expected (and the drag and drop seems to be working with cursory tests as well).
  • Testing with our builds on fedora 20 servers (0.14.20 each side), the drop downs seem to work as expected (and again, drag and drop seems to be working with cursory tests as well).
  • Testing with the same server/client versions on our fedora 21 servers seems to introduce non-interactive drop menu items (mouse non-interactive, acturally... they do work with keyboard commands, with down/up arrow keys and an enter key).

I'll see about pinning this down some more (I really would rather not disable drag and drop if possible).

comment:10 Changed 3 years ago by alas

OK, confirmed... I'm seeing drop menu issues with trunk builds on fedora 20 and 21 servers, with both windows and osx clients. The issues seem to be different from browser to browser (what a surprise!), but the same between fedora 20 servers and fedora 21 and between osx and windows clients.

windows client (8.1) 0.15.0 r8647 (smo's build)
osx client 0.15.0 r8640 (my build)
fedora 20 0.15.0 r8661 (your beta build)
fedora 21 0.15.0 r8661 (also your beta build)

  • With firefox, clicking on a drop down menu then attempting to use mouse to make a selection - the drop menu popsup, but there's no indication that the mouse movements are being read, and trying to click on an option (not highlighted) closes the drop menu with no other effect. (Problem we had seen. Apparently we had some trunk code in our 14.19 server/clients?)
  • With firefox, clicking and holding on a drop menu, and mousing down highlights drop menu selections as expected, and un-clicking works as expected.
  • With epiphany - clicking on a drop down menu, whether the click is held or un-clicked, the drop menu displays but no selections highlight and neither clicking again nor un-clicking (in the case of a held click) triggers any selection, though in both cases the drop menu is closed.

I grabbed some logs, both with windows and osx clients... will attach probably (hopefully) more than you need.

The interesting part, as far as I can tell, from the windows connection to the fedora 21 server using epiphany is this:

2015-02-19 12:43:40,411 _button_action(1, <gtk.gdk.Event at 076BF530: GDK_BUTTON_PRESS x=801.00, y=354.00, button=1>, True) wid=5 / focus=5, pointer=(2081, 354), modifiers=['mod2'], buttons=[]
2015-02-19 12:43:40,443 process_new_common: [17, 1946, 348, 199, 173, {'opacity': -1, 'fullscreen': False, 'has-alpha': True, 'xid': '0xa00cb3', 'pid': 19251, 'window-type': ('POPUP_MENU',), 'maximized': False, 'override-redirect': True}], OR=True
2015-02-19 12:43:40,443 make_new_window(..) client_window_classes=[<class 'xpra.client.gl.gtk2.gl_client_window.GLClientWindow'>, <class 'xpra.client.gtk2.border_client_window.BorderClientWindow'>], group_leader_window=<gtk.gdk.Window object at 0x77d6e90 (GdkWindow at 0x22f29a0)>
2015-02-19 12:43:40,443 GLClientWindow(..)
2015-02-19 12:43:40,443 <class 'xpra.client.gl.gtk2.gl_client_window.GLClientWindow'>(gtk2.client, <gtk.gdk.Window object at 0x77d6e90 (GdkWindow at 0x22f29a0)>, 17, 1946, 348, 199, 173, {'opacity': -1, 'fullscreen': False, 'has-alpha': True, 'xid': '0xa00cb3', 'pid': 19251, 'window-type': ('POPUP_MENU',), 'maximized': False, 'override-redirect': True}, True, {}, (0, 0))
2015-02-19 12:43:40,443 set_window_type(['POPUP_MENU']) hints=9
2015-02-19 12:43:40,443 new_backing(199, 173) backing_class=<class 'xpra.client.gl.gtk2.gl_window_backing.GLPixmapBacking'>
2015-02-19 12:43:40,443 make_new_backing(<class 'xpra.client.gl.gtk2.gl_window_backing.GLPixmapBacking'>, 199, 173) effective backing class=<class 'xpra.client.gl.gtk2.gl_window_backing.GLPixmapBacking'>, server alpha=True, window alpha=False
2015-02-19 12:43:40,443 Win32Hooks: window frame size is 8x8
2015-02-19 12:43:40,443 failed to set group leader: 'module' object has no attribute 'SHGetPropertyStoreForWindow'
2015-02-19 12:43:40,443 GL do_configure_event(<gtk.gdk.Event at 0758A050: GDK_CONFIGURE x=1946, y=348, width=199, height=173>)
2015-02-19 12:43:40,443 GL do_configure_event(<gtk.gdk.Event at 0758A050: GDK_CONFIGURE x=1946, y=348, width=199, height=173>)
2015-02-19 12:43:40,443 GLClientWindow(17 : gtk2.GLWindowBacking(17, (199, 173), None)).do_map_event(<gtk.gdk.Event at 0758A050: GDK_MAP>) OR=True
2015-02-19 12:43:40,443 GL do_configure_event(<gtk.gdk.Event at 0758A050: GDK_CONFIGURE x=1946, y=348, width=199, height=173>)
2015-02-19 12:43:40,520 do_motion_notify_event(<gtk.gdk.Event at 0758A050: GDK_MOTION_NOTIFY x=135.00, y=7.00>) wid=17 / focus=5, pointer=(2081, 355), modifiers=['mod2'], buttons=[1]
2015-02-19 12:43:40,614 _button_action(1, <gtk.gdk.Event at 076BFF50: GDK_BUTTON_RELEASE x=135.00, y=7.00, button=1>, False) wid=17 / focus=5, pointer=(2081, 355), modifiers=['mod2'], buttons=[1]
2015-02-19 12:43:40,614 button action: simulating a missing mouse-down event for window 5 before sending the mouse-up event
2015-02-19 12:43:40,927 do_motion_notify_event(<gtk.gdk.Event at 076BFE30: GDK_MOTION_NOTIFY x=134.00, y=8.00>) wid=17 / focus=5, pointer=(2080, 356), modifiers=['mod2'], buttons=[]
2015-02-19 12:43:40,943 do_motion_notify_event(<gtk.gdk.Event at 076BFE30: GDK_MOTION_NOTIFY x=133.00, y=9.00>) wid=17 / focus=5, pointer=(2079, 357), modifiers=['mod2'], buttons=[]

Changed 3 years ago by alas

click on drop menu in epiphany, drop menu non-selectable

Changed 3 years ago by alas

click on drop menu in firefox, try to select with a second click, non-responsive

Changed 3 years ago by alas

click and hold on drop menu in firefox, select by un-click, drop menu works as expected

Changed 3 years ago by alas

osx client click-hold epiphany, drop menu non-interactive

Changed 3 years ago by alas

osx client click-hold firefox, drop menu behaves as expected

comment:11 Changed 3 years ago by alas

  • Quick last note, was testing on locate.apple.com .. one click on the "service" tile, then trying to click-release or click-hold on the "select a product" drop menu, then quit session... details to hopefully make logs more interpretable.

comment:12 Changed 3 years ago by alas

Testing again with windows client 0.14.20 r8634 (your beta) against fedora 20 0.14.20 r8645 (also your beta) ... I find the behavior (both firefox and epiphany) to be the same as the 0.15.0 trunk builds tested above.

comment:13 Changed 3 years ago by Antoine Martin

(..) Apparently we had some trunk code in our 14.19 server/clients?)
Testing again with windows client 0.14.20 r8634 (your beta) against fedora 20 0.14.20 r8645 (also your beta) ... I find the behavior (both firefox and epiphany) to be the same as the 0.15.0 trunk builds tested above.


This change has been backported to the v0.14.x branch (but not released yet), see comment:7.
I hope we can find a way of fixing this problem without reverting it...

Can you please clarify the difference between the two firefox: click + release + move vs click + hold + move?

I'm trying to find a simple example to test against with epiphany.
But for example: w3schools' tryhtml_option_selected works fine here.
I've also tried the steps from comment:11 (apple's site), still no luck!

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:14 Changed 3 years ago by alas

Uhhmmm... testing again (to find a simple example with epiphany)... I can't repro the problem anymore - neither with epiphany nor with firefox... neither on the locate.apple.com nor on facebook.com sign in drop downs. Very odd.

Win32 client 0.15.0 r8689 (windows 8.1)
Fedora 20 server 0.15.0 r8661 (same as before).

Just in case, though, I'll try to clarify my made-up nomenclature. When clicking on a drop down, one can either simply click, or one can click and hold the button depressed.

For a time I was finding that, with firefox, if I just left clicked a drop down then moved the cursor over a selection and tried to left click to select - it was failing to select (click + release + move).

Meanwhile, if I left clicked but held the button depressed, then moved the cursor to a selection and un-clicked to select - it succeeded at selecting (click + hold + move).

With the new windows client though, either method is working as expected with either epiphany or firefox. (Could the fixes for the unicode errors mentioned in #786, or the SHGetPropertyStoreForWindow issues suspected related to #799 have "accidentally" fixed this issue?)

comment:15 Changed 3 years ago by Antoine Martin

Just in case, though, I'll try to clarify my made-up nomenclature. When clicking on a drop down, one can either simply click, or one can click and hold the button depressed.


OK, I thought that was how it worked (the description was adequate) but since I was having problems reproducing it, I was trying to make sure I wasn't just doing it wrong!


With the new windows client though, either method is working as expected with either epiphany or firefox. (Could the fixes for the unicode errors mentioned in #786, or the SHGetPropertyStoreForWindow issues suspected related to #799 have "accidentally" fixed this issue?)


I doubt it, but since this change is potentially disruptive, I am going to keep this ticket open and delay 0.14.20 until we've had a chance to test this some more.
How did Calvin originally reproduce the problem to be able to narrow it down to this changeset? (maybe re-assign to him?)

comment:16 Changed 3 years ago by Antoine Martin

Any move on this?
Can you ask Calvin how he identified this changeset as problematic?

comment:17 Changed 3 years ago by Antoine Martin

r8737 (+backport in r8738) allows us to toggle the implementation using the env var:

XPRA_REPARENT_ROOT=0 xpra start ...

I think this is safer as it gives us a way to go back to the previous behaviour if we have to.

comment:18 Changed 3 years ago by alas

Firstly, to answer the how/why of Calvin's identification and change... it was the latest changeset and largely a guess that, since the drop menus had been working before, they would (maybe?) work again if that change were reverted.

As to what I'm seeing investigating some more... it looks like the bugs I had been seeing in the drop down menu windows is now confined to OSX clients. On the other hand, while the XPRA_REPARENT_ROOT=0 environment variable seems to work for OSX, it horrendously breaks the win32 clients (at least, it does so with firefox & epiphany).

  • Testing with fedora 20 server 0.15.0 r8706 and r8743 against OSX 10.9 clients 0.14.20 r8743, 0.15.0 r8647, and 0.15.0 r8743 ... I find that firefox behavior is as mentioned in comment:11.

(locate.apple.com - clicking and holding the drop down to select an item from either the sales or the service button item select drop menus, followed by releasing the click to select works as expected - but clicking & releasing, then trying to click again on a selection from the drop down menu displayed not only fails to select anything from the drop down menu, but seems to also be interpreted as a "held click", highlighting anything subsequently moused over.)

(Similarly, starting a gedit application and trying to use the application menu to select Search, then trying to select Replace from the displayed drop down menu fails ... though it fails the same whether the click is held and un-clicked to select or if it is released and a second click is attempted to make a selection from the menu.)

  • All of the above (both firefox and gedit) work as expected with the same server sessions and a win32 0.15.0 r8709 or r8743 client.
  • Testing the r8743 0.15.0 OSX client against the fedora 20 server, with XPRA_REPARENT_ROOT=0 on the server side... all of the above work as expected.
  • Testing the fedora 20 0.15.0 r8743 server with XPRA_REPARENT_ROOT=0 (same session) against the windows 0.15.0 r8743 client, however ... the gedit drop menus behave as expected, but with firefox or epiphany, on the locate.spple.com page, I can only successfully click on the two left-most tiles & their associated drop menus... when I try to click on the two right-most (Service and Consulting), the clicks register on the left most tiles (Sales and Training) also... enabling a click on one of the "right-most" tiles to put keyboard focus in a textbox on a left-most tile (though, interestingly, not allowing the clicking on a drop down menu... or at least not thereby resulting in the display of a drop menu.

comment:19 Changed 3 years ago by Antoine Martin

.. while the XPRA_REPARENT_ROOT=0 environment variable seems to work for OSX, it horrendously breaks the win32 clients (at least, it does so with firefox & epiphany).


I don't understand this.
Setting this environment variable only effectively reverts the changeset and goes back to the pre r8484 behaviour. Please clarify and confirm that setting the env var to 0 gives the same behaviour as in 0.14.x.
If it does not, then we are dealing with something else - possibly related.

comment:20 Changed 3 years ago by alas

Owner: changed from alas to Antoine Martin
Status: reopenednew

Well, nevermind - it looks like the issue with our win32 build (last issue with #799) tripped me up for this testing... with the fixed window client the XPRA_REPARENT_ROOT=0 environment variable is working as expected.

Passing it back.

comment:21 Changed 3 years ago by Antoine Martin

Status: newassigned

Until I can investigate with OSX (virtualbox is having problems), I have changed the default value of XPRA_REPARENT_ROOT in r8763 for trunk and r8764 for v0.14.x

So we have to use "1" to enable reparent to root. (the default behaviour is now as it was before this change)

comment:22 Changed 3 years ago by Antoine Martin

As far as I can tell, the http://locate.apple.com/ widgets are just regular select HTML elements.

This is a much better and simpler test case for the drop down (with source visible): w3schools: try select form


when I try to click on the two right-most (Service and Consulting), the clicks register on the left most tiles (Sales and Training) also... enabling a click on one of the "right-most" tiles to put keyboard focus in a textbox on a left-most tile..


If I understand this correctly, this looks like a completely different issue. Sounds like the dummy driver is not patched. Please confirm that this is related to the reparent code, and if not create a new ticket for this issue.

comment:23 Changed 3 years ago by Antoine Martin

In fact, we have a minimal test program already named "test drop down", just for this purpose - 37 lines all included . A million times better than testing with a browser.

Could well be related to #469. See also #713.

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:24 Changed 2 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew

If this is still an issue, please provide simple reproduction steps (ie: preferably not using a browser)

comment:25 Changed 2 years ago by alas

Resolution: fixed
Status: newclosed

Well, I can't seem to reproduce this with a browser anymore - so rather than trying to reproduce on something more simple, I'm going to conclude that it is no longer a problem.

Closing.

comment:26 Changed 2 years ago by Antoine Martin

Resolution: fixed
Status: closedreopened

Re-opening as I need to make absolutely certain.

Did you test both with a server started with: XPRA_REPARENT_ROOT=1 ?
The default got changed back in comment:21.
Also please make sure you test with an osx client post r10983 as this bug would prevent some metadata from applying, potentially interfering with the testing.

Last edited 2 years ago by Antoine Martin (previous) (diff)

comment:27 Changed 2 years ago by alas

Resolution: fixed
Status: reopenedclosed

Thanks for that heads up.

Tested again with XPRA_REPARENT_ROOT=1

0.16.0 r10972 fedora 21 server, 0.16.0 r11015 osx client, 0.16.0 r10983 windows client (on 8.1).

  • Drag and drop is working as expected.
  • Drop menus (both click and scroll and click again, and click-hold scroll & un-click) working as expected. (Firefox seems to have some issues with clipboard after copying an image, but that's not drag/drop related, so I'll make a ticket for it elsewhere.)

Can't find any sign of the issues in this ticket - closing again.

Last edited 2 years ago by Antoine Martin (previous) (diff)

comment:28 Changed 2 years ago by Antoine Martin

r11032 makes XPRA_REPARENT_ROOT=1 the default.

FYI: there is already a ticket for firefox clipboard weirdness which may be relevant: #883

comment:29 Changed 2 years ago by Antoine Martin

Resolution: fixed
Status: closedreopened

This causes regressions like ticket:911#comment:3, so this is reverted in r11292.

We'll also need to make sure we don't cause regressions with #814.

Last edited 2 years ago by Antoine Martin (previous) (diff)

comment:30 Changed 2 years ago by Antoine Martin

Milestone: 0.150.17
Owner: changed from alas to Antoine Martin
Status: reopenednew

too late to deal with this, re-scheduling

comment:31 Changed 22 months ago by urzds

Cc: dennis.schridde@… added

comment:32 Changed 20 months ago by Antoine Martin

Milestone: 0.170.18
Status: newassigned

comment:33 Changed 17 months ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

comment:34 Changed 14 months ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew

Following some focus fixes in r13600, r13690 re-enables "reparent to root" again... hopefully we'll have better luck this time. Seems to work so far.

Note: this may cause regressions when connecting a new client to an old server and vice versa. (we can re-add some conditional workarounds via capabilities later on - just make a note of them for now but this is not the priority for testing, new to new is)

Tickets to (re)check: #814, #469, #911

Last edited 14 months ago by Antoine Martin (previous) (diff)

comment:35 Changed 14 months ago by alas

Owner: changed from alas to Antoine Martin

Ok... testing with 1.0 r13763 osx client (10.9) against 1.0 r13767 fedora 23 vm.

Tried all the old-timey permutations I could think of with the locate.apple.com and the w3-schools link you provided, with both chrome and especially firefox (epiphany?, meh... don't care so much anymore)... both with a mouse and a tracpad. All looks well & good.

  • Ticket #814 - familiar with this issue, not seeing it on either of the above, or on facebook sign up birthday drop downs... looks good.
  • #469 - alas... I may have forgotten the ticket number, but this was the second thing I tested... am still able to click "through" an xterm window and trigger the 'save file' button of a gedit window "beneath" ... no fix for that.
  • Installed "orage" to test for #911 ... looks like the drop menus there are behaving correctly (never looked at that ticket before, but remember that described behavior too).

Tested the above with the default, which should be enabling "reparent to root" (and in the case of the issues mentioned in this ticket, also with XPRA_REPARENT_ROOT=1, which disables it again?... or maybe it should be tested with =0 and compared?).

In any case, it looks like you've successfully implemented "reparent to root" without breaking anything newly, though it would've been nice if it had fixed the "click-through" behavior of #469 as well.

Handing this back to you... I think I tested all the things that you were looking for and you can close this (though not #469), but let me know if I overlooked something.

comment:36 Changed 14 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks!

I believe r13600 caused at least one bad regression reported in #1307 (server crash), now fixed in r13769. (you needed to disconnect lots of times to hit it - and maybe running something like gtkperf at the same time helps to hit that codepath)

Closing as we can follow up in #469 and I don't think we will need version specific toggles. (will just need to remember to re-test with older clients / servers before the final release)

comment:37 Changed 9 months ago by Antoine Martin

Resolution: fixed
Status: closedreopened

This feature has caused another regression: gedit running on centos 6 with osx client... (see ticket:1453#comment:1), and so the default has been reverted again in the v1.0.x branch.

I am hoping that we can fix this client-side and re-enable drag-n-drop in v1.0.x.
It's likely to be caused by focus / window id being reported wrong by the macosx client.

comment:38 Changed 9 months ago by Antoine Martin

Resolution: fixed
Status: reopenedclosed

See ticket:1453#comment:2, will follow up in #469 (re-opened).

comment:39 Changed 7 months ago by Antoine Martin

Follow up in #1493 for proper drag-n-drop support.

Note: See TracTickets for help on using tickets.