By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 2028
Collapse All | Expand All

(-)a/twin/compton-tde/CMakeLists.txt (-6 / +9 lines)
Lines 12-19 Link Here
12
12
13
if( NOT WITH_XRENDER )
13
if( NOT WITH_XRENDER )
14
  tde_message_fatal( "xrender support is needed to build compton-tde.\n Pass -DWITH_XRENDER=ON to cmake arguments." )
14
  tde_message_fatal( "xrender support is needed to build compton-tde.\n Pass -DWITH_XRENDER=ON to cmake arguments." )
15
elseif( NOT WITH_XRANDR )
16
  tde_message_fatal( "xrandr support is needed to build compton-tde.\n Pass -DWITH_XRANDR=ON to cmake arguments." )
17
elseif( NOT WITH_XFIXES )
15
elseif( NOT WITH_XFIXES )
18
  tde_message_fatal( "xfixes support is needed to build compton-tde.\n Pass -DWITH_XFIXES=ON to cmake arguments." )
16
  tde_message_fatal( "xfixes support is needed to build compton-tde.\n Pass -DWITH_XFIXES=ON to cmake arguments." )
19
endif( )
17
endif( )
Lines 28-34 include_directories( Link Here
28
##### compton-tde (executable) ###################
26
##### compton-tde (executable) ###################
29
27
30
# TDE to compton config option map
28
# TDE to compton config option map
31
#  WITH_XINNERAMA         -> CONFIG_XINERAMA    
29
#  WITH_XINNERAMA         -> CONFIG_XINERAMA
30
#  WITH_XRANDR            -> CONFIG_XANDR
32
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL
31
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL
33
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL_GLSL
32
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL_GLSL
34
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL_FBO
33
#  WITH_OPENGL            -> CONFIG_VSYNC_OPENGL_FBO
Lines 68-73 if( WITH_XINERAMA ) Link Here
68
  list( APPEND compton_LIBRARIES ${XINERAMA_LIBRARIES} )
67
  list( APPEND compton_LIBRARIES ${XINERAMA_LIBRARIES} )
69
endif( )
68
endif( )
70
69
70
if( WITH_XRANDR )
71
  set( CONFIG_XRANDR ${WITH_XRANDR} )
72
  list( APPEND compton_LIBRARIES ${XRANDR_LIBRARIES} )
73
endif( )
74
71
if( WITH_PCRE )
75
if( WITH_PCRE )
72
  set( CONFIG_REGEX_PCRE        ${WITH_PCRE} )
76
  set( CONFIG_REGEX_PCRE        ${WITH_PCRE} )
73
  set( CONFIG_REGEX_PCRE_JIT    ${WITH_PCRE} )
77
  set( CONFIG_REGEX_PCRE_JIT    ${WITH_PCRE} )
Lines 82-89 list( APPEND compton_LIBRARIES ${DBUS_LIBRARIES} ) Link Here
82
86
83
tde_add_executable( compton-tde
87
tde_add_executable( compton-tde
84
    SOURCES ${compton_SRCS}
88
    SOURCES ${compton_SRCS}
85
  LINK m ${compton_LIBRARIES} ${XRENDER_LIBRARIES} 
89
  LINK m ${compton_LIBRARIES} ${XRENDER_LIBRARIES} ${XFIXES_LIBRARIES} 
86
    ${XRANDR_LIBRARIES} ${XFIXES_LIBRARIES} ${XDAMAGE_LIBRARIES} 
90
    ${XDAMAGE_LIBRARIES} ${XEXT_LIBRARIES} ${XCOMPOSITE_LIBRARIES}
87
    ${XEXT_LIBRARIES} ${XCOMPOSITE_LIBRARIES}
88
  DESTINATION ${BIN_INSTALL_DIR}
91
  DESTINATION ${BIN_INSTALL_DIR}
89
)
92
)
(-)a/twin/compton-tde/common.h (-1 / +6 lines)
Lines 106-117 Link Here
106
#include <X11/extensions/Xdamage.h>
106
#include <X11/extensions/Xdamage.h>
107
#include <X11/extensions/Xrender.h>
107
#include <X11/extensions/Xrender.h>
108
#include <X11/extensions/shape.h>
108
#include <X11/extensions/shape.h>
109
#include <X11/extensions/Xrandr.h>
110
#include <X11/extensions/Xdbe.h>
109
#include <X11/extensions/Xdbe.h>
111
#ifdef CONFIG_XSYNC
110
#ifdef CONFIG_XSYNC
112
#include <X11/extensions/sync.h>
111
#include <X11/extensions/sync.h>
113
#endif
112
#endif
114
113
114
#ifdef CONFIG_XRANDR
115
#include <X11/extensions/Xrandr.h>
116
#endif
117
115
#ifdef CONFIG_XINERAMA
118
#ifdef CONFIG_XINERAMA
116
#include <X11/extensions/Xinerama.h>
119
#include <X11/extensions/Xinerama.h>
117
#endif
120
#endif
Lines 921-932 typedef struct _session_t { Link Here
921
  int shape_event;
924
  int shape_event;
922
  /// Error base number for X Shape extension.
925
  /// Error base number for X Shape extension.
923
  int shape_error;
926
  int shape_error;
927
#ifdef CONFIG_XRANDR
924
  /// Whether X RandR extension exists.
928
  /// Whether X RandR extension exists.
925
  bool randr_exists;
929
  bool randr_exists;
926
  /// Event base number for X RandR extension.
930
  /// Event base number for X RandR extension.
927
  int randr_event;
931
  int randr_event;
928
  /// Error base number for X RandR extension.
932
  /// Error base number for X RandR extension.
929
  int randr_error;
933
  int randr_error;
934
#endif // CONFIG_XRANDR
930
#ifdef CONFIG_VSYNC_OPENGL
935
#ifdef CONFIG_VSYNC_OPENGL
931
  /// Whether X GLX extension exists.
936
  /// Whether X GLX extension exists.
932
  bool glx_exists;
937
  bool glx_exists;
(-)a/twin/compton-tde/compton.c (-11 / +40 lines)
Lines 4543-4548 ev_shape_notify(session_t *ps, XShapeEvent *ev) { Link Here
4543
  update_reg_ignore_expire(ps, w);
4543
  update_reg_ignore_expire(ps, w);
4544
}
4544
}
4545
4545
4546
#ifdef CONFIG_XRANDR
4546
/**
4547
/**
4547
 * Handle ScreenChangeNotify events from X RandR extension.
4548
 * Handle ScreenChangeNotify events from X RandR extension.
4548
 */
4549
 */
Lines 4561-4566 ev_screen_change_notify(session_t *ps, Link Here
4561
    }
4562
    }
