Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: remoting/host/curtain_mode_linux.cc

Issue 1954623005: Add Xorg+dummy as alternative for Xvfb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/linux/linux_me2me_host.py » ('j') | remoting/host/linux/linux_me2me_host.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/curtain_mode_linux.cc
diff --git a/remoting/host/curtain_mode_linux.cc b/remoting/host/curtain_mode_linux.cc
index 05031bfec1b255b300d521dfde30b5686b785fa0..272fb4bcaba4274108f10892852040a3bd1e3c24 100644
--- a/remoting/host/curtain_mode_linux.cc
+++ b/remoting/host/curtain_mode_linux.cc
@@ -61,6 +61,7 @@ bool CurtainModeLinux::IsXvfbSession() {
XDeviceInfo* devices;
bool found_xvfb_mouse = false;
bool found_xvfb_keyboard = false;
+ bool found_crd_void_input = false;
bool found_other_devices = false;
devices = XListInputDevices(display, &num_devices);
for (int i = 0; i < num_devices; i++) {
@@ -68,6 +69,9 @@ bool CurtainModeLinux::IsXvfbSession() {
if (device_info->use == IsXExtensionPointer) {
if (strcmp(device_info->name, "Xvfb mouse") == 0) {
found_xvfb_mouse = true;
+ } else if (strcmp(device_info->name,
+ "Chrome Remote Desktop Input") == 0) {
+ found_crd_void_input = true;
} else if (strcmp(device_info->name, "Virtual core XTEST pointer") != 0) {
found_other_devices = true;
HOST_LOG << "Non Xvfb mouse found: " << device_info->name;
@@ -97,7 +101,8 @@ bool CurtainModeLinux::IsXvfbSession() {
}
XFreeDeviceList(devices);
XCloseDisplay(display);
- return found_xvfb_mouse && found_xvfb_keyboard && !found_other_devices;
+ return (found_xvfb_mouse && found_xvfb_keyboard) != found_crd_void_input
Jamie 2016/05/07 00:05:47 Why are you using != here instead of ||? It makes
rkjnsn 2016/05/09 16:58:33 My initial thought was that it should be xor since
Jamie 2016/05/09 17:08:43 Xor is unusual enough that it's not immediately cl
+ && !found_other_devices;
}
// static
« no previous file with comments | « no previous file | remoting/host/linux/linux_me2me_host.py » ('j') | remoting/host/linux/linux_me2me_host.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698