Changes between Initial Version and Version 1 of Ticket #16865, comment 13


Ignore:
Timestamp:
Jul 7, 2025, 4:28:16 PM (4 months ago)
Author:
Tom Goddard

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16865, comment 13

    initial v1  
    11Another option that could be the most feasible is to create a new Qt window fullscreen on the Acer 3d display that sits behind the Acer OpenXR window.  I think it will get the mouse events.  When I deleted the QWidget I created for the OpenXR window it repositioned the QWindow over my 2D display covering the ChimeraX GUI.  But I could still rotated the molecule if I put the mouse over the OpenXR window in the region where the underlying ChimeraX graphics pane was.  I would want the backing window to be full-screen without a titlebar, and I would need to destroy it when OpenXR turned off.
     2
     3I tested this and it works.  The Acer OpenXR window is always on top so no need to lower the backing window.
     4
     5{{{
     6s = session.ui.screens()[1]  # Should choose by name
     7w = QWidget()
     8w.move(s.geometry().topLeft())
     9w.showFullScreen()
     10w.wheelEvent = lambda e: print('wheel event', e)
     11}}}
     12
     13The next problem is that the ChimeraX MouseMode instances uses the main view for both determining the window size and for adjusting the camera.  So the mouse binding on the Acer screen should probably first convert the mouse event x,y to the equivalent x,y on the main graphics window and then call the main graphics window mouse event dispatching.  Since the main graphics window is mirroring one of the Acer eye views this should allow everything (rotate, translate, zoom, select, pick, ...) to work.  One glitch will be that the z_rotation uses the main graphics window bounds and if the aspect ratios of the main graphics and the acer screen differ (which they will) then the z-rotation will have wider zones on the Acer display either at the left/right (if Acer display has wider aspect) or top/bottom (if Acer has taller aspect).  That seems ok.
     14