4562
  }
4563
  }
4563
}
4564
}
4565
#endif // CONFIG_XRANDR
4564
4566
4565
#if defined(DEBUG_EVENTS) || defined(DEBUG_RESTACK)
4567
#if defined(DEBUG_EVENTS) || defined(DEBUG_RESTACK)
4566
/**
4568
/**
Lines 4659-4668 ev_handle(session_t *ps, XEvent *ev) { Link Here
4659
        ev_shape_notify(ps, (XShapeEvent *) ev);
4661
        ev_shape_notify(ps, (XShapeEvent *) ev);
4660
        break;
4662
        break;
4661
      }
4663
      }
4664
#ifdef CONFIG_XRANDR
4662
      if (ps->randr_exists && ev->type == (ps->randr_event + RRScreenChangeNotify)) {
4665
      if (ps->randr_exists && ev->type == (ps->randr_event + RRScreenChangeNotify)) {
4663
        ev_screen_change_notify(ps, (XRRScreenChangeNotifyEvent *) ev);
4666
        ev_screen_change_notify(ps, (XRRScreenChangeNotifyEvent *) ev);
4664
        break;
4667
        break;
4665
      }
4668
      }
4669
#endif // CONFIG_XRANDR
4666
      if (isdamagenotify(ps, ev)) {
4670
      if (isdamagenotify(ps, ev)) {
4667
        ev_damage_notify(ps, (XDamageNotifyEvent *) ev);
4671
        ev_damage_notify(ps, (XDamageNotifyEvent *) ev);
4668
        break;
4672
        break;
Lines 4762-4770 usage(int ret) { Link Here
4762
    "  Detect _NET_WM_OPACITY on client windows, useful for window\n"
4766
    "  Detect _NET_WM_OPACITY on client windows, useful for window\n"
4763
    "  managers not passing _NET_WM_OPACITY of client windows to frame\n"
4767
    "  managers not passing _NET_WM_OPACITY of client windows to frame\n"
4764
    "  windows.\n"
4768
    "  windows.\n"
4769
#ifndef CONFIG_XRANDR
4770
#define WARNING " (AUTODETECTION DISABLED AT COMPILE TIME)"
4771
#else
4772
#define WARNING
4773
#endif
4765
    "--refresh-rate val\n"
4774
    "--refresh-rate val\n"
4766
    "  Specify refresh rate of the screen. If not specified or 0, compton\n"
4775
    "  Specify refresh rate of the screen. If not specified or 0, compton\n"
4767
    "  will try detecting this with X RandR extension.\n"
4776
    "  will try detecting this with X RandR extension."WARNING"\n"
4768
    "--vsync vsync-method\n"
4777
    "--vsync vsync-method\n"
4769
    "  Set VSync method. There are up to 4 VSync methods currently available.\n"
4778
    "  Set VSync method. There are up to 4 VSync methods currently available.\n"
4770
    "    none = No VSync\n"
4779
    "    none = No VSync\n"
Lines 6259-6282 init_atoms(session_t *ps) { Link Here
6259
  ps->atom_win_type_tde_transparent_to_desktop = get_atom(ps, "_TDE_TRANSPARENT_TO_DESKTOP");
6268
  ps->atom_win_type_tde_transparent_to_desktop = get_atom(ps, "_TDE_TRANSPARENT_TO_DESKTOP");
6260
}
6269
}
6261
6270
6271
#ifdef CONFIG_XRANDR
6262
/**
6272
/**
6263
 * Update refresh rate info with X Randr extension.
6273
 * Update refresh rate info with X Randr extension.
6264
 */
