Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 194602 | Differences between
and this patch

Collapse All | Expand All

(-)src/xitk/videowin.c.orig (-35 lines)
Lines 37-49 Link Here
37
#include <X11/extensions/Xinerama.h>
37
#include <X11/extensions/Xinerama.h>
38
#endif
38
#endif
39
#ifdef HAVE_XF86VIDMODE
39
#ifdef HAVE_XF86VIDMODE
40
#include <X11/extensions/xf86vmode.h>
40
#include <X11/extensions/xf86vmode.h>
41
#endif
41
#endif
42
#ifdef HAVE_XTESTEXTENSION
43
#include <X11/extensions/XTest.h>
44
#endif
45
42
46
#ifdef HAVE_ALLOCA_H
43
#ifdef HAVE_ALLOCA_H
47
#include <alloca.h>
44
#include <alloca.h>
48
#endif
45
#endif
49
46
Lines 123-136 Link Here
123
  int                    depth;
120
  int                    depth;
124
  int                    show;
121
  int                    show;
125
  int                    borderless;      /* borderless window (for windowed mode)? */
122
  int                    borderless;      /* borderless window (for windowed mode)? */
126
123
127
  Bool                   have_xtest;
124
  Bool                   have_xtest;
128
#ifdef HAVE_XTESTEXTENSION
129
  int                    fake_key_cur;
130
  KeyCode                fake_keys[2];    /* Fake key to send */
131
#endif
132
125
133
  XWMHints              *wm_hint;
126
  XWMHints              *wm_hint;
134
127
135
  xitk_register_key_t    widget_key;
128
  xitk_register_key_t    widget_key;
136
  xitk_register_key_t    old_widget_key;
129
  xitk_register_key_t    old_widget_key;
Lines 168-184 Link Here
168
  gVw->zoom_small_stream = cfg->num_value;
161
  gVw->zoom_small_stream = cfg->num_value;
169
}
162
}
170
163
171
static Bool have_xtestextention(void) {  
164
static Bool have_xtestextention(void) {  
172
  Bool xtestext = False;
165
  Bool xtestext = False;
173
#ifdef HAVE_XTESTEXTENSION
174
  int dummy1 = 0, dummy2 = 0, dummy3 = 0, dummy4 = 0;
175
  
176
  XLockDisplay(gGui->video_display);
177
  xtestext = XTestQueryExtension(gGui->video_display, &dummy1, &dummy2, &dummy3, &dummy4);
178
  XUnlockDisplay(gGui->video_display);
179
#endif
180
  
166
  
181
  return xtestext;
167
  return xtestext;
182
}
168
}
183
169
184
static void _set_window_title(void) {
170
static void _set_window_title(void) {
Lines 1533-1547 Link Here
1533
1519
1534
  XLockDisplay (gGui->video_display);
1520
  XLockDisplay (gGui->video_display);
1535
  gVw->desktopWidth       = DisplayWidth(gGui->video_display, gGui->video_screen);
1521
  gVw->desktopWidth       = DisplayWidth(gGui->video_display, gGui->video_screen);
1536
  gVw->desktopHeight      = DisplayHeight(gGui->video_display, gGui->video_screen);
1522
  gVw->desktopHeight      = DisplayHeight(gGui->video_display, gGui->video_screen);
1537
1523
1538
#ifdef HAVE_XTESTEXTENSION
1539
  gVw->fake_keys[0] = XKeysymToKeycode(gGui->video_display, XK_Shift_L);
1540
  gVw->fake_keys[1] = XKeysymToKeycode(gGui->video_display, XK_Control_L);
1541
  gVw->fake_key_cur = 0;
1542
#endif
1543
  
1524
  
1544
  snprintf(gVw->window_title, sizeof(gVw->window_title), "%s", "xine");
1525
  snprintf(gVw->window_title, sizeof(gVw->window_title), "%s", "xine");
1545
  
1526
  
1546
  gettimeofday(&gVw->click_time, 0);
1527
  gettimeofday(&gVw->click_time, 0);
1547
1528
Lines 2273-2298 Link Here
2273
2254
2274
void video_window_reset_ssaver(void) {
2255
void video_window_reset_ssaver(void) {
2275
2256
2276
  if(gGui->ssaver_enabled && (xitk_get_last_keypressed_time() >= (long int) gGui->ssaver_timeout)) {
2257
  if(gGui->ssaver_enabled && (xitk_get_last_keypressed_time() >= (long int) gGui->ssaver_timeout)) {
2277
2258
2278
#ifdef HAVE_XTESTEXTENSION
2279
    if(gVw->have_xtest == True) {
2280
      
2281
      gVw->fake_key_cur++;
2282
      
2283
      if(gVw->fake_key_cur >= 2)
2284
	gVw->fake_key_cur = 0;
2285
2286
      XLockDisplay(gGui->video_display);
2287
      XTestFakeKeyEvent(gGui->video_display, gVw->fake_keys[gVw->fake_key_cur], True, CurrentTime);
2288
      XTestFakeKeyEvent(gGui->video_display, gVw->fake_keys[gVw->fake_key_cur], False, CurrentTime);
2289
      XSync(gGui->video_display, False);
2290
      XUnlockDisplay(gGui->video_display);
2291
    }
2292
    else 
2293
#endif
2294
    {
2259
    {
2295
      /* Reset the gnome screensaver. Look up the command in PATH only once to save time, */
2260
      /* Reset the gnome screensaver. Look up the command in PATH only once to save time, */
2296
      /* assuming its location and permission will not change during run time of xine-ui. */
2261
      /* assuming its location and permission will not change during run time of xine-ui. */
2297
      {
2262
      {
2298
	static char *gssaver_args[] = { "gnome-screensaver-command", "--poke", NULL };
2263
	static char *gssaver_args[] = { "gnome-screensaver-command", "--poke", NULL };

Return to bug 194602