mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
ksplash: disable hide on double-click feature for non-debug builds
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7e9cc4d3dc
commit
7163197736
1 changed files with 8 additions and 0 deletions
|
@ -564,7 +564,11 @@ static void createWindow()
|
||||||
window = XCreateWindow( qt_xdisplay(), DefaultRootWindow( qt_xdisplay()),
|
window = XCreateWindow( qt_xdisplay(), DefaultRootWindow( qt_xdisplay()),
|
||||||
geom.x(), geom.y(), geom.width(), geom.height(),
|
geom.x(), geom.y(), geom.width(), geom.height(),
|
||||||
0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect | CWBackPixmap, &attrs );
|
0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect | CWBackPixmap, &attrs );
|
||||||
|
#ifndef NDEBUG
|
||||||
XSelectInput( qt_xdisplay(), window, ButtonPressMask | ExposureMask );
|
XSelectInput( qt_xdisplay(), window, ButtonPressMask | ExposureMask );
|
||||||
|
#else
|
||||||
|
XSelectInput( qt_xdisplay(), window, ExposureMask );
|
||||||
|
#endif
|
||||||
XClassHint class_hint;
|
XClassHint class_hint;
|
||||||
class_hint.res_name = const_cast< char* >( "ksplashx" );
|
class_hint.res_name = const_cast< char* >( "ksplashx" );
|
||||||
class_hint.res_class = const_cast< char* >( "ksplashx" );
|
class_hint.res_class = const_cast< char* >( "ksplashx" );
|
||||||
|
@ -605,17 +609,20 @@ static bool waitState( int expected_state )
|
||||||
close( parent_pipe );
|
close( parent_pipe );
|
||||||
parent_pipe = -1;
|
parent_pipe = -1;
|
||||||
}
|
}
|
||||||
|
#ifndef NDEBUG
|
||||||
const int doubleclick_delay = 200; // mouse doubleclick delay - in ms
|
const int doubleclick_delay = 200; // mouse doubleclick delay - in ms
|
||||||
struct timeval button_press_time, current_time; // we need timeval to deal with milliseconds
|
struct timeval button_press_time, current_time; // we need timeval to deal with milliseconds
|
||||||
button_press_time.tv_sec = 0;
|
button_press_time.tv_sec = 0;
|
||||||
button_press_time.tv_usec = 0;
|
button_press_time.tv_usec = 0;
|
||||||
long click_delay, click_delay_seconds, click_delay_useconds;
|
long click_delay, click_delay_seconds, click_delay_useconds;
|
||||||
|
#endif
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
while( XPending( qt_xdisplay()))
|
while( XPending( qt_xdisplay()))
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
XNextEvent( qt_xdisplay(), &ev );
|
XNextEvent( qt_xdisplay(), &ev );
|
||||||
|
#ifndef NDEBUG
|
||||||
if( ev.type == ButtonPress && ev.xbutton.window == window && ev.xbutton.button == Button1 )
|
if( ev.type == ButtonPress && ev.xbutton.window == window && ev.xbutton.button == Button1 )
|
||||||
{
|
{
|
||||||
gettimeofday( ¤t_time, NULL );
|
gettimeofday( ¤t_time, NULL );
|
||||||
|
@ -633,6 +640,7 @@ static bool waitState( int expected_state )
|
||||||
}
|
}
|
||||||
gettimeofday( &button_press_time, NULL );
|
gettimeofday( &button_press_time, NULL );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if( ev.type == Expose && ev.xexpose.window == window )
|
if( ev.type == Expose && ev.xexpose.window == window )
|
||||||
doPaint( QRect( ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height ));
|
doPaint( QRect( ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height ));
|
||||||
if( ev.type == ConfigureNotify && ev.xconfigure.event == DefaultRootWindow( qt_xdisplay()))
|
if( ev.type == ConfigureNotify && ev.xconfigure.event == DefaultRootWindow( qt_xdisplay()))
|
||||||
|
|
Loading…
Add table
Reference in a new issue