6274
 */
6265
static void
6275
static void
6266
update_refresh_rate(session_t *ps) {
6276
update_refresh_rate(session_t *ps) {
6267
  XRRScreenConfiguration* randr_info;
6277
  XRRScreenConfiguration* randr_info;
6268
6278
  
6269
  if (!(randr_info = XRRGetScreenInfo(ps->dpy, ps->root)))
6279
  if (!(randr_info = XRRGetScreenInfo(ps->dpy, ps->root)))
6270
    return;
6280
    return;
6271
  ps->refresh_rate = XRRConfigCurrentRate(randr_info);
6281
  ps->refresh_rate = XRRConfigCurrentRate(randr_info);
6272
6282
  
6273
  XRRFreeScreenConfigInfo(randr_info);
6283
  XRRFreeScreenConfigInfo(randr_info);
6274
6284
  
6275
  if (ps->refresh_rate)
6285
  if (ps->refresh_rate)
6276
    ps->refresh_intv = US_PER_SEC / ps->refresh_rate;
6286
    ps->refresh_intv = US_PER_SEC / ps->refresh_rate;
6277
  else
6287
  else
6278
    ps->refresh_intv = 0;
6288
    ps->refresh_intv = 0;
6279
}
6289
}
6290
#endif // CONFIG_XRANDR
6280
6291
6281
/**
6292
/**
6282
 * Initialize refresh-rated based software optimization.
6293
 * Initialize refresh-rated based software optimization.
Lines 6291-6300 swopti_init(session_t *ps) { Link Here
6291
  if (ps->refresh_rate)
6302
  if (ps->refresh_rate)
6292
    ps->refresh_intv = US_PER_SEC / ps->refresh_rate;
6303
    ps->refresh_intv = US_PER_SEC / ps->refresh_rate;
6293
6304
6305
#ifdef CONFIG_XRANDR
6294
  // Auto-detect refresh rate otherwise
6306
  // Auto-detect refresh rate otherwise
6295
  if (!ps->refresh_rate && ps->randr_exists) {
6307
  if (!ps->refresh_rate && ps->randr_exists) {
6296
    update_refresh_rate(ps);
6308
    update_refresh_rate(ps);
6297
  }
6309
  }
6310
#endif // CONFIG_XRANDR
6298
6311
6299
  // Turn off vsync_sw if we can't get the refresh rate
6312
  // Turn off vsync_sw if we can't get the refresh rate
6300
  if (!ps->refresh_rate)
6313
  if (!ps->refresh_rate)
Lines 7196-7204 session_init(session_t *ps_old, int argc, char **argv) { Link Here
7196
    .shape_exists = false,
7209
    .shape_exists = false,
7197
    .shape_event = 0,
7210
    .shape_event = 0,
7198
    .shape_error = 0,
7211
    .shape_error = 0,
7212
#ifdef CONFIG_XRANDR
7199
    .randr_exists = 0,
7213
    .randr_exists = 0,
7200
    .randr_event = 0,
7214
    .randr_event = 0,
7201
    .randr_error = 0,
7215
    .randr_error = 0,
7216
#endif // CONFIG_XRANDR
7202
#ifdef CONFIG_VSYNC_OPENGL
7217
#ifdef CONFIG_VSYNC_OPENGL
7203
    .glx_exists = false,
7218
    .glx_exists = false,
7204
    .glx_event = 0,
7219
    .glx_event = 0,
Lines 7371-7381 session_init(session_t *ps_old, int argc, char **argv) { Link Here
7371
7386
7372
  // Query X RandR
7387
  // Query X RandR
7373
  if ((ps->o.sw_opti && !ps->o.refresh_rate) || ps->o.xinerama_shadow_crop) {
7388
  if ((ps->o.sw_opti && !ps->o.refresh_rate) || ps->o.xinerama_shadow_crop) {
7374
    if (XRRQueryExtension(ps->dpy, &ps->randr_event, &ps->randr_error))
7389
#ifdef CONFIG_XRANDR
7375
      ps->randr_exists = true;
7390
	if (XRRQueryExtension(ps->dpy, &ps->randr_event, &ps->randr_error))
7376
    else
7391
	  ps->randr_exists = true;
7377
      printf_errf("(): No XRandR extension, automatic screen change "
7392
	else
7378
          "detection impossible.");
7393
	  printf_errf("(): No XRandR extension, automatic screen change "
7394
	      "detection impossible.");
7395
#else // CONFIG_XRANDR
7396
    printf_errf("(): Xrandr support not compiled in.");
7397
#endif // CONFIG_XRANDR
7379
  }
7398
  }
7380
7399
7381
  // Query X DBE extension
7400
  // Query X DBE extension
Lines 7435-7445 session_init(session_t *ps_old, int argc, char **argv) { Link Here
7435
  if (ps->o.sw_opti)
7454
  if (ps->o.sw_opti)
7436
    ps->o.sw_opti = swopti_init(ps);
7455
    ps->o.sw_opti = swopti_init(ps);
7437
7456
7457
#ifdef CONFIG_XRANDR
7438
  // Monitor screen changes if vsync_sw is enabled and we are using
7458
  // Monitor screen changes if vsync_sw is enabled and we are using
7439
  // an auto-detected refresh rate, or when Xinerama features are enabled
7459
  // an auto-detected refresh rate, or when Xinerama features are enabled
7440
  if (ps->randr_exists && ((ps->o.sw_opti && !ps->o.refresh_rate)
7460
  if (ps->randr_exists && ((ps->o.sw_opti && !ps->o.refresh_rate)
7441
        || ps->o.xinerama_shadow_crop))
7461
    || ps->o.xinerama_shadow_crop))
7442
    XRRSelectInput(ps->dpy, ps->root, RRScreenChangeNotifyMask);
7462
	  XRRSelectInput(ps->dpy, ps->root, RRScreenChangeNotifyMask);
7463
#else
7464
  if( (ps->o.sw_opti && !ps->o.refresh_rate) ) {
7465
    printf_errf("(): Xrandr support not compiled in. Plese specify --refrash-rate manually");
7466
  }
7467
  if (ps->o.xinerama_shadow_crop) {
7468
    printf_errf("(): due to Xrandr support not compiled in."
7469
			" Xinerama features may malfunction on changing screen size.");
7470
  }
7471
#endif // CONFIG_XRANDR
7443
7472
7444
  // Initialize VSync
7473
  // Initialize VSync
7445
  if (!vsync_init(ps))
7474
  if (!vsync_init(ps))
(-)a/twin/compton-tde/compton_config.h.cmake (-1 / +2 lines)
Lines 32-36 Link Here
32
// Whether to enable GLX Sync support.
32
// Whether to enable GLX Sync support.
33
#cmakedefine CONFIG_GLX_XSYNC 1
33
#cmakedefine CONFIG_GLX_XSYNC 1
34
34
35
// Whether to enable Xranr support
36
#cmakedefine CONFIG_XRANDR 1
35
// Whether to enable Xinerama support
37
// Whether to enable Xinerama support
36
#cmakedefine CONFIG_XINERAMA 1
38
#cmakedefine CONFIG_XINERAMA 1
37
- 

Return to bug 2028