aboutsummaryrefslogtreecommitdiffstats
path: root/testing/chromium/chromium-no-mit-screensaver.patch
blob: e6061e26c55ddf63221dc1bc5e01d3d7c81a493d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--- chromium-13.0.754.0.orig/chrome/browser/idle_query_linux.cc
+++ chromium-13.0.754.0/chrome/browser/idle_query_linux.cc
@@ -4,35 +4,12 @@
 
 #include "chrome/browser/idle_query_linux.h"
 
-#include <X11/Xlib.h>
-#include <X11/extensions/scrnsaver.h>
-
 namespace browser {
 
 class IdleData {
  public:
-  IdleData() {
-    int event_base;
-    int error_base;
-    display = XOpenDisplay(NULL);
-    if (XScreenSaverQueryExtension(display, &event_base, &error_base)) {
-      mit_info = XScreenSaverAllocInfo();
-    } else {
-      mit_info = NULL;
-    }
-  }
-
-  ~IdleData() {
-    if (display) {
-      XCloseDisplay(display);
-      display = NULL;
-    }
-    if (mit_info)
-      XFree(mit_info);
-  }
-
-  XScreenSaverInfo *mit_info;
-  Display *display;
+  IdleData() {}
+  ~IdleData() {}
 };
 
 IdleQueryLinux::IdleQueryLinux() : idle_data_(new IdleData()) {}
@@ -40,16 +17,7 @@
 IdleQueryLinux::~IdleQueryLinux() {}
 
 int IdleQueryLinux::IdleTime() {
-  if (!idle_data_->mit_info || !idle_data_->display)
-    return 0;
-
-  if (XScreenSaverQueryInfo(idle_data_->display,
-                            RootWindow(idle_data_->display, 0),
-                            idle_data_->mit_info)) {
-    return (idle_data_->mit_info->idle) / 1000;
-  } else {
-    return 0;
-  }
+  return 0;
 }
 
 }  // namespace browser
--- chromium-13.0.754.0.orig/chrome/chrome.gyp
+++ chromium-13.0.754.0/chrome/chrome.gyp
@@ -673,11 +673,6 @@
           'dependencies': [
             '../build/linux/system.gyp:gtk',
           ],
-          'link_settings': {
-            'libraries': [
-              '-lXss',
-            ],
-          },
         }],
         ['OS=="linux" and chromeos==1', {
           'include_dirs': [
--- chromium-13.0.754.0.orig/chrome/chrome_common.gypi
+++ chromium-13.0.754.0/chrome/chrome_common.gypi
@@ -262,7 +262,6 @@
             'libraries': [
               '-lX11',
               '-lXrender',
-              '-lXss',
               '-lXext',
             ],
           },