Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start-desktop using a single display #1247

Closed
totaam opened this issue Jul 7, 2016 · 12 comments
Closed

start-desktop using a single display #1247

totaam opened this issue Jul 7, 2016 · 12 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 7, 2016

Issue migrated from trac ticket # 1247

component: server | priority: minor | resolution: fixed | keywords: full desktop x11

2016-07-07 10:06:24: antoine created the issue


Follow up from #1206.

Instead of starting Xephyr nested in a mostly unused Xvfb display, we should be able to start the Xvfb and watch the root window directly for damage events.

This should work without having to enable the Composite extension, without redirecting any windows, which would be more compatible with some rendering mechanisms which are not currently supported, notably some multi display native graphics card modes.
We would not need to run as window manager on the vfb display at all, simplifying the code greatly (no need for focus management, etc - just direct mouse and keyboard events).

@totaam
Copy link
Collaborator Author

totaam commented Jul 7, 2016

2016-07-07 10:08:20: antoine uploaded file nocomposite.patch (11.7 KiB)

poc patch showing the root window as a managed window

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2016

2016-07-10 10:40:14: antoine uploaded file start-desktop-nocomposite.patch (40.5 KiB)

much better approach using a dedicated model and server class

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2016

2016-07-10 10:48:11: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2016

2016-07-10 10:48:11: antoine commented


Some preparatory refactoring which also helps in more clearly separating the gtk code and pure x11 code: r12970 (cursor, clobber flag), r12971 (windows vs cursors), r12973 (bell, motion, cursors).

Things left to do:

  • fixup focus and click events
  • replace the desktop manager: each client may map the desktop window where it wants so we need per-client window position (related to wishlist: Support multiple clients connected at the same time #41 and shadow servers which also need to adjust the window position when processing mouse events)
  • handle multiple displays as individual windows (xinerama / randr) - or even join them up / split them! (see also Shadow a specific region of an X server #1009)
  • hookup randr signals, maybe allow the client to resize via randr from the tray, or even send the list of resolutions that can be used and allow window resizing with size constraints
  • expose more x11 properties: session name, etc.
  • extract what we need from composite helper - no composite needed!
  • screenshot code: re-use shadow code?
  • window control arbitration: only one owner at a time (maybe just one session owner at a time)

@totaam
Copy link
Collaborator Author

totaam commented Jul 11, 2016

2016-07-11 15:42:47: antoine commented


More preparatory work in r12974 (randr cleanup), r12975 + r12976 (mouse pointer adjustments: re-use shadow code), r12977 (window model class refactoring), r12978 (split damage from composite), r12979 (fix undedirect), r12980 (logging tweak), r12982 (unnecessary import fixup)

Full "start-desktop" support added in r12981 + r12983, see commit message for details.

Still TODO:

  • xrandr corrupts the window
  • screenshot code
  • multi-display handling (see comment:1 above)
  • maybe make the initial display resolution configurable via command line switch instead of XPRA_DEFAULT_VFB_RESOLUTION (more sensible default vfb resolution on startup #1132)
  • screen refresh issues: we use h264 too aggressively

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 14:08:22: antoine commented


Turns out that the corrupted window with resizing may well be an Intel opengl issue (#1233), and it should work well enough as of r12986, will need to re-test on non-intel chipsets.

For reference, here's how you can easily start a non-composited vfb:

xpra start-desktop \
    --xvfb='Xvfb -extension Composite -nolisten tcp -noreset -auth $XAUTHORITY -screen 0 1920x1080x24+32'

Another option is to use an existing display server with xpra start-desktop --use-display.

This mode may be useful for adding support for deep colour modes (#909).

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:52:23: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Sep 6, 2016

2016-09-06 10:33:40: antoine commented


Some minor updates:

  • r13577: start with the default screen size (1080p), don't resize to match the client (+ minor fix in r13581)
  • r13580: server screen layout detection and logging
  • r13578: support for screenshot command (captures all screens)
  • r13582: try to send pointer events to the right screen when we start the vfb with more than one screen, ie using:
xpra start-desktop :20 --start=xterm \
    --xvfb='Xvfb -extension Composite -nolisten tcp -noreset -auth $XAUTHORITY \
        -screen 0 1920x1080x24+32 \
        -screen 1 1920x1080x24+32'

Unfortunately, there is an Xorg bug which sends all events to the first screen: XTestFakeMotionEvent no longer works on multiple screen displays


@afarr: just a FYI, please close.

@totaam
Copy link
Collaborator Author

totaam commented Sep 7, 2016

2016-09-07 02:58:42: afarr changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Sep 7, 2016

2016-09-07 02:58:42: afarr set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Sep 7, 2016

2016-09-07 02:58:42: afarr commented


Noted... to the best of my ability.

Closing.

@totaam totaam closed this as completed Sep 7, 2016
@totaam
Copy link
Collaborator Author

totaam commented Jan 12, 2017

2017-01-12 02:36:25: antoine commented


Added wiki page: Desktop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant