summaryrefslogtreecommitdiffstats
path: root/twin
diff options
context:
space:
mode:
Diffstat (limited to 'twin')
-rw-r--r--twin/CMakeL10n.txt1
-rw-r--r--twin/CMakeLists.txt11
-rw-r--r--twin/KWinInterface.h7
-rw-r--r--twin/README6
-rw-r--r--twin/activation.cpp8
-rw-r--r--twin/bridge.cpp2
-rw-r--r--twin/client.cpp142
-rw-r--r--twin/client.h10
-rw-r--r--twin/clients/PORTING10
-rw-r--r--twin/clients/b2/b2client.cpp68
-rw-r--r--twin/clients/b2/config/config.cpp14
-rw-r--r--twin/clients/default/config/config.cpp14
-rw-r--r--twin/clients/default/kdedefault.cpp2
-rw-r--r--twin/clients/keramik/config/config.cpp10
-rw-r--r--twin/clients/keramik/embedtool.cpp6
-rw-r--r--twin/clients/keramik/keramik.cpp46
-rw-r--r--twin/clients/kwmtheme/cli_installer/main.cpp6
-rw-r--r--twin/clients/kwmtheme/kwmthemeclient.cpp16
-rw-r--r--twin/clients/laptop/laptopclient.cpp2
-rw-r--r--twin/clients/modernsystem/config/config.cpp8
-rw-r--r--twin/clients/modernsystem/modernsys.cpp2
-rw-r--r--twin/clients/plastik/config/config.cpp22
-rw-r--r--twin/clients/plastik/misc.cpp4
-rw-r--r--twin/clients/plastik/plastik.cpp2
-rw-r--r--twin/clients/plastik/plastik.h4
-rw-r--r--twin/clients/plastik/plastikbutton.cpp2
-rw-r--r--twin/clients/plastik/plastikbutton.h2
-rw-r--r--twin/clients/plastik/plastikclient.cpp2
-rw-r--r--twin/clients/quartz/config/config.cpp6
-rw-r--r--twin/clients/quartz/quartz.cpp2
-rw-r--r--twin/clients/redmond/redmond.cpp2
-rw-r--r--twin/clients/test/test.cpp8
-rw-r--r--twin/clients/web/Web.cpp2
-rw-r--r--twin/compton-tde/CMakeLists.txt16
-rw-r--r--twin/compton-tde/c2.c51
-rw-r--r--twin/compton-tde/c2.h21
-rw-r--r--twin/compton-tde/common.h10
-rw-r--r--twin/compton-tde/compton_config.h.cmake10
-rw-r--r--twin/compton-tde/man/compton-tde.1.html4
-rw-r--r--twin/compton-tde/man/compton.14
-rw-r--r--twin/data/update_default_rules.cpp4
-rw-r--r--twin/data/update_window_settings.cpp18
-rw-r--r--twin/events.cpp77
-rw-r--r--twin/geometry.cpp133
-rw-r--r--twin/kcmtwin/twindecoration/buttons.cpp14
-rw-r--r--twin/kcmtwin/twindecoration/preview.cpp2
-rw-r--r--twin/kcmtwin/twindecoration/twindecoration.cpp139
-rw-r--r--twin/kcmtwin/twinoptions/main.cpp44
-rw-r--r--twin/kcmtwin/twinoptions/mouse.cpp54
-rw-r--r--twin/kcmtwin/twinoptions/windows.cpp324
-rw-r--r--twin/kcmtwin/twinrules/detectwidget.cpp4
-rw-r--r--twin/kcmtwin/twinrules/editshortcutbase.ui4
-rw-r--r--twin/kcmtwin/twinrules/kcm.cpp12
-rw-r--r--twin/kcmtwin/twinrules/main.cpp8
-rw-r--r--twin/kcmtwin/twinrules/ruleslist.cpp32
-rw-r--r--twin/kcmtwin/twinrules/ruleslistbase.ui4
-rw-r--r--twin/kcmtwin/twinrules/ruleswidget.cpp10
-rw-r--r--twin/kcmtwin/twinrules/ruleswidgetbase.ui6
-rw-r--r--twin/killer/killer.cpp2
-rw-r--r--twin/killwindow.cpp2
-rw-r--r--twin/lib/kcommondecoration.cpp42
-rw-r--r--twin/lib/kdecoration.cpp2
-rw-r--r--twin/lib/kdecoration.h4
-rw-r--r--twin/main.cpp22
-rw-r--r--twin/manage.cpp18
-rw-r--r--twin/notifications.cpp2
-rw-r--r--twin/options.cpp18
-rw-r--r--twin/pics/CMakeLists.txt16
-rw-r--r--twin/pics/tile_bottom.pngbin0 -> 3425 bytes
-rw-r--r--twin/pics/tile_bottomleft.pngbin0 -> 3410 bytes
-rw-r--r--twin/pics/tile_bottomright.pngbin0 -> 3414 bytes
-rw-r--r--twin/pics/tile_left.pngbin0 -> 3417 bytes
-rw-r--r--twin/pics/tile_right.pngbin0 -> 3416 bytes
-rw-r--r--twin/pics/tile_top.pngbin0 -> 3437 bytes
-rw-r--r--twin/pics/tile_topleft.pngbin0 -> 3427 bytes
-rw-r--r--twin/pics/tile_topright.pngbin0 -> 3427 bytes
-rw-r--r--twin/plugins.cpp2
-rw-r--r--twin/popupinfo.cpp6
-rw-r--r--twin/resumer/resumer.cpp2
-rw-r--r--twin/rules.cpp8
-rw-r--r--twin/sm.cpp32
-rw-r--r--twin/sm.h2
-rw-r--r--twin/tabbox.cpp28
-rw-r--r--twin/tabbox.h2
-rw-r--r--twin/tools/decobenchmark/main.cpp2
-rw-r--r--twin/tools/decobenchmark/preview.cpp10
-rw-r--r--twin/tools/decobenchmark/preview.h2
-rw-r--r--twin/twinbindings.cpp4
-rw-r--r--twin/useractions.cpp195
-rw-r--r--twin/utils.cpp8
-rw-r--r--twin/utils.h23
-rw-r--r--twin/workspace.cpp301
-rw-r--r--twin/workspace.h16
93 files changed, 1187 insertions, 1038 deletions
diff --git a/twin/CMakeL10n.txt b/twin/CMakeL10n.txt
index 11540e442..07bc99559 100644
--- a/twin/CMakeL10n.txt
+++ b/twin/CMakeL10n.txt
@@ -5,6 +5,7 @@ tde_l10n_create_template(
EXCLUDES
"^clients/"
"^kcmtwin/"
+ "^lib/"
)
tde_l10n_auto_add_subdirectories( )
diff --git a/twin/CMakeLists.txt b/twin/CMakeLists.txt
index 33a2302e4..261e0eb34 100644
--- a/twin/CMakeLists.txt
+++ b/twin/CMakeLists.txt
@@ -15,7 +15,6 @@ add_subdirectory( lib )
add_subdirectory( killer )
add_subdirectory( resumer )
add_subdirectory( kcmtwin )
-add_subdirectory( pics )
add_subdirectory( clients )
add_subdirectory( oldheaders )
add_subdirectory( data )
@@ -40,10 +39,18 @@ link_directories(
install( FILES KWinInterface.h DESTINATION ${INCLUDE_INSTALL_DIR} )
-##### other data ################################
+##### icons #####################################
tde_install_icons( twin )
+install(
+ DIRECTORY pics/
+ DESTINATION ${DATA_INSTALL_DIR}/twin/pics
+ FILES_MATCHING PATTERN *.png
+)
+
+##### other data ################################
+
tde_create_translated_desktop(
SOURCE eventsrc
DESTINATION ${DATA_INSTALL_DIR}/twin
diff --git a/twin/KWinInterface.h b/twin/KWinInterface.h
index dbc132888..37fe2d9b6 100644
--- a/twin/KWinInterface.h
+++ b/twin/KWinInterface.h
@@ -18,7 +18,8 @@ class KWinInterface : virtual public DCOPObject
virtual bool isResumeableWindowID(unsigned long winId) = 0;
virtual void refresh() = 0;
virtual void doNotManage(TQString)= 0;
- virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0;
+ virtual void showWindowMenuAt(unsigned long winId, int x, int y) = 0;
+ virtual void showWindowMenu(unsigned long winId) = 0;
virtual void kDestopResized() = 0;
virtual void setDesktopLayout(int orientation, int x, int y)= 0;
virtual bool setCurrentDesktop(int)= 0;
@@ -28,6 +29,10 @@ class KWinInterface : virtual public DCOPObject
virtual void circulateDesktopApplications() = 0;
virtual void updateOverlappingShadows(unsigned long window) = 0;
virtual void setShadowed(unsigned long window, bool shadowed) = 0;
+ virtual void tileWindowToBorder(unsigned long w1, int location) = 0;
+ virtual void tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2) = 0;
+ virtual void tileTwoWindowsVertically(unsigned long w1, unsigned long w2) = 0;
+ virtual void tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4) = 0;
// kompmgr stuff
virtual void startKompmgr() = 0;
diff --git a/twin/README b/twin/README
index 8d61c7163..d2fb31c75 100644
--- a/twin/README
+++ b/twin/README
@@ -163,16 +163,16 @@ WM_TRANSIENT_FOR property is manually set using the XSetTransientForHint()
call (see tdelibs/tdeioslave/http/kcookiejar/kcookiewin.cpp). The arguments
to XSetTransientForHint() call are the X display (i.e. qt_xdisplay()),
the window id on which the WM_TRANSIENT_FOR property is to be set
-(i.e. use QWidget::winId()), and the window id of the mainwindow.
+(i.e. use TQWidget::winId()), and the window id of the mainwindow.
Simple short HOWTO:
To put it simply: Let's say you have a daemon application that has
-DCOP call "showDialog( QString text )", and when this is called, it shows
+DCOP call "showDialog( TQString text )", and when this is called, it shows
a dialog with the given text. This won't work properly with focus stealing
prevention. The DCOP call should be changed to
-"showDialog( QString text, long id )". The caller should pass something like
+"showDialog( TQString text, long id )". The caller should pass something like
myMainWindow->winId() as the second argument. In the daemon, before
the dialog is shown, a call to XSetTransientHint() should be added:
diff --git a/twin/activation.cpp b/twin/activation.cpp
index 83ff24edb..69af35576 100644
--- a/twin/activation.cpp
+++ b/twin/activation.cpp
@@ -166,7 +166,7 @@ namespace KWinInternal
be used, and it's old; also, creation timestamp is changed to
the time the instance starts (re-)initializing the window,
this ensures creation timestamp will still work somewhat even in this case
- - KUniqueApplication - when the window is already visible, and the new instance
+ - TDEUniqueApplication - when the window is already visible, and the new instance
wants it to activate
- without focus stealing prevention - _NET_ACTIVE_WINDOW - no problem
- with ASN - ASN is forwarded, and set on the already visible window, KWin
@@ -674,7 +674,7 @@ void Workspace::unfakeActivity( Client* c )
void Client::updateUserTime( Time time )
{ // copied in Group::updateUserTime
if( time == CurrentTime )
- time = GET_QT_X_TIME();
+ time = get_tqt_x_time();
if( time != -1U
&& ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time
@@ -727,7 +727,7 @@ void Client::demandAttention( bool set )
if( demandAttentionKNotifyTimer == NULL )
{
demandAttentionKNotifyTimer = new TQTimer( this );
- connect( demandAttentionKNotifyTimer, TQT_SIGNAL( timeout()), TQT_SLOT( demandAttentionKNotify()));
+ connect( demandAttentionKNotifyTimer, TQ_SIGNAL( timeout()), TQ_SLOT( demandAttentionKNotify()));
}
demandAttentionKNotifyTimer->start( 1000, true );
}
@@ -1005,7 +1005,7 @@ void Group::startupIdChanged()
void Group::updateUserTime( Time time )
{ // copy of Client::updateUserTime
if( time == CurrentTime )
- time = GET_QT_X_TIME();
+ time = get_tqt_x_time();
if( time != -1U
&& ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time
diff --git a/twin/bridge.cpp b/twin/bridge.cpp
index f79382457..5a9365dbe 100644
--- a/twin/bridge.cpp
+++ b/twin/bridge.cpp
@@ -147,7 +147,7 @@ TQWidget* Bridge::initialParentWidget() const
return NULL;
}
-Qt::WFlags Bridge::initialWFlags() const
+TQt::WFlags Bridge::initialWFlags() const
{
return 0;
}
diff --git a/twin/client.cpp b/twin/client.cpp
index 8c303ec15..028c32c12 100644
--- a/twin/client.cpp
+++ b/twin/client.cpp
@@ -18,9 +18,9 @@ License. See the file "COPYING" for the exact licensing terms.
#include <tqdatetime.h>
#include <tqimage.h>
#include <tqfile.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <unistd.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tqwhatsthis.h>
#include <twin.h>
#include <kiconloader.h>
@@ -99,6 +99,7 @@ Client::Client( Workspace *ws )
decoration( NULL ),
wspace( ws ),
bridge( new Bridge( this )),
+ inhibitConfigureRequests(false),
move_faked_activity( false ),
move_resize_grab_window( None ),
transient_for( NULL ),
@@ -128,35 +129,38 @@ Client::Client( Workspace *ws )
autoRaiseTimer = 0;
shadeHoverTimer = 0;
+ configureRequestTimer = new TQTimer(this);
+ connect(configureRequestTimer, TQ_SIGNAL(timeout()), TQ_SLOT(configureRequestTimeout()));
+
shadowDelayTimer = new TQTimer(this);
opacityCache = &activeOpacityCache;
shadowAfterClient = NULL;
shadowWidget = NULL;
shadowMe = true;
- connect(shadowDelayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(drawShadow()));
+ connect(shadowDelayTimer, TQ_SIGNAL(timeout()), TQ_SLOT(drawShadow()));
// set the initial mapping state
mapping_state = WithdrawnState;
desk = 0; // no desktop yet
mode = PositionCenter;
- buttonDown = FALSE;
- moveResizeMode = FALSE;
+ buttonDown = false;
+ moveResizeMode = false;
info = NULL;
shade_mode = ShadeNone;
- active = FALSE;
+ active = false;
deleting = false;
- keep_above = FALSE;
- keep_below = FALSE;
- is_shape = FALSE;
+ keep_above = false;
+ keep_below = false;
+ is_shape = false;
motif_noborder = false;
- motif_may_move = TRUE;
- motif_may_resize = TRUE;
- motif_may_close = TRUE;
+ motif_may_move = true;
+ motif_may_resize = true;
+ motif_may_close = true;
fullscreen_mode = FullScreenNone;
- skip_taskbar = FALSE;
+ skip_taskbar = false;
original_skip_taskbar = false;
minimized = false;
hidden = false;
@@ -173,8 +177,8 @@ Client::Client( Workspace *ws )
Ptakeactivity = 0;
Pcontexthelp = 0;
Pping = 0;
- input = FALSE;
- skip_pager = FALSE;
+ input = false;
+ skip_pager = false;
max_mode = MaximizeRestore;
maxmode_restore = MaximizeRestore;
@@ -220,7 +224,7 @@ void Client::releaseWindow( bool on_shutdown )
deleting = true;
workspace()->discardUsedWindowRules( this, true ); // remove ForceTemporarily rules
StackingUpdatesBlocker blocker( workspace());
- if (!custom_opacity) setOpacity(FALSE);
+ if (!custom_opacity) setOpacity(false);
if (moveResizeMode)
leaveMoveResize();
removeShadow();
@@ -441,7 +445,7 @@ void Client::detectShapable()
case NET::Menu :
case NET::Dialog :
case NET::Utility :
- setShapable(FALSE);
+ setShapable(false);
break;
default:
assert( false );
@@ -518,9 +522,9 @@ bool Client::isModalSystemNotification() const
result = XGetWindowProperty(tqt_xdisplay(), window(), atoms->net_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);
if (result == Success && data && format == 32 )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void Client::updateShape()
@@ -537,7 +541,7 @@ void Client::updateShape()
XShapeCombineShape(tqt_xdisplay(), frameId(), ShapeBounding,
clientPos().x(), clientPos().y(),
window(), ShapeBounding, ShapeSet);
- setShapable(TRUE);
+ setShapable(true);
}
// !shape() mask setting is done in setMask() when the decoration
// calls it or when the decoration is created/destroyed
@@ -705,7 +709,7 @@ void Client::unminimize( bool avoid_animation )
if( isOnCurrentDesktop() && isShown( true ))
{
if( mainClients().isEmpty() && !avoid_animation )
- animateMinimizeOrUnminimize( FALSE );
+ animateMinimizeOrUnminimize( false );
}
updateVisibility();
updateAllowedActions();
@@ -774,7 +778,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
float diff;
TQPainter p ( workspace()->desktopWidget() );
- bool need_to_clear = FALSE;
+ bool need_to_clear = false;
TQPixmap pm3;
do
{
@@ -786,7 +790,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
if ( need_to_clear )
{
p.drawPixmap( area2.x(), area2.y(), pm3 );
- need_to_clear = FALSE;
+ need_to_clear = false;
}
area2 = area;
}
@@ -806,7 +810,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
else
{ // no overlap, we can clear later to avoid flicker
pm3 = pm2;
- need_to_clear = TRUE;
+ need_to_clear = true;
}
}
} while ( t.elapsed() < step);
@@ -893,10 +897,10 @@ void Client::setShade( ShadeMode mode )
XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask );
//as we hid the unmap event, xcompmgr didn't recognize the client wid has vanished, so we'll extra inform it
//done xcompmgr workaround
-// FRAME repaint( FALSE );
+// FRAME repaint( false );
// bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents );
- int step = TQMAX( 4, QABS( h - s.height() ) / as )+1;
+ int step = TQMAX( 4, TQABS( h - s.height() ) / as )+1;
do
{
h -= step;
@@ -926,7 +930,7 @@ void Client::setShade( ShadeMode mode )
TQSize s( sizeForClientSize( clientSize()));
// FRAME bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents );
- int step = TQMAX( 4, QABS( h - s.height() ) / as )+1;
+ int step = TQMAX( 4, TQABS( h - s.height() ) / as )+1;
do
{
h += step;
@@ -934,7 +938,7 @@ void Client::setShade( ShadeMode mode )
resizeDecoration( TQSize( s.width(), h ));
// assume a border
// we do not have time to wait for X to send us paint events
-// FRAME repaint( 0, h - step-5, width(), step+5, TRUE);
+// FRAME repaint( 0, h - step-5, width(), step+5, true);
TQApplication::syncX();
} while ( h < s.height() - step );
// if ( !wasStaticContents )
@@ -942,7 +946,7 @@ void Client::setShade( ShadeMode mode )
shade_geometry_change = false;
plainResize( s );
if( shade_mode == ShadeHover || shade_mode == ShadeActivated )
- setActive( TRUE );
+ setActive( true );
XMapWindow( tqt_xdisplay(), wrapperId());
XMapWindow( tqt_xdisplay(), window());
XDeleteProperty (tqt_xdisplay(), client, atoms->net_wm_window_shade);
@@ -969,6 +973,12 @@ void Client::setShade( ShadeMode mode )
updateWindowRules();
}
+void Client::configureRequestTimeout()
+ {
+ inhibitConfigureRequests = false;
+ sendSyntheticConfigureNotify();
+ }
+
void Client::shadeHover()
{
setShade( ShadeHover );
@@ -1200,7 +1210,7 @@ void Client::drawDelayedShadow()
void Client::drawShadowAfter(Client *after)
{
shadowAfterClient = after;
- connect(after, TQT_SIGNAL(shadowDrawn()), TQT_SLOT(drawShadow()));
+ connect(after, TQ_SIGNAL(shadowDrawn()), TQ_SLOT(drawShadow()));
}
/*!
@@ -1214,7 +1224,7 @@ void Client::drawShadow()
// If we are waiting for another Client's shadow to be drawn, stop waiting now
if (shadowAfterClient != NULL) {
- disconnect(shadowAfterClient, TQT_SIGNAL(shadowDrawn()), this, TQT_SLOT(drawShadow()));
+ disconnect(shadowAfterClient, TQ_SIGNAL(shadowDrawn()), this, TQ_SLOT(drawShadow()));
shadowAfterClient = NULL;
}
@@ -1260,7 +1270,7 @@ void Client::drawShadow()
removeShadow();
- TQMemArray<QRgb> pixelData;
+ TQMemArray<TQRgb> pixelData;
TQPixmap shadowPixmap;
TQRect shadow;
TQRegion exposedRegion;
@@ -1433,7 +1443,7 @@ TQRegion Client::getExposedRegion(TQRegion occludedRegion, int x, int y, int w,
*/
void Client::imposeCachedShadow(TQPixmap &pixmap, TQRegion exposed)
{
- QRgb pixel;
+ TQRgb pixel;
double opacity;
int red, green, blue, pixelRed, pixelGreen, pixelBlue;
int subW, subH, w, x, y, zeroX, zeroY;
@@ -1490,7 +1500,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded,
TQRegion exposed, int thickness, double maxOpacity)
{
int distance, intersectCount, i, j, x, y;
- QRgb pixel;
+ TQRgb pixel;
double decay, factor, opacity;
int red, green, blue, pixelRed, pixelGreen, pixelBlue;
int lineIntersects, maxIntersects, maxY;
@@ -1704,7 +1714,7 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long
ev.xclient.message_type = a;
ev.xclient.format = 32;
ev.xclient.data.l[0] = protocol;
- ev.xclient.data.l[1] = GET_QT_X_TIME();
+ ev.xclient.data.l[1] = get_tqt_x_time();
ev.xclient.data.l[2] = data1;
ev.xclient.data.l[3] = data2;
ev.xclient.data.l[4] = data3;
@@ -1781,9 +1791,9 @@ void Client::pingWindow()
if( ping_timer != NULL )
return; // pinging already
ping_timer = new TQTimer( this );
- connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout()));
+ connect( ping_timer, TQ_SIGNAL( timeout()), TQ_SLOT( pingTimeout()));
ping_timer->start( options->killPingTimeout, true );
- ping_timestamp = GET_QT_X_TIME();
+ ping_timestamp = get_tqt_x_time();
workspace()->sendPingToWindow( window(), ping_timestamp );
}
@@ -1840,8 +1850,8 @@ void Client::killProcess( bool ask, Time timestamp )
<< "--applicationname" << resourceClass()
<< "--wid" << TQCString().setNum( window())
<< "--timestamp" << TQCString().setNum( timestamp );
- connect( process_killer, TQT_SIGNAL( processExited( TDEProcess* )),
- TQT_SLOT( processKillerExited()));
+ connect( process_killer, TQ_SIGNAL( processExited( TDEProcess* )),
+ TQ_SLOT( processKillerExited()));
if( !process_killer->start( TDEProcess::NotifyOnExit ))
{
delete process_killer;
@@ -1887,7 +1897,7 @@ bool Client::isSuspendable() const
tcomm = basename(tbuf);
#else /* default */
TQString statString(statRaw);
- TQStringList statFields = TQStringList::split(" ", statString, TRUE);
+ TQStringList statFields = TQStringList::split(" ", statString, true);
TQString tcomm = statFields[1];
TQString state = statFields[2];
#endif /* default */
@@ -1957,7 +1967,7 @@ bool Client::isResumeable() const
TQString state(TQChar(inf->pr_sname));
#else /* default */
TQString statString(statRaw);
- TQStringList statFields = TQStringList::split(" ", statString, TRUE);
+ TQStringList statFields = TQStringList::split(" ", statString, true);
TQString tcomm = statFields[1];
TQString state = statFields[2];
#endif /* default */
@@ -1992,8 +2002,8 @@ bool Client::queryUserSuspendedResume()
<< "--windowname" << caption().utf8()
<< "--applicationname" << resourceClass()
<< "--wid" << TQCString().setNum( window());
- connect( process_resumer, TQT_SIGNAL( processExited( TDEProcess* )),
- TQT_SLOT( processResumerExited()));
+ connect( process_resumer, TQ_SIGNAL( processExited( TDEProcess* )),
+ TQ_SLOT( processResumerExited()));
if( !process_resumer->start( TDEProcess::NotifyOnExit ))
{
delete process_resumer;
@@ -2203,15 +2213,15 @@ void Client::takeActivity( int flags, bool handled, allowed_t )
#ifndef NDEBUG
static Time previous_activity_timestamp;
static Client* previous_client;
- if( previous_activity_timestamp == GET_QT_X_TIME() && previous_client != this )
+ if( previous_activity_timestamp == get_tqt_x_time() && previous_client != this )
{
kdDebug( 1212 ) << "Repeated use of the same X timestamp for activity" << endl;
kdDebug( 1212 ) << kdBacktrace() << endl;
}
- previous_activity_timestamp = GET_QT_X_TIME();
+ previous_activity_timestamp = get_tqt_x_time();
previous_client = this;
#endif
- workspace()->sendTakeActivity( this, GET_QT_X_TIME(), flags );
+ workspace()->sendTakeActivity( this, get_tqt_x_time(), flags );
}
// performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS
@@ -2220,17 +2230,17 @@ void Client::takeFocus( allowed_t )
#ifndef NDEBUG
static Time previous_focus_timestamp;
static Client* previous_client;
- if( previous_focus_timestamp == GET_QT_X_TIME() && previous_client != this )
+ if( previous_focus_timestamp == get_tqt_x_time() && previous_client != this )
{
kdDebug( 1212 ) << "Repeated use of the same X timestamp for focus" << endl;
kdDebug( 1212 ) << kdBacktrace() << endl;
}
- previous_focus_timestamp = GET_QT_X_TIME();
+ previous_focus_timestamp = get_tqt_x_time();
previous_client = this;
#endif
if ( rules()->checkAcceptFocus( input ))
{
- XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() );
+ XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, get_tqt_x_time() );
// Work around opacity bug
bool activePrev = active;
active = true;
@@ -2412,11 +2422,11 @@ void Client::readIcons( Window win, TQPixmap* icon, TQPixmap* miniicon )
{
// get the icons, allow scaling
if( icon != NULL )
- *icon = KWin::icon( win, 32, 32, TRUE, KWin::NETWM | KWin::WMHints );
+ *icon = KWin::icon( win, 32, 32, true, KWin::NETWM | KWin::WMHints );
if( miniicon != NULL )
{
if( icon == NULL || !icon->isNull())
- *miniicon = KWin::icon( win, 16, 16, TRUE, KWin::NETWM | KWin::WMHints );
+ *miniicon = KWin::icon( win, 16, 16, true, KWin::NETWM | KWin::WMHints );
else
*miniicon = TQPixmap();
}
@@ -2444,8 +2454,8 @@ void Client::getIcons()
}
if( icon_pix.isNull())
{ // and if nothing else, load icon from classhint or xapp icon
- icon_pix = KWin::icon( window(), 32, 32, TRUE, KWin::ClassHint | KWin::XApp );
- miniicon_pix = KWin::icon( window(), 16, 16, TRUE, KWin::ClassHint | KWin::XApp );
+ icon_pix = KWin::icon( window(), 32, 32, true, KWin::ClassHint | KWin::XApp );
+ miniicon_pix = KWin::icon( window(), 16, 16, true, KWin::ClassHint | KWin::XApp );
}
if( isManaged() && decoration != NULL )
decoration->iconChange();
@@ -2707,25 +2717,25 @@ void Client::setCursor( Position m )
{
case PositionTopLeft:
case PositionBottomRight:
- setCursor( tqsizeFDiagCursor );
+ setCursor( TQt::sizeFDiagCursor );
break;
case PositionBottomLeft:
case PositionTopRight:
- setCursor( tqsizeBDiagCursor );
+ setCursor( TQt::sizeBDiagCursor );
break;
case PositionTop:
case PositionBottom:
- setCursor( tqsizeVerCursor );
+ setCursor( TQt::sizeVerCursor );
break;
case PositionLeft:
case PositionRight:
- setCursor( tqsizeHorCursor );
+ setCursor( TQt::sizeHorCursor );
break;
default:
if( buttonDown && isMovable())
- setCursor( tqsizeAllCursor );
+ setCursor( TQt::sizeAllCursor );
else
- setCursor( tqarrowCursor );
+ setCursor( TQt::arrowCursor );
break;
}
}
@@ -3012,9 +3022,9 @@ bool Client::getWindowOpacity() //query translucency settings from X, returns tr
custom_opacity = true;
// setOpacity(opacity_ < 0xFFFFFFFF, opacity_);
XFree ((char*)data);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void Client::setCustomOpacityFlag(bool custom)
@@ -3036,14 +3046,14 @@ bool Client::touches(const Client* c)
// checks if this client borders c, needed to test beep media player window state
{
if (y() == c->y() + c->height()) // this bottom to c
- return TRUE;
+ return true;
if (y() + height() == c->y()) // this top to c
- return TRUE;
+ return true;
if (x() == c->x() + c->width()) // this right to c
- return TRUE;
+ return true;
if (x() + width() == c->x()) // this left to c
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void Client::setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHeight, uint leftWidth)
diff --git a/twin/client.h b/twin/client.h
index 98ff68c1a..178c718c4 100644
--- a/twin/client.h
+++ b/twin/client.h
@@ -233,13 +233,16 @@ class Client : public TQObject, public KDecorationDefines
void resizeWithChecks( const TQSize& s, ForceGeometry_t force = NormalGeometrySet );
void keepInArea( TQRect area, bool partial = false );
void setActiveBorderMode( ActiveMaximizingMode mode );
+ void setActiveBorderPos( TQPoint pos );
void setActiveBorder( ActiveBorder border);
ActiveMaximizingMode activeBorderMode() const;
+ TQPoint activeBorderPos() const;
ActiveBorder activeBorder() const;
void setActiveBorderMaximizing(bool maximizing);
void cancelActiveBorderMaximizing();
bool isActiveBorderMaximizing() const;
TQRect activeBorderMaximizeGeometry();
+ void tileToBorder(ActiveBorder border);
void growHorizontal();
void shrinkHorizontal();
@@ -339,6 +342,7 @@ class Client : public TQObject, public KDecorationDefines
private slots:
void autoRaise();
void shadeHover();
+ void configureRequestTimeout();
void shortcutActivated();
void updateOpacityCache();
@@ -480,6 +484,7 @@ class Client : public TQObject, public KDecorationDefines
int desk;
bool buttonDown;
bool moveResizeMode;
+ bool inhibitConfigureRequests;
bool move_faked_activity;
Window move_resize_grab_window;
bool unrestrictedMoveResize;
@@ -558,6 +563,7 @@ class Client : public TQObject, public KDecorationDefines
WinInfo* info;
TQTimer* autoRaiseTimer;
TQTimer* shadeHoverTimer;
+ TQTimer* configureRequestTimer;
Colormap cmap;
TQCString resource_name;
TQCString resource_class;
@@ -610,8 +616,8 @@ class Client : public TQObject, public KDecorationDefines
bool activeMaximizing;
bool activeTiled;
- TQRect activeTiledOrigGeom;
ActiveMaximizingMode activeMode;
+ TQPoint activePos;
ActiveBorder currentActiveBorder;
friend bool performTransiencyCheck();
@@ -755,7 +761,7 @@ inline bool Client::isOnAllDesktops() const
}
/*!
Returns whether the client is on the virtual desktop \a d.
- This is always TRUE for onAllDesktops clients.
+ This is always true for onAllDesktops clients.
*/
inline bool Client::isOnDesktop( int d ) const
{
diff --git a/twin/clients/PORTING b/twin/clients/PORTING
index e6a18a7a1..3db8af576 100644
--- a/twin/clients/PORTING
+++ b/twin/clients/PORTING
@@ -9,7 +9,7 @@ Makefile.am:
Sources:
- There are no twin/something.h includes, and don't use the KWinInternal namespace.
- Use QToolTip instead of KWinToolTip.
-- Use QButton instead of KWinButton, QToolButton instead of KWinToolButton and QWidget
+- Use QButton instead of KWinButton, QToolButton instead of KWinToolButton and TQWidget
instead of KWinWidgetButton.
- For tooltips, use simply QToolTip::add().
- Change Client* to MyClient* (or whatever is your main client class) in your MyButton.
@@ -22,11 +22,11 @@ Sources:
- As the first thing in init(), call createMainWidget(); if your client class took some
flags such as WResizeNoErase, pass them to this function.
- Then, do 'widget()->installEventFilter( this );'.
-- Implement MyClient::eventFilter() - as MyClient is now no longer QWidget, you need the event
+- Implement MyClient::eventFilter() - as MyClient is now no longer TQWidget, you need the event
filter to call all the functions that used to be called directly. Usually, it's something
like:
=====
-bool MyClient::eventFilter( QObject* o, QEvent* e )
+bool MyClient::eventFilter( TQObject* o, QEvent* e )
{
if ( o != widget() )
return false;
@@ -63,7 +63,7 @@ bool MyClient::eventFilter( QObject* o, QEvent* e )
}
=====
- In MyClient, 'this' will have to be often replaced with 'widget()', pay special attention
- to cases where this won't cause compile error (e.g. in connect() calls, which take QObject* ).
+ to cases where this won't cause compile error (e.g. in connect() calls, which take TQObject* ).
- Also, many calls may need 'widget()->' prepended.
- Layout is created in init(), so call createLayout() directly there (if it's implemented).
- Remove calls to Client methods (Client::resizeEvent() and so on).
@@ -84,7 +84,7 @@ inline const KDecorationOptions* options() { return KDecoration::options(); }
- Replace 'contextHelp()' with 'showContextHelp()'.
- WindowWrapperShowEvent() is gone, simply use showEvent() filtered by the event filter if needed.
- Change 'animateIconifyOrDeiconify()' to 'animateMinize()', if it's empty, simply remove it.
- Make sure it doesn't reenter the event loop (no kapp->processEvents()).
+ Make sure it doesn't reenter the event loop (no tdeApp->processEvents()).
- Buttons should use explicit setCursor() if they don't want cursor set by mousePosition().
I.e. usually call setCursor( ArrowCursor ) in your MyButton.
- In the part where you insert windowWrapper() into the layout, i.e. something like
diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp
index 49391e923..571b16909 100644
--- a/twin/clients/b2/b2client.cpp
+++ b/twin/clients/b2/b2client.cpp
@@ -82,7 +82,7 @@ static bool drawSmallBorders = false;
// =====================================
-extern "C" KDE_EXPORT KDecorationFactory* create_factory()
+extern "C" TDE_EXPORT KDecorationFactory* create_factory()
{
return new B2::B2ClientFactory();
}
@@ -444,9 +444,9 @@ bool B2Client::isModalSystemNotification()
result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);
if (result == Success && data != None && format == 32 )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void B2Client::addButtons(const TQString& s, const TQString tips[],
@@ -464,8 +464,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
TQt::LeftButton | TQt::RightButton);
button[BtnMenu]->setPixmaps(P_MENU);
button[BtnMenu]->setUseMiniIcon();
- connect(button[BtnMenu], TQT_SIGNAL(pressed()),
- this, TQT_SLOT(menuButtonPressed()));
+ connect(button[BtnMenu], TQ_SIGNAL(pressed()),
+ this, TQ_SLOT(menuButtonPressed()));
titleLayout->addWidget(button[BtnMenu]);
}
}
@@ -477,8 +477,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
button[BtnSticky]->setPixmaps(P_PINUP);
button[BtnSticky]->setToggle();
button[BtnSticky]->setDown(isOnAllDesktops());
- connect(button[BtnSticky], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(toggleOnAllDesktops()));
+ connect(button[BtnSticky], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(toggleOnAllDesktops()));
titleLayout->addWidget(button[BtnSticky]);
}
}
@@ -487,8 +487,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (providesContextHelp() && (!button[BtnHelp])) {
button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]);
button[BtnHelp]->setPixmaps(P_HELP);
- connect(button[BtnHelp], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(showContextHelp()));
+ connect(button[BtnHelp], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(showContextHelp()));
titleLayout->addWidget(button[BtnHelp]);
}
break;
@@ -496,8 +496,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isMinimizable() && (!button[BtnIconify])) {
button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]);
button[BtnIconify]->setPixmaps(P_ICONIFY);
- connect(button[BtnIconify], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(minimize()));
+ connect(button[BtnIconify], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(minimize()));
titleLayout->addWidget(button[BtnIconify]);
}
break;
@@ -507,8 +507,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
TQt::LeftButton | TQt::MidButton | TQt::RightButton);
button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ?
P_NORMALIZE : P_MAX);
- connect(button[BtnMax], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(maxButtonClicked()));
+ connect(button[BtnMax], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(maxButtonClicked()));
titleLayout->addWidget(button[BtnMax]);
}
break;
@@ -516,8 +516,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isCloseable() && !button[BtnClose]) {
button[BtnClose] = new B2Button(this, tb, tips[BtnClose]);
button[BtnClose]->setPixmaps(P_CLOSE);
- connect(button[BtnClose], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(closeWindow()));
+ connect(button[BtnClose], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(closeWindow()));
titleLayout->addWidget(button[BtnClose]);
}
break;
@@ -525,8 +525,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isShadeable() && !button[BtnShade]) {
button[BtnShade] = new B2Button(this, tb, tips[BtnShade]);
button[BtnShade]->setPixmaps(P_SHADE);
- connect(button[BtnShade], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(shadeButtonClicked()));
+ connect(button[BtnShade], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(shadeButtonClicked()));
titleLayout->addWidget(button[BtnShade]);
}
break;
@@ -534,8 +534,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (resizable && !button[BtnResize]) {
button[BtnResize] = new B2Button(this, tb, tips[BtnResize]);
button[BtnResize]->setPixmaps(P_RESIZE);
- connect(button[BtnResize], TQT_SIGNAL(pressed()),
- this, TQT_SLOT(resizeButtonPressed()));
+ connect(button[BtnResize], TQ_SIGNAL(pressed()),
+ this, TQ_SLOT(resizeButtonPressed()));
titleLayout->addWidget(button[BtnResize]);
}
break;
@@ -982,7 +982,7 @@ static void redraw_pixmaps()
TQColor color = is_act ? aGrp.button() : iGrp.button();
drawB2Rect(&thinBox, color, is_down);
pix->fill(TQt::black);
- bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&thinBox),
+ bitBlt(pix, 0, 0, &thinBox,
0, 0, thinBox.width(), thinBox.height(), TQt::CopyROP, true);
}
@@ -1005,12 +1005,12 @@ static void redraw_pixmaps()
drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down);
drawB2Rect(&largeBox, is_act ? aGrp.button() : iGrp.button(), is_down);
pix->fill(options()->color(KDecoration::ColorTitleBar, is_act));
- bitBlt(TQT_TQPAINTDEVICE(pix), pix->width() - 12, pix->width() - 12, TQT_TQPAINTDEVICE(&largeBox),
+ bitBlt(pix, pix->width() - 12, pix->width() - 12, &largeBox,
0, 0, 12, 12, TQt::CopyROP, true);
- bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pix, 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
- bitBlt(TQT_TQPAINTDEVICE(pixmap[P_ICONIFY * NumStates + i]), 0, 0,
- TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pixmap[P_ICONIFY * NumStates + i], 0, 0,
+ &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
}
// resize
@@ -1020,8 +1020,8 @@ static void redraw_pixmaps()
*pixmap[P_RESIZE * NumStates + i] = *pixmap[P_CLOSE * NumStates + i];
pixmap[P_RESIZE * NumStates + i]->detach();
drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down);
- bitBlt(TQT_TQPAINTDEVICE(pixmap[P_RESIZE * NumStates + i]),
- 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pixmap[P_RESIZE * NumStates + i],
+ 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
}
@@ -1183,22 +1183,22 @@ bool B2Client::eventFilter(TQObject *o, TQEvent *e)
return false;
switch (e->type()) {
case TQEvent::Resize:
- resizeEvent(TQT_TQRESIZEEVENT(e));
+ resizeEvent(static_cast<TQResizeEvent*>(e));
return true;
case TQEvent::Paint:
- paintEvent(TQT_TQPAINTEVENT(e));
+ paintEvent(static_cast<TQPaintEvent*>(e));
return true;
case TQEvent::MouseButtonDblClick:
- titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
+ titlebar->mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
return true;
case TQEvent::Wheel:
- titlebar->wheelEvent(TQT_TQWHEELEVENT(e));
+ titlebar->wheelEvent(static_cast<TQWheelEvent*>(e));
return true;
case TQEvent::MouseButtonPress:
- processMousePressEvent(TQT_TQMOUSEEVENT(e));
+ processMousePressEvent(static_cast<TQMouseEvent*>(e));
return true;
case TQEvent::Show:
- showEvent(TQT_TQSHOWEVENT(e));
+ showEvent(static_cast<TQShowEvent*>(e));
return true;
default:
break;
@@ -1213,7 +1213,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent,
: TQButton(parent, 0), hover(false)
{
setBackgroundMode(NoBackground);
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
realizeButtons = realizeBtns;
client = _client;
useMiniIcon = false;
@@ -1395,7 +1395,7 @@ void B2Titlebar::resizeEvent(TQResizeEvent *)
void B2Titlebar::paintEvent(TQPaintEvent *)
{
if(client->isActive())
- bitBlt(TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&titleBuffer), 0, 0, titleBuffer.width(),
+ bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),
titleBuffer.height(), TQt::CopyROP, true);
else {
TQPainter p(this);
diff --git a/twin/clients/b2/config/config.cpp b/twin/clients/b2/config/config.cpp
index 5b7a29e0f..70942bce1 100644
--- a/twin/clients/b2/config/config.cpp
+++ b/twin/clients/b2/config/config.cpp
@@ -15,7 +15,7 @@
extern "C"
{
- KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
+ TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
{
return(new B2Config(conf, parent));
}
@@ -70,12 +70,12 @@ B2Config::B2Config( TDEConfig* conf, TQWidget* parent )
load(conf);
// Ensure we track user changes properly
- connect(cbColorBorder, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotSelectionChanged()));
- connect(showGrabHandleCb, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotSelectionChanged()));
- connect(menuDblClickOp, TQT_SIGNAL(activated(int)),
- this, TQT_SLOT(slotSelectionChanged()));
+ connect(cbColorBorder, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotSelectionChanged()));
+ connect(showGrabHandleCb, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotSelectionChanged()));
+ connect(menuDblClickOp, TQ_SIGNAL(activated(int)),
+ this, TQ_SLOT(slotSelectionChanged()));
// Make the widgets visible in twindecoration
gb->show();
}
diff --git a/twin/clients/default/config/config.cpp b/twin/clients/default/config/config.cpp
index 886077925..054279fc0 100644
--- a/twin/clients/default/config/config.cpp
+++ b/twin/clients/default/config/config.cpp
@@ -17,7 +17,7 @@
extern "C"
{
- KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
+ TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
{
return(new KDEDefaultConfig(conf, parent));
}
@@ -61,13 +61,13 @@ KDEDefaultConfig::KDEDefaultConfig( TDEConfig* conf, TQWidget* parent )
load( conf );
// Ensure we track user changes properly
- connect( cbShowStipple, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotSelectionChanged()) );
- connect( cbShowGrabBar, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbShowStipple, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotSelectionChanged()) );
+ connect( cbShowGrabBar, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotSelectionChanged()) );
if (highcolor)
- connect( cbUseGradients, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbUseGradients, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotSelectionChanged()) );
// Make the widgets visible in twindecoration
gb->show();
diff --git a/twin/clients/default/kdedefault.cpp b/twin/clients/default/kdedefault.cpp
index 3513ca5df..33eb46f4d 100644
--- a/twin/clients/default/kdedefault.cpp
+++ b/twin/clients/default/kdedefault.cpp
@@ -1060,7 +1060,7 @@ TQRegion KDEDefaultClient::cornerShape(WindowCorner corner)
} // namespace
// Extended KWin plugin interface
-extern "C" KDE_EXPORT KDecorationFactory* create_factory()
+extern "C" TDE_EXPORT KDecorationFactory* create_factory()
{
return new Default::KDEDefaultHandler();
}
diff --git a/twin/clients/keramik/config/config.cpp b/twin/clients/keramik/config/config.cpp
index dfd5e20aa..408c5a38a 100644
--- a/twin/clients/keramik/config/config.cpp
+++ b/twin/clients/keramik/config/config.cpp
@@ -33,7 +33,7 @@
extern "C"
{
- KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
+ TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
{
return ( new KeramikConfig( conf, parent ) );
}
@@ -55,10 +55,10 @@ KeramikConfig::KeramikConfig( TDEConfig* conf, TQWidget* parent )
c = new TDEConfig( "twinkeramikrc" );
ui = new KeramikConfigUI( parent );
- connect( ui->showAppIcons, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
- connect( ui->smallCaptions, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
- connect( ui->largeGrabBars, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
- connect( ui->useShadowedText, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
+ connect( ui->showAppIcons, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) );
+ connect( ui->smallCaptions, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) );
+ connect( ui->largeGrabBars, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) );
+ connect( ui->useShadowedText, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) );
load( conf );
ui->show();
diff --git a/twin/clients/keramik/embedtool.cpp b/twin/clients/keramik/embedtool.cpp
index 88cf93838..1cc56fe32 100644
--- a/twin/clients/keramik/embedtool.cpp
+++ b/twin/clients/keramik/embedtool.cpp
@@ -66,7 +66,7 @@ KeramikEmbedder::KeramikEmbedder()
file = new TQFile( "tiles.h" );
file->open( IO_WriteOnly | IO_Truncate );
- stream.setDevice( TQT_TQIODEVICE(file) );
+ stream.setDevice( file );
stream << "/*\n";
stream << " * Generated by embedtool 1.0 on " << datestring << endl;
@@ -101,7 +101,7 @@ void KeramikEmbedder::embed( const char *name )
codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" );
- stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t";
+ stream << "\tstatic const TQRgb " << codename << "_data[] = {" << endl << "\t\t";
stream.setf( TQTextStream::hex | TQTextStream::right );
stream.fill( '0' );
@@ -147,7 +147,7 @@ void KeramikEmbedder::writeIndex()
stream << "\t\tint width;\n";
stream << "\t\tint height;\n";
stream << "\t\tbool alpha;\n";
- stream << "\t\tconst QRgb *data;\n";
+ stream << "\t\tconst TQRgb *data;\n";
stream << "\t};\n\n";
uint i = 0;
diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp
index 446199fa7..d5c441a26 100644
--- a/twin/clients/keramik/keramik.cpp
+++ b/twin/clients/keramik/keramik.cpp
@@ -765,7 +765,7 @@ KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, co
TQToolTip::add( this, tip ); // FRAME
setBackgroundMode( NoBackground );
- setCursor( tqarrowCursor );
+ setCursor( TQt::arrowCursor );
int size = clientHandler->roundButton()->height();
setFixedSize( size, size );
@@ -907,8 +907,8 @@ KeramikClient::KeramikClient( KDecorationBridge* bridge, KDecorationFactory* fac
void KeramikClient::init()
{
- connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool )));
- connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool )));
+ connect( this, TQ_SIGNAL( keepAboveChanged( bool )), TQ_SLOT( keepAboveChange( bool )));
+ connect( this, TQ_SIGNAL( keepBelowChanged( bool )), TQ_SLOT( keepBelowChange( bool )));
createMainWidget( (WFlags)(WStaticContents | WResizeNoErase | WRepaintNoErase) );
widget()->installEventFilter( this );
@@ -1035,9 +1035,9 @@ bool KeramikClient::isModalSystemNotification()
result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);
if (result == Success && data != None && format == 32 )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
@@ -1051,7 +1051,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
if (!isModalSystemNotification()) {
if ( !button[MenuButton] ) {
button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), TQt::LeftButton|TQt::RightButton );
- connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) );
+ connect( button[MenuButton], TQ_SIGNAL( pressed() ), TQ_SLOT( menuButtonPressed() ) );
layout->addWidget( button[MenuButton] );
}
}
@@ -1065,7 +1065,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
OnAllDesktopsButton, isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops") );
if(isOnAllDesktops())
button[OnAllDesktopsButton]->toggle();
- connect( button[OnAllDesktopsButton], TQT_SIGNAL( clicked() ), TQT_SLOT( toggleOnAllDesktops() ) );
+ connect( button[OnAllDesktopsButton], TQ_SIGNAL( clicked() ), TQ_SLOT( toggleOnAllDesktops() ) );
layout->addWidget( button[OnAllDesktopsButton] );
}
}
@@ -1075,7 +1075,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'H' :
if ( !button[HelpButton] && providesContextHelp() ) {
button[HelpButton] = new KeramikButton( this, "help", HelpButton, i18n("Help") );
- connect( button[HelpButton], TQT_SIGNAL( clicked() ), TQT_SLOT( showContextHelp() ) );
+ connect( button[HelpButton], TQ_SIGNAL( clicked() ), TQ_SLOT( showContextHelp() ) );
layout->addWidget( button[HelpButton] );
}
break;
@@ -1084,7 +1084,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'I' :
if ( !button[MinButton] && isMinimizable() ) {
button[MinButton] = new KeramikButton( this, "minimize", MinButton, i18n("Minimize") );
- connect( button[MinButton], TQT_SIGNAL( clicked() ), TQT_SLOT( minimize() ) );
+ connect( button[MinButton], TQ_SIGNAL( clicked() ), TQ_SLOT( minimize() ) );
layout->addWidget( button[MinButton] );
}
break;
@@ -1093,7 +1093,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'A' :
if ( !button[MaxButton] && isMaximizable() ) {
button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), TQt::LeftButton|TQt::MidButton|TQt::RightButton );
- connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) );
+ connect( button[MaxButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotMaximize() ) );
layout->addWidget( button[MaxButton] );
}
break;
@@ -1102,7 +1102,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'X' :
if ( !button[CloseButton] && isCloseable() ) {
button[CloseButton] = new KeramikButton( this, "close", CloseButton, i18n("Close") );
- connect( button[CloseButton], TQT_SIGNAL( clicked() ), TQT_SLOT( closeWindow() ) );
+ connect( button[CloseButton], TQ_SIGNAL( clicked() ), TQ_SLOT( closeWindow() ) );
layout->addWidget( button[CloseButton] );
}
break;
@@ -1111,7 +1111,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'F' :
if ( !button[AboveButton]) {
button[AboveButton] = new KeramikButton( this, "above", AboveButton, i18n("Keep Above Others") );
- connect( button[AboveButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotAbove() ) );
+ connect( button[AboveButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotAbove() ) );
layout->addWidget( button[AboveButton] );
}
break;
@@ -1120,7 +1120,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
case 'B' :
if ( !button[BelowButton]) {
button[BelowButton] = new KeramikButton( this, "below", BelowButton, i18n("Keep Below Others") );
- connect( button[BelowButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotBelow() ) );
+ connect( button[BelowButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotBelow() ) );
layout->addWidget( button[BelowButton] );
}
break;
@@ -1130,7 +1130,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
if ( !button[ShadeButton] && isShadeable() ) {
button[ShadeButton] = new KeramikButton( this, "shade", ShadeButton,
isSetShade() ? i18n("Unshade") : i18n( "Shade" ));
- connect( button[ShadeButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotShade() ) );
+ connect( button[ShadeButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotShade() ) );
layout->addWidget( button[ShadeButton] );
}
break;
@@ -1647,10 +1647,10 @@ void KeramikClient::resizeEvent( TQResizeEvent *e )
int dy = 0;
if ( e->oldSize().width() != width() )
- dx = 32 + QABS( e->oldSize().width() - width() );
+ dx = 32 + TQABS( e->oldSize().width() - width() );
if ( e->oldSize().height() != height() )
- dy = 8 + QABS( e->oldSize().height() - height() );
+ dy = 8 + TQABS( e->oldSize().height() - height() );
if ( dy )
widget()->update( 0, height() - dy + 1, width(), dy );
@@ -1662,7 +1662,7 @@ void KeramikClient::resizeEvent( TQResizeEvent *e )
widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4,
titlebar->geometry().bottom() ) ) );
// Titlebar needs no paint event
- TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), FALSE ) );
+ TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) );
}
}
}
@@ -1802,23 +1802,23 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e )
switch ( e->type() )
{
case TQEvent::Resize:
- resizeEvent( TQT_TQRESIZEEVENT( e ) );
+ resizeEvent( static_cast<TQResizeEvent*>( e ) );
return true;
case TQEvent::Paint:
- paintEvent( TQT_TQPAINTEVENT( e ) );
+ paintEvent( static_cast<TQPaintEvent*>( e ) );
return true;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ) );
+ mouseDoubleClickEvent( static_cast<TQMouseEvent*>( e ) );
return true;
case TQEvent::MouseButtonPress:
- processMousePressEvent( TQT_TQMOUSEEVENT( e ) );
+ processMousePressEvent( static_cast<TQMouseEvent*>( e ) );
return true;
case TQEvent::Wheel:
- wheelEvent( TQT_TQWHEELEVENT( e ));
+ wheelEvent( static_cast<TQWheelEvent*>( e ));
return true;
default:
@@ -1836,7 +1836,7 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e )
extern "C"
{
- KDE_EXPORT KDecorationFactory *create_factory()
+ TDE_EXPORT KDecorationFactory *create_factory()
{
Keramik::clientHandler = new Keramik::KeramikHandler();
return Keramik::clientHandler;
diff --git a/twin/clients/kwmtheme/cli_installer/main.cpp b/twin/clients/kwmtheme/cli_installer/main.cpp
index 27af172e1..3f0e209ec 100644
--- a/twin/clients/kwmtheme/cli_installer/main.cpp
+++ b/twin/clients/kwmtheme/cli_installer/main.cpp
@@ -1,10 +1,10 @@
#include <tqfile.h>
#include <tqdir.h>
#include <tdeapplication.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdeglobal.h>
#include <kdebug.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
TQDir().mkdir(localDirStr);
TQFileInfo fi(f);
- KSimpleConfig input(fi.absFilePath());
+ TDESimpleConfig input(fi.absFilePath());
srcStr = fi.dirPath(true) + "/";
TDEConfig *output = TDEGlobal::config();
input.setGroup("Window Border");
diff --git a/twin/clients/kwmtheme/kwmthemeclient.cpp b/twin/clients/kwmtheme/kwmthemeclient.cpp
index 4daffae7c..b0473261b 100644
--- a/twin/clients/kwmtheme/kwmthemeclient.cpp
+++ b/twin/clients/kwmtheme/kwmthemeclient.cpp
@@ -5,7 +5,7 @@
#include <tqdrawutil.h>
#include <tqpainter.h>
#include <kpixmapeffect.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <kdebug.h>
#include <tdelocale.h>
#include <tqbitmap.h>
@@ -293,8 +293,8 @@ void KWMThemeClient::init()
iconChange();
hb->addWidget(mnuBtn);
mnuBtn->setFixedSize(20, 20);
- connect(mnuBtn, TQT_SIGNAL(pressed()), this,
- TQT_SLOT(menuButtonPressed()));
+ connect(mnuBtn, TQ_SIGNAL(pressed()), this,
+ TQ_SLOT(menuButtonPressed()));
}
else if(val == "Sticky"){
stickyBtn = new MyButton(widget(), "sticky");
@@ -303,7 +303,7 @@ void KWMThemeClient::init()
stickyBtn->setPixmap(*pindownPix);
else
stickyBtn->setPixmap(*pinupPix);
- connect(stickyBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT(toggleOnAllDesktops()));
+ connect(stickyBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT(toggleOnAllDesktops()));
hb->addWidget(stickyBtn);
stickyBtn->setFixedSize(20, 20);
}
@@ -311,7 +311,7 @@ void KWMThemeClient::init()
btn = new MyButton(widget(), "iconify");
TQToolTip::add( btn, i18n("Minimize"));
btn->setPixmap(*iconifyPix);
- connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize()));
+ connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(minimize()));
hb->addWidget(btn);
btn->setFixedSize(20, 20);
}
@@ -319,7 +319,7 @@ void KWMThemeClient::init()
maxBtn = new MyButton(widget(), "max");
TQToolTip::add( maxBtn, i18n("Maximize"));
maxBtn->setPixmap(*maxPix);
- connect(maxBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(maximize()));
+ connect(maxBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(maximize()));
hb->addWidget(maxBtn);
maxBtn->setFixedSize(20, 20);
}
@@ -327,7 +327,7 @@ void KWMThemeClient::init()
btn = new MyButton(widget(), "close");
TQToolTip::add( btn, i18n("Close"));
btn->setPixmap(*closePix);
- connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow()));
+ connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(closeWindow()));
hb->addWidget(btn);
btn->setFixedSize(20, 20);
}
@@ -927,7 +927,7 @@ TODO
extern "C"
{
- KDE_EXPORT KDecorationFactory *create_factory()
+ TDE_EXPORT KDecorationFactory *create_factory()
{
return new KWMTheme::KWMThemeFactory();
}
diff --git a/twin/clients/laptop/laptopclient.cpp b/twin/clients/laptop/laptopclient.cpp
index 30fb76b3a..b0bc659dd 100644
--- a/twin/clients/laptop/laptopclient.cpp
+++ b/twin/clients/laptop/laptopclient.cpp
@@ -65,7 +65,7 @@ static bool pixmaps_created = false;
// =====================================
-extern "C" KDE_EXPORT KDecorationFactory* create_factory()
+extern "C" TDE_EXPORT KDecorationFactory* create_factory()
{
return new Laptop::LaptopClientFactory();
}
diff --git a/twin/clients/modernsystem/config/config.cpp b/twin/clients/modernsystem/config/config.cpp
index 4512203c4..c353abc1b 100644
--- a/twin/clients/modernsystem/config/config.cpp
+++ b/twin/clients/modernsystem/config/config.cpp
@@ -12,7 +12,7 @@
extern "C"
{
- KDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent)
+ TDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent)
{
return(new ModernSysConfig(conf, parent));
}
@@ -44,7 +44,7 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p
"easier, especially for trackballs and other mouse replacements "
"on laptops."));
layout->addMultiCellWidget(cbShowHandle, 0, 0, 0, 1);
- connect(cbShowHandle, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()));
+ connect(cbShowHandle, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()));
sliderBox = new TQVBox(handleBox);
handleSizeSlider = new TQSlider(0, 4, 1, 0, TQt::Horizontal, sliderBox);
@@ -52,12 +52,12 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p
i18n("Here you can change the size of the resize handle."));
handleSizeSlider->setTickInterval(1);
handleSizeSlider->setTickmarks(TQSlider::Below);
- connect(handleSizeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSelectionChanged()));
+ connect(handleSizeSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotSelectionChanged()));
hbox = new TQHBox(sliderBox);
hbox->setSpacing(6);
- bool rtl = kapp->reverseLayout();
+ bool rtl = tdeApp->reverseLayout();
label1 = new TQLabel(i18n("Small"), hbox);
label1->setAlignment(rtl ? AlignRight : AlignLeft);
label2 = new TQLabel(i18n("Medium"), hbox);
diff --git a/twin/clients/modernsystem/modernsys.cpp b/twin/clients/modernsystem/modernsys.cpp
index 94615b190..3777df9d8 100644
--- a/twin/clients/modernsystem/modernsys.cpp
+++ b/twin/clients/modernsystem/modernsys.cpp
@@ -731,7 +731,7 @@ bool ModernSysFactory::supports( Ability ability )
}
// KWin extended plugin interface
-extern "C" KDE_EXPORT KDecorationFactory* create_factory()
+extern "C" TDE_EXPORT KDecorationFactory* create_factory()
{
return new ModernSystem::ModernSysFactory();
}
diff --git a/twin/clients/plastik/config/config.cpp b/twin/clients/plastik/config/config.cpp
index 04658796c..0fdc126e2 100644
--- a/twin/clients/plastik/config/config.cpp
+++ b/twin/clients/plastik/config/config.cpp
@@ -49,16 +49,16 @@ PlastikConfig::PlastikConfig(TDEConfig* config, TQWidget* parent)
load(config);
// setup the connections
- connect(m_dialog->titleAlign, TQT_SIGNAL(clicked(int)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->animateButtons, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->menuClose, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->titleShadow, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->coloredBorder, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
+ connect(m_dialog->titleAlign, TQ_SIGNAL(clicked(int)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->animateButtons, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->menuClose, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->titleShadow, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->coloredBorder, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
}
PlastikConfig::~PlastikConfig()
@@ -115,7 +115,7 @@ void PlastikConfig::defaults()
extern "C"
{
- KDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
+ TDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
return (new PlastikConfig(config, parent));
}
}
diff --git a/twin/clients/plastik/misc.cpp b/twin/clients/plastik/misc.cpp
index 1b259d383..053cf15ea 100644
--- a/twin/clients/plastik/misc.cpp
+++ b/twin/clients/plastik/misc.cpp
@@ -54,8 +54,8 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i
{
// normal button...
- QRgb rgb = bgColor.rgb();
- QRgb rgb_b = fgColor.rgb();
+ TQRgb rgb = bgColor.rgb();
+ TQRgb rgb_b = fgColor.rgb();
int alpha = a;
if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0;
diff --git a/twin/clients/plastik/plastik.cpp b/twin/clients/plastik/plastik.cpp
index b5a4808d7..6f835fde8 100644
--- a/twin/clients/plastik/plastik.cpp
+++ b/twin/clients/plastik/plastik.cpp
@@ -590,7 +590,7 @@ PlastikHandler* Handler()
extern "C"
{
- KDE_EXPORT KDecorationFactory *create_factory()
+ TDE_EXPORT KDecorationFactory *create_factory()
{
KWinPlastik::handler = new KWinPlastik::PlastikHandler();
return KWinPlastik::handler;
diff --git a/twin/clients/plastik/plastik.h b/twin/clients/plastik/plastik.h
index 587d93f4e..558ac848a 100644
--- a/twin/clients/plastik/plastik.h
+++ b/twin/clients/plastik/plastik.h
@@ -93,7 +93,7 @@ public:
int borderSize() { return m_borderSize; }
bool animateButtons() { return m_animateButtons; }
bool menuClose() { return m_menuClose; }
- TQ_Alignment titleAlign() { return m_titleAlign; }
+ TQt::AlignmentFlags titleAlign() { return m_titleAlign; }
bool reverseLayout() { return m_reverse; }
TQColor getColor(KWinPlastik::ColorType type, const bool active = true);
@@ -113,7 +113,7 @@ private:
int m_titleHeightTool;
TQFont m_titleFont;
TQFont m_titleFontTool;
- TQ_Alignment m_titleAlign;
+ TQt::AlignmentFlags m_titleAlign;
// pixmap cache
TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
diff --git a/twin/clients/plastik/plastikbutton.cpp b/twin/clients/plastik/plastikbutton.cpp
index 5fdadc8e1..3f3f81f62 100644
--- a/twin/clients/plastik/plastikbutton.cpp
+++ b/twin/clients/plastik/plastikbutton.cpp
@@ -51,7 +51,7 @@ PlastikButton::PlastikButton(ButtonType type, PlastikClient *parent, const char
// no need to reset here as the button will be resetted on first resize.
animTmr = new TQTimer(this);
- connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) );
+ connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) );
animProgress = 0;
}
diff --git a/twin/clients/plastik/plastikbutton.h b/twin/clients/plastik/plastikbutton.h
index 6da87100f..6deaa56f6 100644
--- a/twin/clients/plastik/plastikbutton.h
+++ b/twin/clients/plastik/plastikbutton.h
@@ -65,7 +65,7 @@ private:
/**
* This class creates bitmaps which can be used as icons on buttons. The icons
* are "hardcoded".
- * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->TQPixmap" solution
+ * Over the previous "Gimp->xpm->TQImage->recolor->SmoothScale->TQPixmap" solution
* it has the important advantage that icons are more scalable and at the same
* time sharp and not blurred.
*/
diff --git a/twin/clients/plastik/plastikclient.cpp b/twin/clients/plastik/plastikclient.cpp
index 6fa993721..bb2c465a6 100644
--- a/twin/clients/plastik/plastikclient.cpp
+++ b/twin/clients/plastik/plastikclient.cpp
@@ -394,7 +394,7 @@ TQRect PlastikClient::captionRect() const
buttonsLeftWidth() - buttonsRightWidth() -
marginLeft - marginRight;
- TQ_Alignment a = Handler()->titleAlign();
+ TQt::AlignmentFlags a = Handler()->titleAlign();
int tX, tW; // position/width of the title buffer
if (caption.width() > titleWidth) {
diff --git a/twin/clients/quartz/config/config.cpp b/twin/clients/quartz/config/config.cpp
index 70dc87965..f6bd853b1 100644
--- a/twin/clients/quartz/config/config.cpp
+++ b/twin/clients/quartz/config/config.cpp
@@ -15,7 +15,7 @@
extern "C"
{
- KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
+ TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )
{
return(new QuartzConfig(conf, parent));
}
@@ -49,8 +49,8 @@ QuartzConfig::QuartzConfig( TDEConfig* conf, TQWidget* parent )
load( conf );
// Ensure we track user changes properly
- connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
- connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbColorBorder, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) );
+ connect( cbExtraSmall, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) );
// Make the widgets visible in twindecoration
gb->show();
diff --git a/twin/clients/quartz/quartz.cpp b/twin/clients/quartz/quartz.cpp
index dff79ff4b..31a0dbcf1 100644
--- a/twin/clients/quartz/quartz.cpp
+++ b/twin/clients/quartz/quartz.cpp
@@ -783,7 +783,7 @@ void QuartzClient::paintEvent( TQPaintEvent* )
/////////////////////////////////
extern "C"
{
- KDE_EXPORT KDecorationFactory *create_factory()
+ TDE_EXPORT KDecorationFactory *create_factory()
{
Quartz::clientHandler = new Quartz::QuartzHandler();
return Quartz::clientHandler;
diff --git a/twin/clients/redmond/redmond.cpp b/twin/clients/redmond/redmond.cpp
index 6deddeaee..006f19122 100644
--- a/twin/clients/redmond/redmond.cpp
+++ b/twin/clients/redmond/redmond.cpp
@@ -688,7 +688,7 @@ TQValueList< RedmondDecoFactory::BorderSize > RedmondDecoFactory::borderSizes()
}
-extern "C" KDE_EXPORT KDecorationFactory *create_factory()
+extern "C" TDE_EXPORT KDecorationFactory *create_factory()
{
return new Redmond::RedmondDecoFactory();
}
diff --git a/twin/clients/test/test.cpp b/twin/clients/test/test.cpp
index ebfb00df1..113254f98 100644
--- a/twin/clients/test/test.cpp
+++ b/twin/clients/test/test.cpp
@@ -22,9 +22,9 @@ void Decoration::init()
{
button = new TQPushButton( widget());
button->show();
- button->setCursor( tqarrowCursor );
+ button->setCursor( TQt::arrowCursor );
button->move( 0, 0 );
- connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( closeWindow()));
+ connect( button, TQ_SIGNAL( clicked()), TQ_SLOT( closeWindow()));
TQToolTip::add( button, "Zelva Mana" );
}
}
@@ -106,7 +106,7 @@ bool Decoration::eventFilter( TQObject* o, TQEvent* e )
{
case TQEvent::MouseButtonPress:
{ // FRAME
- processMousePressEvent( TQT_TQMOUSEEVENT( e ));
+ processMousePressEvent( static_cast<TQMouseEvent*>( e ));
return true;
}
case TQEvent::Show:
@@ -333,7 +333,7 @@ bool Factory::reset( unsigned long changed )
extern "C"
{
-KDE_EXPORT KDecorationFactory *create_factory()
+TDE_EXPORT KDecorationFactory *create_factory()
{
return new KWinTest::Factory();
}
diff --git a/twin/clients/web/Web.cpp b/twin/clients/web/Web.cpp
index 5c2457e1c..f40dc552b 100644
--- a/twin/clients/web/Web.cpp
+++ b/twin/clients/web/Web.cpp
@@ -29,7 +29,7 @@
extern "C"
{
- KDE_EXPORT KDecorationFactory *create_factory()
+ TDE_EXPORT KDecorationFactory *create_factory()
{
return new Web::WebFactory();
}
diff --git a/twin/compton-tde/CMakeLists.txt b/twin/compton-tde/CMakeLists.txt
index d432b533f..8e29dd12c 100644
--- a/twin/compton-tde/CMakeLists.txt
+++ b/twin/compton-tde/CMakeLists.txt
@@ -24,7 +24,7 @@ include_directories(
${XINERAMA_INCLUDE_DIRS}
${XRANDR_INCLUDE_DIRS}
${GL_INCLUDE_DIRS}
- ${LIBPCRE_INCLUDE_DIRS}
+ ${LIBPCRE2_INCLUDE_DIRS}
)
link_directories(
@@ -33,7 +33,7 @@ link_directories(
${XINERAMA_LIBRARY_DIRS}
${XRANDR_LIBRARY_DIRS}
${GL_LIBRARY_DIRS}
- ${LIBPCRE_LIBRARY_DIRS}
+ ${LIBPCRE2_LIBRARY_DIRS}
)
@@ -46,8 +46,8 @@ link_directories(
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL_GLSL
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL_FBO
-# WITH_PCRE -> CONFIG_REGEX_PCRE
-# WITH_PCRE -> CONFIG_REGEX_PCRE_JIT
+# WITH_PCRE2 -> CONFIG_REGEX_PCRE2
+# WITH_PCRE2 -> CONFIG_REGEX_PCRE2_JIT
# WITH_LIBCONFIG -> CONFIG_LIBCONFIG
#
# HAVE_LIBCONFIG_OLD_API -> CONFIG_LIBCONFIG_LEGACY (set up in compton_config.h)
@@ -90,10 +90,10 @@ if( WITH_XRANDR )
list( APPEND compton_LIBRARIES ${XRANDR_LIBRARIES} )
endif( )
-if( WITH_PCRE )
- set( CONFIG_REGEX_PCRE ${WITH_PCRE} )
- set( CONFIG_REGEX_PCRE_JIT ${WITH_PCRE} )
- list( APPEND compton_LIBRARIES ${LIBPCRE_LIBRARIES} )
+if( WITH_PCRE2 )
+ set( CONFIG_REGEX_PCRE2 ${WITH_PCRE2} )
+ set( CONFIG_REGEX_PCRE2_JIT ${WITH_PCRE2} )
+ list( APPEND compton_LIBRARIES ${LIBPCRE2_LIBRARIES} )
endif( )
configure_file( compton_config.h.cmake compton_config.h )
diff --git a/twin/compton-tde/c2.c b/twin/compton-tde/c2.c
index 6baf1337e..147cb781d 100644
--- a/twin/compton-tde/c2.c
+++ b/twin/compton-tde/c2.c
@@ -785,33 +785,34 @@ c2_l_postprocess(session_t *ps, c2_l_t *pleaf) {
// PCRE patterns
if (C2_L_PTSTRING == pleaf->ptntype && C2_L_MPCRE == pleaf->match) {
-#ifdef CONFIG_REGEX_PCRE
- const char *error = NULL;
- int erroffset = 0;
- int options = 0;
+#ifdef CONFIG_REGEX_PCRE2
+ int errorCode;
+ PCRE2_SIZE errorOffset;
+ uint32_t options = 0;
// Ignore case flag
if (pleaf->match_ignorecase)
- options |= PCRE_CASELESS;
+ options |= PCRE2_CASELESS;
- // Compile PCRE expression
- pleaf->regex_pcre = pcre_compile(pleaf->ptnstr, options,
- &error, &erroffset, NULL);
+ // Compile PCRE2 expression
+ pleaf->regex_pcre = pcre2_compile((PCRE2_SPTR)pleaf->ptnstr, PCRE2_ZERO_TERMINATED,
+ options, &errorCode, &errorOffset, NULL);
if (!pleaf->regex_pcre)
- c2_error("Pattern \"%s\": PCRE regular expression parsing failed on "
- "offset %d: %s", pleaf->ptnstr, erroffset, error);
-#ifdef CONFIG_REGEX_PCRE_JIT
- pleaf->regex_pcre_extra = pcre_study(pleaf->regex_pcre,
- PCRE_STUDY_JIT_COMPILE, &error);
- if (!pleaf->regex_pcre_extra) {
- printf("Pattern \"%s\": PCRE regular expression study failed: %s",
- pleaf->ptnstr, error);
+ {
+ PCRE2_UCHAR errorMsg[256];
+ pcre2_get_error_message(errorCode, errorMsg, sizeof(errorMsg));
+ c2_error("Pattern \"%s\": PCRE2 regular expression parsing failed on "
+ "offset %zu: %s", pleaf->ptnstr, errorOffset, errorMsg);
+ }
+#ifdef CONFIG_REGEX_PCRE2_JIT
+ int jit_res = pcre2_jit_compile(pleaf->regex_pcre, PCRE2_JIT_COMPLETE);
+ if (jit_res < 0)
+ {
+ printf("Pattern \"%s\": PCRE2 regular expression JIT compilation failed with error code %d",
+ pleaf->ptnstr, jit_res);
}
#endif
- // Free the target string
- // free(pleaf->tgt);
- // pleaf->tgt = NULL;
#else
c2_error("PCRE regular expression support not compiled in.");
#endif
@@ -844,9 +845,8 @@ c2_free(c2_ptr_t p) {
free(pleaf->tgt);
free(pleaf->ptnstr);
-#ifdef CONFIG_REGEX_PCRE
- pcre_free(pleaf->regex_pcre);
- LPCRE_FREE_STUDY(pleaf->regex_pcre_extra);
+#ifdef CONFIG_REGEX_PCRE2
+ pcre2_code_free(pleaf->regex_pcre);
#endif
free(pleaf);
}
@@ -1180,10 +1180,9 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf,
}
break;
case C2_L_MPCRE:
-#ifdef CONFIG_REGEX_PCRE
- *pres = (pcre_exec(pleaf->regex_pcre,
- pleaf->regex_pcre_extra,
- tgt, strlen(tgt), 0, 0, NULL, 0) >= 0);
+#ifdef CONFIG_REGEX_PCRE2
+ *pres = (pcre2_match(pleaf->regex_pcre, (PCRE2_SPTR)tgt, PCRE2_ZERO_TERMINATED,
+ 0, 0, NULL, NULL) >= 0);
#else
assert(0);
#endif
diff --git a/twin/compton-tde/c2.h b/twin/compton-tde/c2.h
index 9e04c09a8..c84836c25 100644
--- a/twin/compton-tde/c2.h
+++ b/twin/compton-tde/c2.h
@@ -13,18 +13,10 @@
#include <fnmatch.h>
#include <ctype.h>
-// libpcre
-#ifdef CONFIG_REGEX_PCRE
-#include <pcre.h>
-
-// For compatiblity with <libpcre-8.20
-#ifndef PCRE_STUDY_JIT_COMPILE
-#define PCRE_STUDY_JIT_COMPILE 0
-#define LPCRE_FREE_STUDY(extra) pcre_free(extra)
-#else
-#define LPCRE_FREE_STUDY(extra) pcre_free_study(extra)
-#endif
-
+// libpcre2
+#ifdef CONFIG_REGEX_PCRE2
+#define PCRE2_CODE_UNIT_WIDTH 8
+#include <pcre2.h>
#endif
#define C2_MAX_LEVELS 10
@@ -139,9 +131,8 @@ struct _c2_l {
} ptntype;
char *ptnstr;
long ptnint;
-#ifdef CONFIG_REGEX_PCRE
- pcre *regex_pcre;
- pcre_extra *regex_pcre_extra;
+#ifdef CONFIG_REGEX_PCRE2
+ pcre2_code *regex_pcre;
#endif
};
diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h
index 9091fc582..d92396cdf 100644
--- a/twin/compton-tde/common.h
+++ b/twin/compton-tde/common.h
@@ -38,12 +38,10 @@
// #define MONITOR_REPAINT 1
// #define DEBUG_FADE 1
-// Whether to enable PCRE regular expression support in blacklists, enabled
-// by default
-// #define CONFIG_REGEX_PCRE 1
-// Whether to enable JIT support of libpcre. This may cause problems on PaX
-// kernels.
-// #define CONFIG_REGEX_PCRE_JIT 1
+// Whether to enable PCRE2 regular expression support in blacklists, enabled by default
+// #define CONFIG_REGEX_PCRE2 1
+// Whether to enable JIT support of libpcre2. This may cause problems on PaX kernels.
+// #define CONFIG_REGEX_PCRE2_JIT 1
// Whether to enable parsing of configuration files using libconfig.
// #define CONFIG_LIBCONFIG 1
// Whether we are using a legacy version of libconfig (1.3.x).
diff --git a/twin/compton-tde/compton_config.h.cmake b/twin/compton-tde/compton_config.h.cmake
index bf3f22543..b534b1b80 100644
--- a/twin/compton-tde/compton_config.h.cmake
+++ b/twin/compton-tde/compton_config.h.cmake
@@ -1,11 +1,9 @@
#include "config.h"
-// Whether to enable PCRE regular expression support in blacklists, enabled
-// by default
-#cmakedefine CONFIG_REGEX_PCRE 1
-// Whether to enable JIT support of libpcre. This may cause problems on PaX
-// kernels.
-#cmakedefine CONFIG_REGEX_PCRE_JIT 1
+// Whether to enable PCRE2 regular expression support in blacklists, enabled by default
+#cmakedefine CONFIG_REGEX_PCRE2 1
+// Whether to enable JIT support of libpcre2. This may cause problems on PaX kernels.
+#cmakedefine CONFIG_REGEX_PCRE2_JIT 1
// Whether to enable parsing of configuration files using libconfig.
#cmakedefine CONFIG_LIBCONFIG 1
diff --git a/twin/compton-tde/man/compton-tde.1.html b/twin/compton-tde/man/compton-tde.1.html
index 26d2a3b21..34243b08e 100644
--- a/twin/compton-tde/man/compton-tde.1.html
+++ b/twin/compton-tde/man/compton-tde.1.html
@@ -1422,7 +1422,7 @@ compton(1) Manual Page
<div class="paragraph"><p><em>FORMAT</em> (optional) specifies the format of the property, 8, 16, or 32. On absence we use format X reports. Do not specify it for predefined or string targets.</p></div>
<div class="paragraph"><p><em>TYPE</em> is a single character representing the type of the property to match for: <tt>c</tt> for <em>CARDINAL</em>, <tt>a</tt> for <em>ATOM</em>, <tt>w</tt> for <em>WINDOW</em>, <tt>d</tt> for <em>DRAWABLE</em>, <tt>s</tt> for <em>STRING</em> (and any other string types, such as <em>UTF8_STRING</em>). Do not specify it for predefined targets.</p></div>
<div class="paragraph"><p><em>OP QUALIFIER</em> (optional), applicable only for equals operator, could be <tt>?</tt> (ignore-case).</p></div>
-<div class="paragraph"><p><em>MATCH TYPE</em> (optional), applicable only for equals operator, could be nothing (exact match), <tt>*</tt> (match anywhere), <tt>^</tt> (match from start), <tt>%</tt> (wildcard), or <tt>~</tt> (PCRE regular expression).</p></div>
+<div class="paragraph"><p><em>MATCH TYPE</em> (optional), applicable only for equals operator, could be nothing (exact match), <tt>*</tt> (match anywhere), <tt>^</tt> (match from start), <tt>%</tt> (wildcard), or <tt>~</tt> (PCRE2 regular expression).</p></div>
<div class="paragraph"><p><em>OPERATOR</em> is one of <tt>=</tt> (equals), <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&lt;=</tt>, <tt>=&gt;</tt>, or nothing (exists). Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then).</p></div>
<div class="paragraph"><p><em>PATTERN</em> is either an integer or a string enclosed by single or double quotes. Python-3-style escape sequences and raw string are supported in the string format.</p></div>
<div class="paragraph"><p>Supported logical operators are <tt>&amp;&amp;</tt> (and) and <tt>||</tt> (or). <tt>&amp;&amp;</tt> has higher precedence than <tt>||</tt>, left-to-right associativity. Use parentheses to change precedence.</p></div>
@@ -1468,7 +1468,7 @@ name = r"\x64\x64\o64"</tt></pre>
<pre><tt>condition = TARGET:TYPE[FLAGS]:PATTERN</tt></pre>
</div></div>
<div class="paragraph"><p><em>TARGET</em> is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role).</p></div>
-<div class="paragraph"><p><em>TYPE</em> is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support).</p></div>
+<div class="paragraph"><p><em>TYPE</em> is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE2 regular expressions, if compiled with the support).</p></div>
<div class="paragraph"><p><em>FLAGS</em> could be a series of flags. Currently the only defined flag is "i" (ignore case).</p></div>
<div class="paragraph"><p><em>PATTERN</em> is the actual pattern string.</p></div>
</div>
diff --git a/twin/compton-tde/man/compton.1 b/twin/compton-tde/man/compton.1
index 964c4158d..a4e4dd7d9 100644
--- a/twin/compton-tde/man/compton.1
+++ b/twin/compton-tde/man/compton.1
@@ -659,7 +659,7 @@ With greater\-than/less\-than operators it looks like:
.sp
\fIOP QUALIFIER\fR (optional), applicable only for equals operator, could be ? (ignore\-case)\&.
.sp
-\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE regular expression)\&.
+\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE2 regular expression)\&.
.sp
\fIOPERATOR\fR is one of = (equals), <, >, <=, =>, or nothing (exists)\&. Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then)\&.
.sp
@@ -720,7 +720,7 @@ condition = TARGET:TYPE[FLAGS]:PATTERN
.sp
\fITARGET\fR is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role)\&.
.sp
-\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support)\&.
+\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE2 regular expressions, if compiled with the support)\&.
.sp
\fIFLAGS\fR could be a series of flags\&. Currently the only defined flag is "i" (ignore case)\&.
.sp
diff --git a/twin/data/update_default_rules.cpp b/twin/data/update_default_rules.cpp
index 1afde0bee..c37abc81d 100644
--- a/twin/data/update_default_rules.cpp
+++ b/twin/data/update_default_rules.cpp
@@ -13,8 +13,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <dcopclient.h>
#include <tdeconfig.h>
#include <kdebug.h>
-#include <kinstance.h>
-#include <kstandarddirs.h>
+#include <tdeinstance.h>
+#include <tdestandarddirs.h>
int main( int argc, char* argv[] )
{
diff --git a/twin/data/update_window_settings.cpp b/twin/data/update_window_settings.cpp
index e52f8c760..d4b525691 100644
--- a/twin/data/update_window_settings.cpp
+++ b/twin/data/update_window_settings.cpp
@@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <netwm_def.h>
#include <tdeconfig.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <dcopclient.h>
struct SessionInfo
@@ -82,14 +82,14 @@ void loadFakeSessionInfo( TDEConfig* config )
info->maximized = config->readNumEntry( TQString("maximize")+n, 0 );
info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 );
info->desktop = config->readNumEntry( TQString("desktop")+n, 0 );
- info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE );
- info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE );
- info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE );
- info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE );
- info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE );
- info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE );
- info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE );
- info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE );
+ info->minimized = config->readBoolEntry( TQString("iconified")+n, false );
+ info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, false );
+ info->shaded = config->readBoolEntry( TQString("shaded")+n, false );
+ info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, false );
+ info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, false );
+ info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, false );
+ info->skipPager = config->readBoolEntry( TQString("skipPager")+n, false );
+ info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, false );
info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1());
info->active = false;
info->fake = true;
diff --git a/twin/events.cpp b/twin/events.cpp
index e2e6b8d60..5158df40b 100644
--- a/twin/events.cpp
+++ b/twin/events.cpp
@@ -196,8 +196,8 @@ bool Workspace::workspaceEvent( XEvent * e )
{
if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) )
{
- mouse_emulation = FALSE;
- XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() );
+ mouse_emulation = false;
+ XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
}
if( e->type == PropertyNotify || e->type == ClientMessage )
@@ -221,7 +221,7 @@ bool Workspace::workspaceEvent( XEvent * e )
if ( tab_grab || control_grab )
{
tab_box->handleMouseEvent( e );
- return TRUE;
+ return true;
}
break;
case KeyPress:
@@ -292,11 +292,11 @@ bool Workspace::workspaceEvent( XEvent * e )
!e->xcreatewindow.override_redirect )
{
// see comments for allowClientActivation()
- Time my_qtx_time = GET_QT_X_TIME();
+ Time my_qtx_time = get_tqt_x_time();
XChangeProperty(tqt_xdisplay(), e->xcreatewindow.window,
atoms->kde_net_wm_user_creation_time, XA_CARDINAL,
32, PropModeReplace, (unsigned char *)&my_qtx_time, 1);
- SET_QT_X_TIME(my_qtx_time);
+ set_tqt_x_time(my_qtx_time);
}
break;
@@ -323,7 +323,7 @@ bool Workspace::workspaceEvent( XEvent * e )
addSystemTrayWin( w );
}
}
- return TRUE;
+ return true;
}
return ( e->xunmap.event != e->xunmap.window ); // hide wm typical event from Qt
@@ -336,12 +336,12 @@ bool Workspace::workspaceEvent( XEvent * e )
{
//do not confuse Qt with these events. After all, _we_ are the
//window manager who does the reparenting.
- return TRUE;
+ return true;
}
case DestroyNotify:
{
if ( removeSystemTrayWin( e->xdestroywindow.window, false ) )
- return TRUE;
+ return true;
return false;
}
case MapRequest:
@@ -362,7 +362,7 @@ bool Workspace::workspaceEvent( XEvent * e )
// this code doesn't check the parent to be root.
// if ( e->xmaprequest.parent == root ) { //###TODO store previously destroyed client ids
if ( addSystemTrayWin( e->xmaprequest.window ) )
- return TRUE;
+ return true;
c = createClient( e->xmaprequest.window, false );
if ( c != NULL && root != tqt_xrootwin() )
{ // TODO what is this?
@@ -428,7 +428,7 @@ bool Workspace::workspaceEvent( XEvent * e )
break;
case KeyRelease:
if ( mouse_emulation )
- return FALSE;
+ return false;
break;
case FocusIn:
if( e->xfocus.window == rootWin() && TQCString( getenv("TDE_MULTIHEAD")).lower() != "true"
@@ -460,7 +460,7 @@ bool Workspace::workspaceEvent( XEvent * e )
default:
break;
}
- return FALSE;
+ return false;
}
// Some events don't have the actual window which caused the event
@@ -733,7 +733,7 @@ void Client::destroyNotifyEvent( XDestroyWindowEvent* e )
}
-bool blockAnimation = FALSE;
+bool blockAnimation = false;
/*!
Handles client messages for the client window
@@ -785,8 +785,13 @@ void Client::configureRequestEvent( XConfigureRequestEvent* e )
{
if( e->window != window())
return; // ignore frame/wrapper
- if ( isResize() || isMove())
+ if ( isResize() || isMove() || inhibitConfigureRequests)
+ {
+ // Send a synthetic configure notification to make sure the
+ // window contents get updated by the application
+ sendSyntheticConfigureNotify();
return; // we have better things to do right now
+ }
if( fullscreen_mode == FullScreenNormal ) // refuse resizing of fullscreen windows
{ // but allow resizing fullscreen hacks in order to let them cancel fullscreen mode
@@ -818,7 +823,7 @@ void Client::configureRequestEvent( XConfigureRequestEvent* e )
restackWindow( e->above, e->detail, NET::FromApplication, userTime(), false );
// TODO sending a synthetic configure notify always is fine, even in cases where
- // the ICCCM doesn't require this - it can be though of as 'the WM decided to move
+ // the ICCCM doesn't require this - it can be thought of as 'the WM decided to move
// the window later'. The client should not cause that many configure request,
// so this should not have any significant impact. With user moving/resizing
// the it should be optimized though (see also Client::setGeometry()/plainResize()/move()).
@@ -881,8 +886,8 @@ void Client::enterNotifyEvent( XCrossingEvent* e )
{
delete shadeHoverTimer;
shadeHoverTimer = new TQTimer( this );
- connect( shadeHoverTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( shadeHover() ));
- shadeHoverTimer->start( options->shadeHoverInterval, TRUE );
+ connect( shadeHoverTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( shadeHover() ));
+ shadeHoverTimer->start( options->shadeHoverInterval, true );
}
if ( options->focusPolicy == Options::ClickToFocus )
@@ -894,8 +899,8 @@ void Client::enterNotifyEvent( XCrossingEvent* e )
{
delete autoRaiseTimer;
autoRaiseTimer = new TQTimer( this );
- connect( autoRaiseTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoRaise() ) );
- autoRaiseTimer->start( options->autoRaiseInterval, TRUE );
+ connect( autoRaiseTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoRaise() ) );
+ autoRaiseTimer->start( options->autoRaiseInterval, true );
}
TQPoint currentPos( e->x_root, e->y_root );
@@ -924,7 +929,7 @@ void Client::leaveNotifyEvent( XCrossingEvent* e )
if ( !buttonDown )
{
mode = PositionCenter;
- setCursor( tqarrowCursor );
+ setCursor( TQt::arrowCursor );
}
bool lostMouse = !rect().contains( TQPoint( e->x, e->y ) );
// 'lostMouse' wouldn't work with e.g. B2 or Keramik, which have non-rectangular decorations
@@ -974,7 +979,7 @@ void Client::grabButton( int modifier )
++i )
XGrabButton( tqt_xdisplay(), AnyButton,
modifier | mods[ i ],
- wrapperId(), FALSE, ButtonPressMask,
+ wrapperId(), false, ButtonPressMask,
GrabModeSync, GrabModeAsync, None, None );
}
@@ -1295,25 +1300,25 @@ bool Client::eventFilter( TQObject* o, TQEvent* e )
return false;
if( e->type() == TQEvent::MouseButtonPress )
{
- TQMouseEvent* ev = TQT_TQMOUSEEVENT( e );
+ TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return buttonPressEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
if( e->type() == TQEvent::MouseButtonRelease )
{
- TQMouseEvent* ev = TQT_TQMOUSEEVENT( e );
+ TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return buttonReleaseEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
if( e->type() == TQEvent::MouseMove ) // FRAME i fake z enter/leave?
{
- TQMouseEvent* ev = TQT_TQMOUSEEVENT( e );
+ TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return motionNotifyEvent( decorationId(), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
if( e->type() == TQEvent::Wheel )
{
- TQWheelEvent* ev = TQT_TQWHEELEVENT( e );
+ TQWheelEvent* ev = static_cast<TQWheelEvent*>( e );
bool r = buttonPressEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
r = r || buttonReleaseEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
@@ -1322,7 +1327,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e )
}
if( e->type() == TQEvent::Resize )
{
- TQResizeEvent* ev = TQT_TQRESIZEEVENT( e );
+ TQResizeEvent* ev = static_cast<TQResizeEvent*>( e );
// Filter out resize events that inform about size different than frame size.
// This will ensure that decoration->width() etc. and decoration->widget()->width() will be in sync.
// These events only seem to be delayed events from initial resizing before show() was called
@@ -1420,7 +1425,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in
bool replay = performMouseCommand( com, TQPoint( x_root, y_root), perform_handled );
if ( isSpecialWindow())
- replay = TRUE;
+ replay = true;
if( w == wrapperId()) // these can come only from a grab
XAllowEvents(tqt_xdisplay(), replay? ReplayPointer : SyncPointer, CurrentTime ); //tqt_x_time);
@@ -1448,7 +1453,7 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int
Options::MouseCommand com = Options::MouseNothing;
bool active = isActive();
if ( !wantsInput() ) // we cannot be active, use it anyway
- active = TRUE;
+ active = true;
if ( button == Button1 )
com = active ? options->commandActiveTitlebar1() : options->commandInactiveTitlebar1();
@@ -1461,7 +1466,7 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int
&& com != Options::MouseMinimize ) // mouse release event
{
mode = mousePosition( TQPoint( x, y ));
- buttonDown = TRUE;
+ buttonDown = true;
moveOffset = TQPoint( x, y );
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = false;
@@ -1512,7 +1517,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int
y = this->y();
if ( (state & ( Button1Mask & Button2Mask & Button3Mask )) == 0 )
{
- buttonDown = FALSE;
+ buttonDown = false;
if ( moveResizeMode )
{
finishMoveResize( false );
@@ -1550,7 +1555,7 @@ static bool waitingMotionEvent()
// of processes events reaches the timestamp of the last suitable
// MotionNotify event in the queue.
if( next_motion_time != CurrentTime
- && timestampCompare( GET_QT_X_TIME(), next_motion_time ) < 0 )
+ && timestampCompare( get_tqt_x_time(), next_motion_time ) < 0 )
return true;
was_motion = false;
XSync( tqt_xdisplay(), False ); // this helps to discard more MotionNotify events
@@ -1599,7 +1604,7 @@ void Client::focusInEvent( XFocusInEvent* e )
bool activate = workspace()->allowClientActivation( this, -1U, true );
workspace()->gotFocusIn( this ); // remove from should_get_focus list
if( activate )
- setActive( TRUE );
+ setActive( true );
else
{
workspace()->restoreFocus();
@@ -1668,7 +1673,7 @@ void Client::focusOutEvent( XFocusOutEvent* e )
if ( TQApplication::activePopupWidget() )
return;
if( !check_follows_focusin( this ))
- setActive( FALSE );
+ setActive( false );
}
// performs _NET_WM_MOVERESIZE
@@ -1679,7 +1684,7 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
else if( moveResizeMode && direction == NET::MoveResizeCancel )
{
finishMoveResize( true );
- buttonDown = FALSE;
+ buttonDown = false;
setCursor( mode );
}
else if( direction >= NET::TopLeft && direction <= NET::Left )
@@ -1699,7 +1704,7 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
return;
if( moveResizeMode )
finishMoveResize( false );
- buttonDown = TRUE;
+ buttonDown = true;
moveOffset = TQPoint( x_root - x(), y_root - y()); // map from global
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = false;
@@ -1751,12 +1756,12 @@ void Client::keyPressEvent( uint key_code )
case Key_Return:
case Key_Enter:
finishMoveResize( false );
- buttonDown = FALSE;
+ buttonDown = false;
setCursor( mode );
break;
case Key_Escape:
finishMoveResize( true );
- buttonDown = FALSE;
+ buttonDown = false;
setCursor( mode );
break;
default:
diff --git a/twin/geometry.cpp b/twin/geometry.cpp
index 2f9988e6b..6adad44fe 100644
--- a/twin/geometry.cpp
+++ b/twin/geometry.cpp
@@ -223,12 +223,12 @@ TQRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) co
{
if( desktop == NETWinInfo::OnAllDesktops || desktop == 0 )
desktop = currentDesktop();
- TQDesktopWidget *desktopwidget = kapp->desktop();
+ TQDesktopWidget *desktopwidget = tdeApp->desktop();
TQRect sarea = screenarea // may be NULL during KWin initialization
? screenarea[ desktop ][ screen ]
: desktopwidget->screenGeometry( screen );
TQRect warea = workarea[ desktop ].isNull()
- ? kapp->desktop()->geometry()
+ ? tdeApp->desktop()->geometry()
: workarea[ desktop ];
switch (opt)
{
@@ -337,23 +337,23 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
int snap = options->borderSnapZone; //snap trigger
if (snap)
{
- if ((sOWO?(cx<xmin):true) && (QABS(xmin-cx)<snap))
+ if ((sOWO?(cx<xmin):true) && (TQABS(xmin-cx)<snap))
{
deltaX = xmin-cx;
nx = xmin;
}
- if ((sOWO?(rx>xmax):true) && (QABS(rx-xmax)<snap) && (QABS(xmax-rx) < deltaX))
+ if ((sOWO?(rx>xmax):true) && (TQABS(rx-xmax)<snap) && (TQABS(xmax-rx) < deltaX))
{
deltaX = rx-xmax;
nx = xmax - cw;
}
- if ((sOWO?(cy<ymin):true) && (QABS(ymin-cy)<snap))
+ if ((sOWO?(cy<ymin):true) && (TQABS(ymin-cy)<snap))
{
deltaY = ymin-cy;
ny = ymin;
}
- if ((sOWO?(ry>ymax):true) && (QABS(ry-ymax)<snap) && (QABS(ymax-ry) < deltaY))
+ if ((sOWO?(ry>ymax):true) && (TQABS(ry-ymax)<snap) && (TQABS(ymax-ry) < deltaY))
{
deltaY =ry-ymax;
ny = ymax - ch;
@@ -380,14 +380,14 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
(( ry >= ly ) && ( ry <= lry )) ||
(( cy <= ly ) && ( ry >= lry )) )
{
- if ((sOWO?(cx<lrx):true) && (QABS(lrx-cx)<snap) && ( QABS(lrx -cx) < deltaX) )
+ if ((sOWO?(cx<lrx):true) && (TQABS(lrx-cx)<snap) && ( TQABS(lrx -cx) < deltaX) )
{
- deltaX = QABS( lrx - cx );
+ deltaX = TQABS( lrx - cx );
nx = lrx;
}
- if ((sOWO?(rx>lx):true) && (QABS(rx-lx)<snap) && ( QABS( rx - lx )<deltaX) )
+ if ((sOWO?(rx>lx):true) && (TQABS(rx-lx)<snap) && ( TQABS( rx - lx )<deltaX) )
{
- deltaX = QABS(rx - lx);
+ deltaX = TQABS(rx - lx);
nx = lx - cw;
}
}
@@ -396,15 +396,15 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
(( rx >= lx ) && ( rx <= lrx )) ||
(( cx <= lx ) && ( rx >= lrx )) )
{
- if ((sOWO?(cy<lry):true) && (QABS(lry-cy)<snap) && (QABS( lry -cy ) < deltaY))
+ if ((sOWO?(cy<lry):true) && (TQABS(lry-cy)<snap) && (TQABS( lry -cy ) < deltaY))
{
- deltaY = QABS( lry - cy );
+ deltaY = TQABS( lry - cy );
ny = lry;
}
- //if ( (QABS( ry-ly ) < snap) && (QABS( ry - ly ) < deltaY ))
- if ((sOWO?(ry>ly):true) && (QABS(ry-ly)<snap) && (QABS( ry - ly ) < deltaY ))
+ //if ( (TQABS( ry-ly ) < snap) && (TQABS( ry - ly ) < deltaY ))
+ if ((sOWO?(ry>ly):true) && (TQABS(ry-ly)<snap) && (TQABS( ry - ly ) < deltaY ))
{
- deltaY = QABS( ry - ly );
+ deltaY = TQABS( ry - ly );
ny = ly - ch;
}
}
@@ -451,30 +451,30 @@ TQRect Workspace::adjustClientSize( Client* c, TQRect moveResizeGeom, int mode )
deltaY = int(snap);
#define SNAP_BORDER_TOP \
- if ((sOWO?(newcy<ymin):true) && (QABS(ymin-newcy)<deltaY)) \
+ if ((sOWO?(newcy<ymin):true) && (TQABS(ymin-newcy)<deltaY)) \
{ \
- deltaY = QABS(ymin-newcy); \
+ deltaY = TQABS(ymin-newcy); \
newcy = ymin; \
}
#define SNAP_BORDER_BOTTOM \
- if ((sOWO?(newry>ymax):true) && (QABS(ymax-newry)<deltaY)) \
+ if ((sOWO?(newry>ymax):true) && (TQABS(ymax-newry)<deltaY)) \
{ \
- deltaY = QABS(ymax-newcy); \
+ deltaY = TQABS(ymax-newcy); \
newry = ymax; \
}
#define SNAP_BORDER_LEFT \
- if ((sOWO?(newcx<xmin):true) && (QABS(xmin-newcx)<deltaX)) \
+ if ((sOWO?(newcx<xmin):true) && (TQABS(xmin-newcx)<deltaX)) \
{ \
- deltaX = QABS(xmin-newcx); \
+ deltaX = TQABS(xmin-newcx); \
newcx = xmin; \
}
#define SNAP_BORDER_RIGHT \
- if ((sOWO?(newrx>xmax):true) && (QABS(xmax-newrx)<deltaX)) \
+ if ((sOWO?(newrx>xmax):true) && (TQABS(xmax-newrx)<deltaX)) \
{ \
- deltaX = QABS(xmax-newrx); \
+ deltaX = TQABS(xmax-newrx); \
newrx = xmax; \
}
switch ( mode )
@@ -543,30 +543,30 @@ TQRect Workspace::adjustClientSize( Client* c, TQRect moveResizeGeom, int mode )
#define SNAP_WINDOW_TOP if ( (sOWO?(newcy<lry):true) \
&& WITHIN_WIDTH \
- && (QABS( lry - newcy ) < deltaY) ) { \
- deltaY = QABS( lry - newcy ); \
+ && (TQABS( lry - newcy ) < deltaY) ) { \
+ deltaY = TQABS( lry - newcy ); \
newcy=lry; \
}
#define SNAP_WINDOW_BOTTOM if ( (sOWO?(newry>ly):true) \
&& WITHIN_WIDTH \
- && (QABS( ly - newry ) < deltaY) ) { \
- deltaY = QABS( ly - newry ); \
+ && (TQABS( ly - newry ) < deltaY) ) { \
+ deltaY = TQABS( ly - newry ); \
newry=ly; \
}
#define SNAP_WINDOW_LEFT if ( (sOWO?(newcx<lrx):true) \
&& WITHIN_HEIGHT \
- && (QABS( lrx - newcx ) < deltaX)) { \
- deltaX = QABS( lrx - newcx ); \
+ && (TQABS( lrx - newcx ) < deltaX)) { \
+ deltaX = TQABS( lrx - newcx ); \
newcx=lrx; \
}
#define SNAP_WINDOW_RIGHT if ( (sOWO?(newrx>lx):true) \
&& WITHIN_HEIGHT \
- && (QABS( lx - newrx ) < deltaX)) \
+ && (TQABS( lx - newrx ) < deltaX)) \
{ \
- deltaX = QABS( lx - newrx ); \
+ deltaX = TQABS( lx - newrx ); \
newrx=lx; \
}
@@ -679,7 +679,7 @@ void Workspace::updateTopMenuGeometry( Client* c )
static Atom msg_type_atom = XInternAtom( tqt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False );
ev.xclient.message_type = msg_type_atom;
ev.xclient.format = 32;
- ev.xclient.data.l[0] = GET_QT_X_TIME();
+ ev.xclient.data.l[0] = get_tqt_x_time();
ev.xclient.data.l[1] = topmenu_space->width();
ev.xclient.data.l[2] = topmenu_space->height();
ev.xclient.data.l[3] = 0;
@@ -802,7 +802,7 @@ TQRect Client::adjustedClientArea( const TQRect &desktopArea, const TQRect& area
// HACK: workarea handling is not xinerama aware, so if this strut
// reserves place at a xinerama edge that's inside the virtual screen,
// ignore the strut for workspace setting.
- if( area == kapp->desktop()->geometry())
+ if( area == tdeApp->desktop()->geometry())
{
if( stareaL.left() < screenarea.left())
stareaL = TQRect();
@@ -1451,6 +1451,8 @@ const TQPoint Client::calculateGravitation( bool invert, int gravity ) const
void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool )
{
+ inhibitConfigureRequests = true;
+ configureRequestTimer->start(100, true);
if( gravity == 0 ) // default (nonsense) value for the argument
gravity = xSizeHint.win_gravity;
if( value_mask & ( CWX | CWY ))
@@ -1690,7 +1692,7 @@ bool Client::isMaximizable() const
return false;
}
if ( maximizeMode() != MaximizeRestore )
- return TRUE;
+ return true;
TQSize max = maxSize();
#if 0
if( max.width() < 32767 || max.height() < 32767 ) // sizes are 16bit with X
@@ -1913,12 +1915,12 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
TQRect clientArea = workspace()->clientArea( MaximizeArea, this );
// save sizes for restoring, if maximalizing
- if( !adjust && !( y() == clientArea.top() && height() == clientArea.height()))
+ if( !activeTiled && !adjust && !( y() == clientArea.top() && height() == clientArea.height()))
{
geom_restore.setTop( y());
geom_restore.setHeight( height());
}
- if( !adjust && !( x() == clientArea.left() && width() == clientArea.width()))
+ if( !activeTiled && !adjust && !( x() == clientArea.left() && width() == clientArea.width()))
{
geom_restore.setLeft( x());
geom_restore.setWidth( width());
@@ -2311,9 +2313,9 @@ bool Client::startMoveResize()
XMapRaised( tqt_xdisplay(), move_resize_grab_window );
if( XGrabPointer( tqt_xdisplay(), move_resize_grab_window, False,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask,
- GrabModeAsync, GrabModeAsync, move_resize_grab_window, cursor.handle(), GET_QT_X_TIME() ) == Success )
+ GrabModeAsync, GrabModeAsync, move_resize_grab_window, cursor.handle(), get_tqt_x_time() ) == Success )
has_grab = true;
- if( XGrabKeyboard( tqt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME() ) == Success )
+ if( XGrabKeyboard( tqt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, get_tqt_x_time() ) == Success )
has_grab = true;
if( !has_grab ) // at least one grab is necessary in order to be able to finish move/resize
{
@@ -2326,26 +2328,19 @@ bool Client::startMoveResize()
moveResizeMode = true;
initialMoveResizeGeom = geometry();
- if (activeTiled)
+ if ( maximizeMode() != MaximizeRestore )
{
- // Restore original geometry
- activeTiled = false;
if (options->resetMaximizedWindowGeometry() && isMove()) {
/* Original geometry might be smaller than the tiled one, so the
* mouse pointer might appear off-window when untiling.
* Here we center the window horizontally under the mouse pointer.
* This should work with most window decorations.
*/
- activeTiledOrigGeom.moveLeft(TQCursor::pos().x() - (activeTiledOrigGeom.width() / 2));
- moveOffset.setX(TQCursor::pos().x() - activeTiledOrigGeom.x());
+ geom_restore.moveLeft(TQCursor::pos().x() - (geom_restore.width() / 2));
+ moveOffset.setX(TQCursor::pos().x() - geom_restore.x());
- setGeometry(activeTiledOrigGeom);
- }
- }
+ setGeometry(geom_restore);
- if ( maximizeMode() != MaximizeRestore )
- {
- if (options->resetMaximizedWindowGeometry() && isMove()) {
maximize(MaximizeRestore);
}
else {
@@ -2374,14 +2369,14 @@ bool Client::startMoveResize()
|| ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) )
{
grabXServer();
- kapp->sendPostedEvents();
+ tdeApp->sendPostedEvents();
// we have server grab -> nothing should cause paint events
// unfortunately, that's not completely true, Qt may generate
// paint events on some widgets due to FocusIn(?)
// eat them, otherwise XOR painting will be broken (#58054)
// paint events for the geometrytip need to be allowed, though
// eater = new EatAllPaintEvents;
-// not needed anymore? kapp->installEventFilter( eater );
+// not needed anymore? tdeApp->installEventFilter( eater );
}
Notify::raise( isResize() ? Notify::ResizeStart : Notify::MoveStart );
@@ -2409,7 +2404,7 @@ void Client::finishMoveResize( bool cancel )
kdDebug() <<"finishing moveresize in active mode, cancel is " << cancel << endl;
activeMaximizing = false;
activeTiled = true;
- activeTiledOrigGeom = initialMoveResizeGeom;
+ geom_restore = initialMoveResizeGeom;
switch (activeMode)
{
case ActiveMaximizeMode: {
@@ -2423,7 +2418,6 @@ void Client::finishMoveResize( bool cancel )
setGeometry(cancel ? initialMoveResizeGeom
: activeBorderMaximizeGeometry());
}
- activeTiledOrigGeom.moveTopLeft(rect().topLeft());
}
checkMaximizeGeometry();
@@ -2448,8 +2442,8 @@ void Client::leaveMoveResize()
if ( ( isMove() && rules()->checkMoveResizeMode( options->moveMode ) != Options::Opaque )
|| ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) )
ungrabXServer();
- XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() );
- XUngrabPointer( tqt_xdisplay(), GET_QT_X_TIME() );
+ XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
+ XUngrabPointer( tqt_xdisplay(), get_tqt_x_time() );
XDestroyWindow( tqt_xdisplay(), move_resize_grab_window );
move_resize_grab_window = None;
workspace()->setClientIsMoving(0);
@@ -2710,7 +2704,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) {
}
}
if (isMove()) {
- workspace()->checkActiveBorder(globalPos, GET_QT_X_TIME());
+ workspace()->checkActiveBorder(globalPos, get_tqt_x_time());
}
}
@@ -2724,6 +2718,16 @@ ActiveMaximizingMode Client::activeBorderMode() const
return activeMode;
}
+void Client::setActiveBorderPos( TQPoint pos )
+{
+ activePos = pos;
+}
+
+TQPoint Client::activeBorderPos() const
+{
+ return activePos;
+}
+
void Client::setActiveBorder(ActiveBorder border) {
currentActiveBorder = border;
}
@@ -2764,7 +2768,7 @@ void Client::cancelActiveBorderMaximizing() {
TQRect Client::activeBorderMaximizeGeometry()
{
TQRect ret;
- TQRect max = workspace()->clientArea(MaximizeArea, TQCursor::pos(), workspace()->currentDesktop());
+ TQRect max = workspace()->clientArea(MaximizeArea, activePos, workspace()->currentDesktop());
switch (activeBorderMode())
{
case ActiveMaximizeMode:
@@ -2826,4 +2830,19 @@ TQRect Client::activeBorderMaximizeGeometry()
return ret;
}
+void Client::tileToBorder(ActiveBorder border) {
+ if (!isResizable()) return;
+ activeTiled = true;
+ if (maximizeMode() == MaximizeRestore)
+ geom_restore = geometry();
+ setActiveBorderMode(ActiveTilingMode);
+ setActiveBorderPos(TQCursor().pos());
+ setActiveBorder(border);
+ TQRect geo = activeBorderMaximizeGeometry();
+ if (geo.isValid() && !geo.isEmpty()) {
+ setGeometry(geo);
+ }
+ workspace()->raiseClient(this);
+}
+
} // namespace
diff --git a/twin/kcmtwin/twindecoration/buttons.cpp b/twin/kcmtwin/twindecoration/buttons.cpp
index 40f63d981..36534f806 100644
--- a/twin/kcmtwin/twindecoration/buttons.cpp
+++ b/twin/kcmtwin/twindecoration/buttons.cpp
@@ -84,9 +84,9 @@ bool ButtonDrag::decode( TQDropEvent* e, Button& btn )
int supported;
stream >> supported;
btn.supported = supported;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -267,7 +267,7 @@ ButtonDropSite::ButtonDropSite( TQWidget* parent, const char* name )
: TQFrame( parent, name ),
m_selected(0)
{
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
setFrameShape( WinPanel );
setFrameShadow( Raised );
setMinimumHeight( 26 );
@@ -689,11 +689,11 @@ ButtonPositionWidget::ButtonPositionWidget(TQWidget *parent, const char* name)
layout->addWidget(m_dropSite);
layout->addWidget(m_buttonSource);
- connect( m_dropSite, TQT_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQT_SLOT(hideButton(TQChar)) );
- connect( m_dropSite, TQT_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQT_SLOT(showButton(TQChar)) );
- connect( m_buttonSource, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQT_SLOT(removeSelectedButton()) );
+ connect( m_dropSite, TQ_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQ_SLOT(hideButton(TQChar)) );
+ connect( m_dropSite, TQ_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQ_SLOT(showButton(TQChar)) );
+ connect( m_buttonSource, TQ_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQ_SLOT(removeSelectedButton()) );
- connect( m_dropSite, TQT_SIGNAL(changed()), TQT_SIGNAL(changed()) );
+ connect( m_dropSite, TQ_SIGNAL(changed()), TQ_SIGNAL(changed()) );
// insert all possible buttons into the source (backwards to keep the preferred order...)
bool dummy;
diff --git a/twin/kcmtwin/twindecoration/preview.cpp b/twin/kcmtwin/twindecoration/preview.cpp
index 954ff1774..a1c92c8cb 100644
--- a/twin/kcmtwin/twindecoration/preview.cpp
+++ b/twin/kcmtwin/twindecoration/preview.cpp
@@ -234,7 +234,7 @@ TQWidget* KDecorationPreviewBridge::initialParentWidget() const
return preview;
}
-Qt::WFlags KDecorationPreviewBridge::initialWFlags() const
+TQt::WFlags KDecorationPreviewBridge::initialWFlags() const
{
return 0;
}
diff --git a/twin/kcmtwin/twindecoration/twindecoration.cpp b/twin/kcmtwin/twindecoration/twindecoration.cpp
index ef152c0aa..408bd563c 100644
--- a/twin/kcmtwin/twindecoration/twindecoration.cpp
+++ b/twin/kcmtwin/twindecoration/twindecoration.cpp
@@ -47,14 +47,14 @@
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <kdebug.h>
-#include <kdesktopfile.h>
-#include <kstandarddirs.h>
+#include <tdedesktopfile.h>
+#include <tdestandarddirs.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include <kdialog.h>
#include <kgenericfactory.h>
#include <tdeaboutdata.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <dcopclient.h>
#include "twindecoration.h"
@@ -189,36 +189,36 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
inactiveShadowSettings = new TQGroupBox(1, TQt::Horizontal,
i18n("Inactive Window Shadows"), shadowPage);
whichShadowSettings = new TQGroupBox(3, TQt::Horizontal,
- i18n("Draw Shadow Under Normal Windows And..."), shadowPage);
+ i18n("Draw Shadow Under Normal Windows And…"), shadowPage);
cbShadowDocks = new TQCheckBox(i18n("Docks and &panels"),
whichShadowSettings);
- connect(cbShadowDocks, TQT_SIGNAL(toggled(bool)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(cbShadowDocks, TQ_SIGNAL(toggled(bool)),
+ TQ_SLOT(slotSelectionChanged()));
cbShadowOverrides = new TQCheckBox(i18n("O&verride windows"),
whichShadowSettings);
- connect(cbShadowOverrides, TQT_SIGNAL(toggled(bool)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(cbShadowOverrides, TQ_SIGNAL(toggled(bool)),
+ TQ_SLOT(slotSelectionChanged()));
cbShadowTopMenus = new TQCheckBox(i18n("&Top menu"),
whichShadowSettings);
- connect(cbShadowTopMenus, TQT_SIGNAL(toggled(bool)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(cbShadowTopMenus, TQ_SIGNAL(toggled(bool)),
+ TQ_SLOT(slotSelectionChanged()));
cbInactiveShadow = new TQCheckBox(
i18n("Draw shadow under &inactive windows"), inactiveShadowSettings);
- connect(cbInactiveShadow, TQT_SIGNAL(toggled(bool)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(cbInactiveShadow, TQ_SIGNAL(toggled(bool)),
+ TQ_SLOT(slotSelectionChanged()));
shadowColourHBox = new TQHBox(activeShadowSettings);
shadowColourHBox->setSpacing(KDialog::spacingHint());
shadowColourLabel = new TQLabel(i18n("Colour:"), shadowColourHBox);
shadowColourButton = new KColorButton(shadowColourHBox);
- connect(shadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged()));
+ connect(shadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged()));
inactiveShadowColourHBox = new TQHBox(inactiveShadowSettings);
inactiveShadowColourHBox->setSpacing(KDialog::spacingHint());
inactiveShadowColourLabel = new TQLabel(i18n("Colour:"), inactiveShadowColourHBox);
inactiveShadowColourButton = new KColorButton(inactiveShadowColourHBox);
- connect(inactiveShadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged()));
+ connect(inactiveShadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged()));
shadowOpacityHBox = new TQHBox(activeShadowSettings);
shadowOpacityHBox->setSpacing(KDialog::spacingHint());
@@ -229,12 +229,12 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
shadowOpacitySlider->setTickInterval(10);
shadowOpacitySpinBox = new TQSpinBox(1, 100, 1, shadowOpacityHBox);
shadowOpacitySpinBox->setSuffix(" %");
- connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), shadowOpacitySpinBox,
- TQT_SLOT(setValue(int)));
- connect(shadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)), shadowOpacitySlider,
- TQT_SLOT(setValue(int)));
- connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), shadowOpacitySpinBox,
+ TQ_SLOT(setValue(int)));
+ connect(shadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)), shadowOpacitySlider,
+ TQ_SLOT(setValue(int)));
+ connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
inactiveShadowOpacityHBox = new TQHBox(inactiveShadowSettings);
inactiveShadowOpacityHBox->setSpacing(KDialog::spacingHint());
@@ -247,14 +247,14 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
inactiveShadowOpacitySpinBox = new TQSpinBox(1, 100, 1,
inactiveShadowOpacityHBox);
inactiveShadowOpacitySpinBox->setSuffix(" %");
- connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)),
+ connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)),
inactiveShadowOpacitySpinBox,
- TQT_SLOT(setValue(int)));
- connect(inactiveShadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQ_SLOT(setValue(int)));
+ connect(inactiveShadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)),
inactiveShadowOpacitySlider,
- TQT_SLOT(setValue(int)));
- connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ TQ_SLOT(setValue(int)));
+ connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
shadowXOffsetHBox = new TQHBox(activeShadowSettings);
shadowXOffsetHBox->setSpacing(KDialog::spacingHint());
@@ -263,8 +263,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
shadowXOffsetHBox);
shadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowXOffsetHBox);
shadowXOffsetSpinBox->setSuffix(i18n(" pixels"));
- connect(shadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(shadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
inactiveShadowXOffsetHBox = new TQHBox(inactiveShadowSettings);
inactiveShadowXOffsetHBox->setSpacing(KDialog::spacingHint());
@@ -274,8 +274,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
inactiveShadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1,
inactiveShadowXOffsetHBox);
inactiveShadowXOffsetSpinBox->setSuffix(i18n(" pixels"));
- connect(inactiveShadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(inactiveShadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
shadowYOffsetHBox = new TQHBox(activeShadowSettings);
shadowYOffsetHBox->setSpacing(KDialog::spacingHint());
@@ -284,8 +284,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
shadowYOffsetHBox);
shadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowYOffsetHBox);
shadowYOffsetSpinBox->setSuffix(i18n(" pixels"));
- connect(shadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(shadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
inactiveShadowYOffsetHBox = new TQHBox(inactiveShadowSettings);
inactiveShadowYOffsetHBox->setSpacing(KDialog::spacingHint());
@@ -295,8 +295,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
inactiveShadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1,
inactiveShadowYOffsetHBox);
inactiveShadowYOffsetSpinBox->setSuffix(i18n(" pixels"));
- connect(inactiveShadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(inactiveShadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
shadowThicknessHBox = new TQHBox(activeShadowSettings);
shadowThicknessHBox->setSpacing(KDialog::spacingHint());
@@ -306,8 +306,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
shadowThicknessSpinBox = new TQSpinBox(1, 100, 1,
shadowThicknessHBox);
shadowThicknessSpinBox->setSuffix(i18n(" pixels"));
- connect(shadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(shadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
inactiveShadowThicknessHBox = new TQHBox(inactiveShadowSettings);
inactiveShadowThicknessHBox->setSpacing(KDialog::spacingHint());
@@ -317,8 +317,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
inactiveShadowThicknessSpinBox = new TQSpinBox(1, 100, 1,
inactiveShadowThicknessHBox);
inactiveShadowThicknessSpinBox->setSuffix(i18n(" pixels"));
- connect(inactiveShadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)),
- TQT_SLOT(slotSelectionChanged()));
+ connect(inactiveShadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)),
+ TQ_SLOT(slotSelectionChanged()));
// Page 4 (WM selector)
windowmanagerPage = new TQWidget( tabWidget );
@@ -355,25 +355,25 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
tabWidget->insertTab( shadowPage, i18n("&Shadows") );
tabWidget->insertTab( windowmanagerPage, i18n("&Window Manager") );
- connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotButtonsChanged()) ); // update preview etc.
- connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); // emit changed()...
- connect( decorationList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) );
- connect( decorationList, TQT_SIGNAL(activated(const TQString&)),
- TQT_SLOT(slotChangeDecoration(const TQString&)) );
- connect( cbUseCustomButtonPositions, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
- connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), buttonPositionWidget, TQT_SLOT(setEnabled(bool)));
- connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsChanged()) );
- connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), activeShadowSettings, TQT_SLOT(setEnabled(bool)));
- connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), inactiveShadowSettings, TQT_SLOT(setEnabled(bool)));
- connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), whichShadowSettings, TQT_SLOT(setEnabled(bool)));
-
- connect( cbShowToolTips, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
- connect( cbWindowShadow, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
- connect( cBorder, TQT_SIGNAL( activated( int )), TQT_SLOT( slotBorderChanged( int )));
-// connect( cbUseMiniWindows, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
-
- connect( thirdpartyWMList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) );
- connect( thirdpartyWMArguments, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotSelectionChanged()) );
+ connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotButtonsChanged()) ); // update preview etc.
+ connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) ); // emit changed()...
+ connect( decorationList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) );
+ connect( decorationList, TQ_SIGNAL(activated(const TQString&)),
+ TQ_SLOT(slotChangeDecoration(const TQString&)) );
+ connect( cbUseCustomButtonPositions, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) );
+ connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), buttonPositionWidget, TQ_SLOT(setEnabled(bool)));
+ connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotButtonsChanged()) );
+ connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), activeShadowSettings, TQ_SLOT(setEnabled(bool)));
+ connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), inactiveShadowSettings, TQ_SLOT(setEnabled(bool)));
+ connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), whichShadowSettings, TQ_SLOT(setEnabled(bool)));
+
+ connect( cbShowToolTips, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) );
+ connect( cbWindowShadow, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) );
+ connect( cBorder, TQ_SIGNAL( activated( int )), TQ_SLOT( slotBorderChanged( int )));
+// connect( cbUseMiniWindows, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) );
+
+ connect( thirdpartyWMList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) );
+ connect( thirdpartyWMArguments, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(slotSelectionChanged()) );
// Allow twin dcop signal to update our selection list
connectDCOPSignal("twin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false);
@@ -409,9 +409,9 @@ void KWinDecorationModule::findDecorations()
for (TQFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it)
{
TQString filename(it.current()->absFilePath());
- if (KDesktopFile::isDesktopFile(filename))
+ if (TDEDesktopFile::isDesktopFile(filename))
{
- KDesktopFile desktopFile(filename);
+ TDEDesktopFile desktopFile(filename);
TQString libName = desktopFile.readEntry("X-TDE-Library");
if (!libName.isEmpty() && libName.startsWith("twin_") || libName.startsWith("twin3_"))
@@ -660,10 +660,10 @@ void KWinDecorationModule::resetPlugin( TDEConfig* conf, const TQString& current
pluginObject = (TQObject*)(allocatePlugin( conf, pluginConfigWidget ));
// connect required signals and slots together...
- connect( pluginObject, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) );
- connect( this, TQT_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQT_SLOT(load(TDEConfig*)) );
- connect( this, TQT_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQT_SLOT(save(TDEConfig*)) );
- connect( this, TQT_SIGNAL(pluginDefaults()), pluginObject, TQT_SLOT(defaults()) );
+ connect( pluginObject, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) );
+ connect( this, TQ_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQ_SLOT(load(TDEConfig*)) );
+ connect( this, TQ_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQ_SLOT(save(TDEConfig*)) );
+ connect( this, TQ_SIGNAL(pluginDefaults()), pluginObject, TQ_SLOT(defaults()) );
pluginConfigWidget->show();
return;
}
@@ -753,11 +753,11 @@ void KWinDecorationModule::readConfig( TDEConfig* conf )
int swm;
for ( swm = 0; swm < thirdpartyWMList->count(); ++swm ) {
if ( thirdpartyWMList->text( swm ).startsWith(selectedWM + " ") ) {
- found = TRUE;
+ found = true;
break;
}
}
- if (found == FALSE) {
+ if (found == false) {
thirdpartyWMList->setCurrentItem(0);
}
else {
@@ -938,10 +938,7 @@ void KWinDecorationModule::checkSupportedBorderSizes()
TQString KWinDecorationModule::styleToConfigLib( TQString& styleLib )
{
- if( styleLib.startsWith( "twin_" ))
- return "twin_" + styleLib.mid( 6 ) + "_config";
- else
- return styleLib + "_config";
+ return styleLib + "_config";
}
TQString KWinDecorationModule::quickHelp() const
@@ -951,7 +948,7 @@ TQString KWinDecorationModule::quickHelp() const
"as well as titlebar button positions and custom decoration options.</p>"
"To choose a theme for your window decoration click on its name and apply your choice by clicking the \"Apply\" button below."
" If you do not want to apply your choice you can click the \"Reset\" button to discard your changes."
- "<p>You can configure each theme in the \"Configure [...]\" tab. There are different options specific for each theme.</p>"
+ "<p>You can configure each theme in the \"Configure […]\" tab. There are different options specific for each theme.</p>"
"<p>In \"General Options (if available)\" you can activate the \"Buttons\" tab by checking the \"Use custom titlebar button positions\" box."
" In the \"Buttons\" tab you can change the positions of the buttons to your liking.</p>" );
}
@@ -973,7 +970,7 @@ TQString KWinDecorationModule::handbookSection() const
void KWinDecorationModule::resetKWin()
{
- bool ok = kapp->dcopClient()->send("twin*", "KWinInterface",
+ bool ok = tdeApp->dcopClient()->send("twin*", "KWinInterface",
"reconfigure()", TQByteArray());
if (!ok)
kdDebug() << "kcmtwindecoration: Could not reconfigure twin" << endl;
diff --git a/twin/kcmtwin/twinoptions/main.cpp b/twin/kcmtwin/twinoptions/main.cpp
index e55d5a15f..0bc9c942c 100644
--- a/twin/kcmtwin/twinoptions/main.cpp
+++ b/twin/kcmtwin/twinoptions/main.cpp
@@ -36,7 +36,7 @@
extern "C"
{
- KDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
@@ -44,14 +44,14 @@ extern "C"
return new KFocusConfig(true, c, parent, name);
}
- KDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
return new TDEActionsOptions( parent, name);
}
- KDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
@@ -59,14 +59,14 @@ extern "C"
return new KMovingConfig(true, c, parent, name);
}
- KDE_EXPORT TDECModule *create_twinaborders(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twinaborders(TQWidget *parent, const char *name)
{
TDEGlobal::locale()->insertCatalogue("kcmkwm");
TDEConfig *c = new TDEConfig("twinrc", false, true);
return new KActiveBorderConfig(true, c, parent, name);
}
- KDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
@@ -74,7 +74,7 @@ extern "C"
return new KAdvancedConfig(true, c, parent, name);
}
- KDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name)
+ TDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
@@ -82,7 +82,7 @@ extern "C"
return new KTranslucencyConfig(true, c, parent, name);
}
- KDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name)
+ TDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name)
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue("kcmkwm");
@@ -102,37 +102,37 @@ KWinOptions::KWinOptions(TQWidget *parent, const char *name)
mFocus = new KFocusConfig(false, mConfig, this, "TWin Focus Config");
mFocus->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mFocus, i18n("&Focus"));
- connect(mFocus, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mFocus, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions");
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
- connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions");
mWindowActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
- connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mMoving = new KMovingConfig(false, mConfig, this, "TWin Moving");
mMoving->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mMoving, i18n("&Moving"));
- connect(mMoving, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mMoving, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mABorders = new KActiveBorderConfig(false, mConfig, this, "TWin Active Borders");
mABorders->layout()->setMargin(KDialog::marginHint());
tab->addTab(mABorders, i18n("Active &Borders"));
- connect(mABorders, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mABorders, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mAdvanced = new KAdvancedConfig(false, mConfig, this, "TWin Advanced");
mAdvanced->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mAdvanced, i18n("Ad&vanced"));
- connect(mAdvanced, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mAdvanced, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mTranslucency = new KTranslucencyConfig(false, mConfig, this, "TWin Translucency");
mTranslucency->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTranslucency, i18n("&Translucency"));
- connect(mTranslucency, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mTranslucency, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
TDEAboutData *about =
new TDEAboutData(I18N_NOOP("kcmtwinoptions"), I18N_NOOP("Window Behavior Configuration Module"),
@@ -183,9 +183,9 @@ void KWinOptions::save()
emit TDECModule::changed( false );
// Send signal to twin
mConfig->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
@@ -266,12 +266,12 @@ TDEActionsOptions::TDEActionsOptions(TQWidget *parent, const char *name)
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions");
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
- connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions");
mWindowActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
- connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
+ connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool)));
}
TDEActionsOptions::~TDEActionsOptions()
@@ -295,9 +295,9 @@ void TDEActionsOptions::save()
emit TDECModule::changed( false );
// Send signal to twin
mConfig->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
diff --git a/twin/kcmtwin/twinoptions/mouse.cpp b/twin/kcmtwin/twinoptions/mouse.cpp
index 3314604e7..8ed44e79e 100644
--- a/twin/kcmtwin/twinoptions/mouse.cpp
+++ b/twin/kcmtwin/twinoptions/mouse.cpp
@@ -164,7 +164,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
combo->insertItem(i18n("On All Desktops"));
combo->insertItem(i18n("Nothing"));
combo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
hlayout->addWidget(combo);
coTiDbl = combo;
TQWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar."));
@@ -189,14 +189,14 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
comboW->insertItem(i18n("Change Opacity"));
comboW->insertItem(i18n("Nothing"));
comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
- connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(comboW, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
hlayoutW->addWidget(comboW);
coTiW = comboW;
TQWhatsThis::add(comboW, txtButton4);
label->setBuddy(comboW);
cbTiRevW = new TQCheckBox(i18n("Reverse wheel direction"), this);
- connect(cbTiRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(cbTiRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
TQWhatsThis::add( cbTiRevW, i18n("Use this to reverse the action of the mouse wheel.") );
hlayoutW->addWidget(cbTiRevW);
@@ -266,21 +266,21 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
// Titlebar and frame, active, mouse button 1
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiAct1 = combo;
TQWhatsThis::add(combo, txtButton1);
// Titlebar and frame, active, mouse button 2
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiAct2 = combo;
TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window."));
// Titlebar and frame, active, mouse button 3
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiAct3 = combo;
TQWhatsThis::add(combo, txtButton3 );
@@ -310,19 +310,19 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiInAct1 = combo;
TQWhatsThis::add(combo, txtButton1);
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiInAct2 = combo;
TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window."));
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coTiInAct3 = combo;
TQWhatsThis::add(combo, txtButton3);
@@ -362,13 +362,13 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
coMax[b] = new ToolTipComboBox(box, tbl_Max);
for (int t = 0; t < 3; ++t) coMax[b]->insertItem(maxButtonPixmaps[t]);
- connect(coMax[b], TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- connect(coMax[b], TQT_SIGNAL(activated(int)), coMax[b], TQT_SLOT(changed()));
+ connect(coMax[b], TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
+ connect(coMax[b], TQ_SIGNAL(activated(int)), coMax[b], TQ_SLOT(changed()));
TQWhatsThis::add( coMax[b], txtButton[b] );
coMax[b]->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ));
}
- connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(paletteChanged()));
+ connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(paletteChanged()));
layout->addStretch();
@@ -567,9 +567,9 @@ void KTitleBarActionsConfig::save()
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
}
@@ -655,19 +655,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
TQComboBox* combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coWin1 = combo;
TQWhatsThis::add( combo, strWin1 );
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coWin2 = combo;
TQWhatsThis::add( combo, strWin2 );
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coWin3 = combo;
TQWhatsThis::add( combo, strWin3 );
@@ -727,7 +727,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
combo = new TQComboBox(grid);
combo->insertItem(i18n("Meta"));
combo->insertItem(i18n("Alt"));
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coAllKey = combo;
TQWhatsThis::add( combo, strAllKey );
@@ -743,19 +743,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coAll1 = combo;
TQWhatsThis::add( combo, strAll1 );
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coAll2 = combo;
TQWhatsThis::add( combo, strAll2 );
combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coAll3 = combo;
TQWhatsThis::add( combo, strAll3 );
@@ -767,12 +767,12 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
combo->insertItem(i18n("Move to Previous/Next Desktop"));
combo->insertItem(i18n("Change Opacity"));
combo->insertItem(i18n("Nothing"));
- connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
coAllW = combo;
TQWhatsThis::add( combo, strAllW );
cbAllRevW = new TQCheckBox(i18n("Reverse wheel direction"), grid);
- connect(cbAllRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(cbAllRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
TQWhatsThis::add( cbAllRevW, i18n("Use this to reverse the action of the mouse wheel.") );
layout->addStretch();
@@ -850,9 +850,9 @@ void KWindowActionsConfig::save()
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
}
diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp
index 1a2286878..53c55f90c 100644
--- a/twin/kcmtwin/twinoptions/windows.cpp
+++ b/twin/kcmtwin/twinoptions/windows.cpp
@@ -45,7 +45,7 @@
#include <kdialog.h>
#include <dcopclient.h>
#include <tdeglobal.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <tqtabwidget.h>
#include <X11/X.h>
@@ -169,12 +169,12 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
TQWhatsThis::add( focusCombo, wtstr);
TQWhatsThis::add(fLabel, wtstr);
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAutoRaiseEnabled()) );
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setAutoRaiseEnabled()) );
// autoraise delay
autoRaiseOn = new TQCheckBox(i18n("Auto &raise"), fcsBox);
fLay->addWidget(autoRaiseOn);
- connect(autoRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(autoRaiseOnTog(bool)));
+ connect(autoRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(autoRaiseOnTog(bool)));
autoRaise = new KIntNumInput(500, fcsBox);
autoRaise->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
@@ -183,11 +183,11 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
autoRaise->setSuffix(i18n(" msec"));
fLay->addWidget(autoRaise);
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDelayFocusEnabled()) );
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setDelayFocusEnabled()) );
delayFocusOn = new TQCheckBox(i18n("Delay focus"), fcsBox);
fLay->addWidget(delayFocusOn);
- connect(delayFocusOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(delayFocusOnTog(bool)));
+ connect(delayFocusOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(delayFocusOnTog(bool)));
delayFocus = new KIntNumInput(500, fcsBox);
delayFocus->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
@@ -197,7 +197,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
fLay->addWidget(delayFocus);
clickRaiseOn = new TQCheckBox(i18n("Click &raises active window"), fcsBox);
- connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool)));
+ connect(clickRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(clickRaiseOnTog(bool)));
fLay->addWidget(clickRaiseOn);
// fLay->addColSpacing(0,TQMAX(autoRaiseOn->sizeHint().width(),
@@ -263,7 +263,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
" with the focused window. This option is by default disabled for Click to focus and"
" enabled for other focus policies." );
TQWhatsThis::add( activeMouseScreen, wtstr );
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateActiveMouseScreen()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateActiveMouseScreen()));
if (!TQApplication::desktop()->isVirtualDesktop() ||
TQApplication::desktop()->numScreens() == 1) // No Ximerama
@@ -291,7 +291,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
" is pressed, with no popup widget. In addition, the previously"
" activated window will be sent to the back in this mode.");
TQWhatsThis::add( altTabPopup, wtstr );
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateAltTabMode()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateAltTabMode()));
traverseAll = new TQCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
kLay->addWidget( traverseAll );
@@ -319,17 +319,17 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
lay->addStretch();
// Any changes goes to slotChanged()
- connect(focusCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- connect(fcsBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()));
- connect(autoRaise, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(delayFocus, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(separateScreenFocus, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(activeMouseScreen, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(altTabPopup, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(traverseAll, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(rollOverDesktops, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(showPopupinfo, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(focusStealing, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
+ connect(fcsBox, TQ_SIGNAL(clicked(int)), TQ_SLOT(changed()));
+ connect(autoRaise, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(delayFocus, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(separateScreenFocus, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(activeMouseScreen, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(altTabPopup, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(traverseAll, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(rollOverDesktops, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(showPopupinfo, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(focusStealing, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
load();
}
@@ -585,9 +585,9 @@ void KFocusConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
emit TDECModule::changed(false);
}
@@ -656,7 +656,7 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T
" satisfying on slow machines."));
delays = new KIntNumInput(10, active_box);
- delays->setRange(0, MAX_EDGE_RES, 50, true);
+ delays->setRange(0, MAX_EDGE_RES, 10, true);
delays->setSuffix(i18n(" msec"));
delays->setLabel(i18n("Border &activation delay:"));
TQWhatsThis::add( delays, i18n("Here you can set a delay for the activation of"
@@ -664,7 +664,7 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T
" has been pushed against a screen border for the specified number of milliseconds.") );
distance = new KIntNumInput(10, active_box);
- distance->setRange(1, 100, 1, true);
+ distance->setRange(1, 300, 1, true);
distance->setSuffix(i18n(" px"));
distance->setLabel(i18n("Border &activation distance:"));
TQWhatsThis::add( distance, i18n("The distance from which an active border can"
@@ -686,15 +686,15 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T
active_vbox->addSpacing(15);
active_vbox->addWidget(tilingOpaque);
- connect(active_box, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(updateActiveBorders()));
+ connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(updateActiveBorders()));
// Any changes go to slotChanged()
- connect(active_box, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(changed()));
- connect(active_move, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
- connect(active_maximize, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
- connect(delays, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
- connect(distance, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
- connect(tilingOpaque, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
+ connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(changed()));
+ connect(active_move, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
+ connect(active_maximize, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
+ connect(delays, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed()));
+ connect(distance, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed()));
+ connect(tilingOpaque, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
lay->addWidget(active_box);
lay->addStretch();
@@ -748,9 +748,9 @@ void KActiveBorderConfig::save() {
if (standAlone)
{
config->sync();
- if (!kapp->dcopClient()->isAttached())
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if (!tdeApp->dcopClient()->isAttached())
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
emit TDECModule::changed(false);
}
@@ -860,7 +860,7 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget
shadeHoverOn = new TQCheckBox(i18n("&Enable hover"), shBox);
- connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shadeHoverChanged(bool)));
+ connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(shadeHoverChanged(bool)));
shadeHover = new KIntNumInput(500, shBox);
shadeHover->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
@@ -878,16 +878,16 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget
lay->addWidget(shBox);
// Any changes goes to slotChanged()
- connect(animateShade, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(shadeHover, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(animateShade, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(shadeHover, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
hideUtilityWindowsForInactive = new TQCheckBox( i18n( "Hide utility windows for inactive applications" ), this );
TQWhatsThis::add( hideUtilityWindowsForInactive,
- i18n( "When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be"
+ i18n( "When turned on, utility windows (tool windows, torn-off menus,…) of inactive applications will be"
" hidden and will be shown only when the application becomes active. Note that applications"
" have to mark the windows with the proper window type for this feature to work." ));
- connect(hideUtilityWindowsForInactive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(hideUtilityWindowsForInactive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
lay->addWidget( hideUtilityWindowsForInactive );
lay->addStretch();
@@ -954,9 +954,9 @@ void KAdvancedConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
emit TDECModule::changed(false);
}
@@ -1010,7 +1010,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
" its size."));
TQGridLayout *rLay = new TQGridLayout(2,3);
- bLay->addLayout(TQT_TQLAYOUT(rLay));
+ bLay->addLayout(rLay);
rLay->setColStretch(0,0);
rLay->setColStretch(1,1);
@@ -1027,8 +1027,8 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
minimizeAnimSlider->setTickmarks(TQSlider::Below);
rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2);
- connect(minimizeAnimOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setMinimizeAnim(bool)));
- connect(minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMinimizeAnimSpeed(int)));
+ connect(minimizeAnimOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setMinimizeAnim(bool)));
+ connect(minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setMinimizeAnimSpeed(int)));
minimizeAnimSlowLabel= new TQLabel(i18n("Slow"),windowsBox);
minimizeAnimSlowLabel->setAlignment(TQt::AlignTop|TQt::AlignLeft);
@@ -1143,19 +1143,19 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
load();
// Any changes goes to slotChanged()
- connect( moveOpaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( resizeOpaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( geometryTipOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( minimizeAnimOn, TQT_SIGNAL(clicked() ), TQT_SLOT(changed()));
- connect( minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( moveResizeMaximized, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect( resetMaximizedWindowGeometry, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect( placementCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotBrdrSnapChanged(int)));
- connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWndwSnapChanged(int)));
- connect( OverlapSnap, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect( moveOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( resizeOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( geometryTipOn, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( minimizeAnimOn, TQ_SIGNAL(clicked() ), TQ_SLOT(changed()));
+ connect( minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( moveResizeMaximized, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect( resetMaximizedWindowGeometry, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect( placementCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
+ connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotBrdrSnapChanged(int)));
+ connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotWndwSnapChanged(int)));
+ connect( OverlapSnap, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
// To get suffix to BrdrSnap and WndwSnap inputs with default values.
slotBrdrSnapChanged(BrdrSnap->value());
@@ -1382,9 +1382,9 @@ void KMovingConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
emit TDECModule::changed(false);
}
@@ -1436,7 +1436,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
: TDECModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
kompmgr = 0L;
- resetKompmgr_ = FALSE;
+ resetKompmgr_ = false;
TQVBoxLayout *lay = new TQVBoxLayout (this);
kompmgrAvailable_ = kompmgrAvailable();
if (!kompmgrAvailable_){
@@ -1523,7 +1523,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
tabW->addTab(tGroup, i18n("Opacity"));
TQWidget *sGroup = new TQWidget(tabW);
-// sGroup->setCheckable(TRUE);
+// sGroup->setCheckable(true);
TQVBoxLayout *vLay2 = new TQVBoxLayout (sGroup,11,6);
vLay2->addSpacing(11); // to get the proper gb top offset
useShadows = new TQCheckBox(i18n("Use shadows on windows (standard effects should be disabled in the Styles module if this is checked)"),sGroup);
@@ -1640,84 +1640,84 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
lay->addWidget(useTranslucency);
lay->addWidget(tabW);
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), tabW, TQT_SLOT(setEnabled(bool)));
-
- connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), activeWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), movingWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), dockWindowOpacity, TQT_SLOT(setEnabled(bool)));
-
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(onlyDecoTranslucent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), blurBackground, TQT_SLOT(setEnabled(bool)));
- connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), greyscaleBackground, TQT_SLOT(setEnabled(bool)));
- connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
-
- connect(activeWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(inactiveWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(movingWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(dockWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(dockWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(menuWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(activeWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(changed()));
- connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
-
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), tabW, TQ_SLOT(setEnabled(bool)));
+
+ connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), activeWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), movingWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), dockWindowOpacity, TQ_SLOT(setEnabled(bool)));
+
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(onlyDecoTranslucent, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(keepAboveAsActive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), blurBackground, TQ_SLOT(setEnabled(bool)));
+ connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), greyscaleBackground, TQ_SLOT(setEnabled(bool)));
+ connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(removeShadowsOnResize, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(removeShadowsOnMove, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+
+ connect(activeWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(inactiveWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(movingWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(dockWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(dockWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(menuWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(activeWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(changed()));
+ connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
load();
tabW->setEnabled(useTranslucency->isChecked());
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showWarning(bool)));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showWarning(bool)));
// handle kompmgr restarts if necessary
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(resetKompmgr()));
- connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
}
}
@@ -1738,7 +1738,7 @@ void KTranslucencyConfig::processShadowLockouts()
void KTranslucencyConfig::resetKompmgr()
{
- resetKompmgr_ = TRUE;
+ resetKompmgr_ = true;
}
void KTranslucencyConfig::load( void )
@@ -1778,17 +1778,17 @@ void KTranslucencyConfig::load( void )
TDEConfig conf_(TQDir::homeDirPath() + "/.xcompmgrrc");
conf_.setGroup("xcompmgr");
- disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
- useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",FALSE));
- blurBackground->setChecked(conf_.readBoolEntry("blurBackground",FALSE));
+ disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",false));
+ useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",false));
+ blurBackground->setChecked(conf_.readBoolEntry("blurBackground",false));
blurBackground->setEnabled(useOpenGL->isChecked());
- greyscaleBackground->setChecked(conf_.readBoolEntry("greyscaleBackground",FALSE));
+ greyscaleBackground->setChecked(conf_.readBoolEntry("greyscaleBackground",false));
greyscaleBackground->setEnabled(useOpenGL->isChecked());
useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0);
- useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",TRUE));
- useShadowsOnToolTipWindows->setChecked(conf_.readBoolEntry("ShadowsOnToolTipWindows",TRUE));
- useShadowsOnDockWindows->setChecked(conf_.readBoolEntry("ShadowsOnDockWindows",FALSE));
+ useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",true));
+ useShadowsOnToolTipWindows->setChecked(conf_.readBoolEntry("ShadowsOnToolTipWindows",true));
+ useShadowsOnDockWindows->setChecked(conf_.readBoolEntry("ShadowsOnDockWindows",false));
shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",0)));
shadowLeftOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetX",0)));
@@ -1808,10 +1808,10 @@ void KTranslucencyConfig::load( void )
else
shadowColor->setColor(TQColor(r,g,b));
- fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",FALSE));
- fadeInMenuWindows->setChecked(conf_.readBoolEntry("FadeMenuWindows",TRUE));
- fadeInToolTipWindows->setChecked(conf_.readBoolEntry("FadeToolTipWindows",TRUE));
- fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",FALSE));
+ fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",false));
+ fadeInMenuWindows->setChecked(conf_.readBoolEntry("FadeMenuWindows",true));
+ fadeInToolTipWindows->setChecked(conf_.readBoolEntry("FadeToolTipWindows",true));
+ fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",false));
fadeInSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeInStep",0.070)*1000.0));
fadeOutSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeOutStep",0.070)*1000.0));
@@ -1965,9 +1965,9 @@ void KTranslucencyConfig::save( void )
if (standAlone)
{
config->sync();
- if ( !kapp->dcopClient()->isAttached() )
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if ( !tdeApp->dcopClient()->isAttached() )
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
if (useTranslucency->isChecked())
startKompmgr();
@@ -2006,17 +2006,17 @@ void KTranslucencyConfig::defaults()
inactiveWindowOpacity->setEnabled(false);
movingWindowOpacity->setEnabled(false);
dockWindowOpacity->setEnabled(false);
- useShadows->setChecked(FALSE);
- useShadowsOnMenuWindows->setChecked(TRUE);
- useShadowsOnToolTipWindows->setChecked(TRUE);
- useShadowsOnDockWindows->setChecked(FALSE);
- removeShadowsOnMove->setChecked(FALSE);
- removeShadowsOnResize->setChecked(FALSE);
+ useShadows->setChecked(false);
+ useShadowsOnMenuWindows->setChecked(true);
+ useShadowsOnToolTipWindows->setChecked(true);
+ useShadowsOnDockWindows->setChecked(false);
+ removeShadowsOnMove->setChecked(false);
+ removeShadowsOnResize->setChecked(false);
shadowColor->setColor(TQt::black);
- fadeInWindows->setChecked(FALSE);
- fadeInMenuWindows->setChecked(TRUE);
- fadeInToolTipWindows->setChecked(TRUE);
- fadeOnOpacityChange->setChecked(FALSE);
+ fadeInWindows->setChecked(false);
+ fadeInMenuWindows->setChecked(true);
+ fadeInToolTipWindows->setChecked(true);
+ fadeOnOpacityChange->setChecked(false);
fadeInSpeed->setValue(70);
fadeOutSpeed->setValue(70);
emit TDECModule::changed(true);
@@ -2035,12 +2035,12 @@ bool KTranslucencyConfig::kompmgrAvailable()
void KTranslucencyConfig::startKompmgr()
{
- kapp->dcopClient()->send("twin*", "", "startKompmgr()", TQString(""));
+ tdeApp->dcopClient()->send("twin*", "", "startKompmgr()", TQString(""));
}
void KTranslucencyConfig::stopKompmgr()
{
- kapp->dcopClient()->send("twin*", "", "stopKompmgr()", TQString(""));
+ tdeApp->dcopClient()->send("twin*", "", "stopKompmgr()", TQString(""));
}
void KTranslucencyConfig::showWarning(bool alphaActivated)
diff --git a/twin/kcmtwin/twinrules/detectwidget.cpp b/twin/kcmtwin/twinrules/detectwidget.cpp
index 9dbb29441..b01066403 100644
--- a/twin/kcmtwin/twinrules/detectwidget.cpp
+++ b/twin/kcmtwin/twinrules/detectwidget.cpp
@@ -164,7 +164,7 @@ void DetectDialog::selectWindow()
grabber = new TQDialog( NULL, NULL, true, (WFlags)WX11BypassWM );
grabber->move( -1000, -1000 );
grabber->show();
- grabber->grabMouse( tqcrossCursor );
+ grabber->grabMouse( TQt::crossCursor );
grabber->installEventFilter( this );
}
@@ -176,7 +176,7 @@ bool DetectDialog::eventFilter( TQObject* o, TQEvent* e )
return false;
delete grabber;
grabber = NULL;
- if( TQT_TQMOUSEEVENT( e )->button() != TQt::LeftButton )
+ if( static_cast<TQMouseEvent*>( e )->button() != TQt::LeftButton )
{
emit detectionDone( false );
return true;
diff --git a/twin/kcmtwin/twinrules/editshortcutbase.ui b/twin/kcmtwin/twinrules/editshortcutbase.ui
index 793784c42..8a9339c16 100644
--- a/twin/kcmtwin/twinrules/editshortcutbase.ui
+++ b/twin/kcmtwin/twinrules/editshortcutbase.ui
@@ -155,10 +155,10 @@ For example "&lt;b&gt;Shift+Alt+(123) Shift+Ctrl+(ABC)&lt;/b&gt;" will first try
<slot>clearShortcut()</slot>
</connection>
</connections>
-<Q_SLOTS>
+<slots>
<slot access="protected" specifier="pure virtual">editShortcut()</slot>
<slot access="protected" specifier="pure virtual">clearShortcut()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includes>
diff --git a/twin/kcmtwin/twinrules/kcm.cpp b/twin/kcmtwin/twinrules/kcm.cpp
index 2f28bc5dd..7e2cac86c 100644
--- a/twin/kcmtwin/twinrules/kcm.cpp
+++ b/twin/kcmtwin/twinrules/kcm.cpp
@@ -28,7 +28,7 @@
#include "ruleslist.h"
extern "C"
- KDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name )
+ TDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name )
{
//CT there's need for decision: kwm or twin?
TDEGlobal::locale()->insertCatalogue( "kcmtwinrules" );
@@ -44,8 +44,8 @@ KCMRules::KCMRules( TQWidget *parent, const char *name )
{
TQVBoxLayout *layout = new TQVBoxLayout( this );
widget = new KCMRulesList( this );
- layout->addWidget( TQT_TQWIDGET(widget) );
- connect( widget, TQT_SIGNAL( changed( bool )), TQT_SLOT( moduleChanged( bool )));
+ layout->addWidget( widget );
+ connect( widget, TQ_SIGNAL( changed( bool )), TQ_SLOT( moduleChanged( bool )));
TDEAboutData *about = new TDEAboutData(I18N_NOOP( "kcmtwinrules" ),
I18N_NOOP( "Window-Specific Settings Configuration Module" ),
0, 0, TDEAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" ));
@@ -66,9 +66,9 @@ void KCMRules::save()
emit TDECModule::changed( false );
// Send signal to twin
config.sync();
- if( !kapp->dcopClient()->isAttached())
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if( !tdeApp->dcopClient()->isAttached())
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
}
void KCMRules::defaults()
diff --git a/twin/kcmtwin/twinrules/main.cpp b/twin/kcmtwin/twinrules/main.cpp
index 21cb007ec..ef8a30956 100644
--- a/twin/kcmtwin/twinrules/main.cpp
+++ b/twin/kcmtwin/twinrules/main.cpp
@@ -256,9 +256,9 @@ static int edit( Window wid, bool whole_app )
delete orig_rule;
}
saveRules( rules );
- if( !kapp->dcopClient()->isAttached())
- kapp->dcopClient()->attach();
- kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ if( !tdeApp->dcopClient()->isAttached())
+ tdeApp->dcopClient()->attach();
+ tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
return 0;
}
@@ -273,7 +273,7 @@ static const TDECmdLineOptions options[] =
};
extern "C"
-KDE_EXPORT int kdemain( int argc, char* argv[] )
+TDE_EXPORT int kdemain( int argc, char* argv[] )
{
TDELocale::setMainCatalogue( "kcmtwinrules" );
TDECmdLineArgs::init( argc, argv, "twin_rules_dialog", I18N_NOOP( "TWin" ),
diff --git a/twin/kcmtwin/twinrules/ruleslist.cpp b/twin/kcmtwin/twinrules/ruleslist.cpp
index 8961874ae..a9238c178 100644
--- a/twin/kcmtwin/twinrules/ruleslist.cpp
+++ b/twin/kcmtwin/twinrules/ruleslist.cpp
@@ -33,22 +33,22 @@ KCMRulesList::KCMRulesList( TQWidget* parent, const char* name )
: KCMRulesListBase( parent, name )
{
// connect both current/selected, so that current==selected (stupid TQListBox :( )
- connect( rules_listbox, TQT_SIGNAL( currentChanged( TQListBoxItem* )),
- TQT_SLOT( activeChanged( TQListBoxItem*)));
- connect( rules_listbox, TQT_SIGNAL( selectionChanged( TQListBoxItem* )),
- TQT_SLOT( activeChanged( TQListBoxItem*)));
- connect( new_button, TQT_SIGNAL( clicked()),
- TQT_SLOT( newClicked()));
- connect( modify_button, TQT_SIGNAL( clicked()),
- TQT_SLOT( modifyClicked()));
- connect( delete_button, TQT_SIGNAL( clicked()),
- TQT_SLOT( deleteClicked()));
- connect( moveup_button, TQT_SIGNAL( clicked()),
- TQT_SLOT( moveupClicked()));
- connect( movedown_button, TQT_SIGNAL( clicked()),
- TQT_SLOT( movedownClicked()));
- connect( rules_listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ),
- TQT_SLOT( modifyClicked()));
+ connect( rules_listbox, TQ_SIGNAL( currentChanged( TQListBoxItem* )),
+ TQ_SLOT( activeChanged( TQListBoxItem*)));
+ connect( rules_listbox, TQ_SIGNAL( selectionChanged( TQListBoxItem* )),
+ TQ_SLOT( activeChanged( TQListBoxItem*)));
+ connect( new_button, TQ_SIGNAL( clicked()),
+ TQ_SLOT( newClicked()));
+ connect( modify_button, TQ_SIGNAL( clicked()),
+ TQ_SLOT( modifyClicked()));
+ connect( delete_button, TQ_SIGNAL( clicked()),
+ TQ_SLOT( deleteClicked()));
+ connect( moveup_button, TQ_SIGNAL( clicked()),
+ TQ_SLOT( moveupClicked()));
+ connect( movedown_button, TQ_SIGNAL( clicked()),
+ TQ_SLOT( movedownClicked()));
+ connect( rules_listbox, TQ_SIGNAL( doubleClicked ( TQListBoxItem * ) ),
+ TQ_SLOT( modifyClicked()));
load();
}
diff --git a/twin/kcmtwin/twinrules/ruleslistbase.ui b/twin/kcmtwin/twinrules/ruleslistbase.ui
index c3baa9a3d..233290e38 100644
--- a/twin/kcmtwin/twinrules/ruleslistbase.ui
+++ b/twin/kcmtwin/twinrules/ruleslistbase.ui
@@ -29,7 +29,7 @@
<cstring>new_button</cstring>
</property>
<property name="text">
- <string>&amp;New...</string>
+ <string>&amp;New…</string>
</property>
</widget>
<widget class="KPushButton" row="1" column="1">
@@ -37,7 +37,7 @@
<cstring>modify_button</cstring>
</property>
<property name="text">
- <string>&amp;Modify...</string>
+ <string>&amp;Modify…</string>
</property>
</widget>
<widget class="KPushButton" row="2" column="1">
diff --git a/twin/kcmtwin/twinrules/ruleswidget.cpp b/twin/kcmtwin/twinrules/ruleswidget.cpp
index 334001bf7..116ac8b41 100644
--- a/twin/kcmtwin/twinrules/ruleswidget.cpp
+++ b/twin/kcmtwin/twinrules/ruleswidget.cpp
@@ -41,9 +41,9 @@ namespace KWinInternal
{
#define SETUP( var, type ) \
- connect( enable_##var, TQT_SIGNAL( toggled( bool )), rule_##var, TQT_SLOT( setEnabled( bool ))); \
- connect( enable_##var, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( updateEnable##var())); \
- connect( rule_##var, TQT_SIGNAL( activated( int )), this, TQT_SLOT( updateEnable##var())); \
+ connect( enable_##var, TQ_SIGNAL( toggled( bool )), rule_##var, TQ_SLOT( setEnabled( bool ))); \
+ connect( enable_##var, TQ_SIGNAL( toggled( bool )), this, TQ_SLOT( updateEnable##var())); \
+ connect( rule_##var, TQ_SIGNAL( activated( int )), this, TQ_SLOT( updateEnable##var())); \
TQWhatsThis::add( enable_##var, enableDesc ); \
TQWhatsThis::add( rule_##var, type##RuleDesc );
@@ -550,7 +550,7 @@ void RulesWidget::detectClicked()
{
assert( detect_dlg == NULL );
detect_dlg = new DetectDialog;
- connect( detect_dlg, TQT_SIGNAL( detectionDone( bool )), this, TQT_SLOT( detected( bool )));
+ connect( detect_dlg, TQ_SIGNAL( detectionDone( bool )), this, TQ_SLOT( detected( bool )));
detect_dlg->detect( 0 );
}
@@ -702,7 +702,7 @@ Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints )
if( window != 0 )
widget->prepareWindowSpecific( window );
if( show_hints )
- TQTimer::singleShot( 0, this, TQT_SLOT( displayHints()));
+ TQTimer::singleShot( 0, this, TQ_SLOT( displayHints()));
exec();
return rules;
}
diff --git a/twin/kcmtwin/twinrules/ruleswidgetbase.ui b/twin/kcmtwin/twinrules/ruleswidgetbase.ui
index dd175e533..356a99676 100644
--- a/twin/kcmtwin/twinrules/ruleswidgetbase.ui
+++ b/twin/kcmtwin/twinrules/ruleswidgetbase.ui
@@ -1901,7 +1901,7 @@
<cstring>shortcut_edit</cstring>
</property>
<property name="text">
- <string>Edit...</string>
+ <string>Edit…</string>
</property>
</widget>
<widget class="KRestrictedLine" row="9" column="2" rowspan="1" colspan="3">
@@ -2509,7 +2509,7 @@
<tabstop>rule_disableglobalshortcuts</tabstop>
<tabstop>disableglobalshortcuts</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected" specifier="pure virtual">detectClicked()</slot>
<slot access="protected" specifier="pure virtual">wmclassMatchChanged()</slot>
<slot access="protected" specifier="pure virtual">roleMatchChanged()</slot>
@@ -2517,7 +2517,7 @@
<slot access="protected" specifier="pure virtual">extraMatchChanged()</slot>
<slot access="protected" specifier="pure virtual">machineMatchChanged()</slot>
<slot access="protected" specifier="pure virtual">shortcutEditClicked()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includes>
diff --git a/twin/killer/killer.cpp b/twin/killer/killer.cpp
index bf763e7c1..6cbd6baa0 100644
--- a/twin/killer/killer.cpp
+++ b/twin/killer/killer.cpp
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#include <tdecmdlineargs.h>
#include <tdeapplication.h>
#include <tdemessagebox.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <tdelocale.h>
#include <unistd.h>
#include <twin.h>
diff --git a/twin/killwindow.cpp b/twin/killwindow.cpp
index c67ab50a0..8bc1abb57 100644
--- a/twin/killwindow.cpp
+++ b/twin/killwindow.cpp
@@ -81,7 +81,7 @@ void KillWindow::start()
button_released = (ev.xbutton.button == Button1);
if ( ev.xbutton.button == Button3 )
{
- escape_pressed = TRUE;
+ escape_pressed = true;
break;
}
if( ev.xbutton.button == Button1 || ev.xbutton.button == Button2 )
diff --git a/twin/lib/kcommondecoration.cpp b/twin/lib/kcommondecoration.cpp
index e1c74d5bc..a31471611 100644
--- a/twin/lib/kcommondecoration.cpp
+++ b/twin/lib/kcommondecoration.cpp
@@ -122,8 +122,8 @@ void KCommonDecoration::init()
resetLayout();
- connect(this, TQT_SIGNAL(keepAboveChanged(bool) ), TQT_SLOT(keepAboveChange(bool) ) );
- connect(this, TQT_SIGNAL(keepBelowChanged(bool) ), TQT_SLOT(keepBelowChange(bool) ) );
+ connect(this, TQ_SIGNAL(keepAboveChanged(bool) ), TQ_SLOT(keepAboveChange(bool) ) );
+ connect(this, TQ_SIGNAL(keepBelowChanged(bool) ), TQ_SLOT(keepBelowChange(bool) ) );
updateCaption();
}
@@ -203,7 +203,7 @@ void KCommonDecoration::updateLayout() const
if (*it) {
if (!(*it)->isHidden() ) {
moveWidget(x,y, *it);
- x += layoutMetric(LM_ButtonWidth, true, ::tqqt_cast<KCommonDecorationButton*>(*it) );
+ x += layoutMetric(LM_ButtonWidth, true, ::tqt_cast<KCommonDecorationButton*>(*it) );
elementLayouted = true;
}
} else {
@@ -226,7 +226,7 @@ void KCommonDecoration::updateLayout() const
if (*it) {
if (!(*it)->isHidden() ) {
moveWidget(x,y, *it);
- x += layoutMetric(LM_ButtonWidth, true, ::tqqt_cast<KCommonDecorationButton*>(*it) );;
+ x += layoutMetric(LM_ButtonWidth, true, ::tqt_cast<KCommonDecorationButton*>(*it) );;
elementLayouted = true;
}
} else {
@@ -332,9 +332,9 @@ bool KCommonDecoration::isModalSystemNotification()
result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);
if (result == Success && data != None && format == 32 )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString& s, bool isLeft)
@@ -350,8 +350,8 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
if (!btn) break;
btn->setTipText(i18n("Menu") );
btn->setRealizeButtons(TQt::LeftButton|TQt::RightButton);
- connect(btn, TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed()));
- connect(btn, TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
+ connect(btn, TQ_SIGNAL(pressed()), TQ_SLOT(menuButtonPressed()));
+ connect(btn, TQ_SIGNAL(released()), this, TQ_SLOT(menuButtonReleased()));
m_button[MenuButton] = btn;
}
@@ -366,7 +366,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(oad?i18n("Not on all desktops"):i18n("On all desktops") );
btn->setToggleButton(true);
btn->setOn( oad );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(toggleOnAllDesktops()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(toggleOnAllDesktops()));
m_button[OnAllDesktopsButton] = btn;
}
@@ -377,7 +377,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(HelpButton);
if (!btn) break;
btn->setTipText(i18n("Help") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(showContextHelp()));
m_button[HelpButton] = btn;
}
@@ -387,7 +387,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(MinButton);
if (!btn) break;
btn->setTipText(i18n("Minimize") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(minimize()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(minimize()));
m_button[MinButton] = btn;
}
@@ -401,7 +401,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(max?i18n("Restore"):i18n("Maximize") );
btn->setToggleButton(true);
btn->setOn( max );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMaximize()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotMaximize()));
m_button[MaxButton] = btn;
}
@@ -411,7 +411,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(CloseButton);
if (!btn) break;
btn->setTipText(i18n("Close") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(closeWindow()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(closeWindow()));
m_button[CloseButton] = btn;
}
@@ -424,7 +424,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(above?i18n("Do not keep above others"):i18n("Keep above others") );
btn->setToggleButton(true);
btn->setOn( above );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepAbove()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepAbove()));
m_button[AboveButton] = btn;
}
@@ -437,7 +437,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(below?i18n("Do not keep below others"):i18n("Keep below others") );
btn->setToggleButton(true);
btn->setOn( below );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBelow()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepBelow()));
m_button[BelowButton] = btn;
}
@@ -450,7 +450,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(shaded?i18n("Unshade"):i18n("Shade") );
btn->setToggleButton(true);
btn->setOn( shaded );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShade()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotShade()));
m_button[ShadeButton] = btn;
}
@@ -849,19 +849,19 @@ bool KCommonDecoration::eventFilter( TQObject* o, TQEvent* e )
switch( e->type())
{
case TQEvent::Resize:
- resizeEvent(TQT_TQRESIZEEVENT(e) );
+ resizeEvent(static_cast<TQResizeEvent*>(e) );
return true;
case TQEvent::Paint:
- paintEvent(TQT_TQPAINTEVENT( e ));
+ paintEvent(static_cast<TQPaintEvent*>( e ));
return true;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(TQT_TQMOUSEEVENT( e ));
+ mouseDoubleClickEvent(static_cast<TQMouseEvent*>( e ));
return true;
case TQEvent::MouseButtonPress:
- processMousePressEvent(TQT_TQMOUSEEVENT( e ));
+ processMousePressEvent(static_cast<TQMouseEvent*>( e ));
return true;
case TQEvent::Wheel:
- wheelEvent(TQT_TQWHEELEVENT( e ));
+ wheelEvent(static_cast<TQWheelEvent*>( e ));
return true;
default:
return false;
diff --git a/twin/lib/kdecoration.cpp b/twin/lib/kdecoration.cpp
index 622362e9e..b9a8e7a36 100644
--- a/twin/lib/kdecoration.cpp
+++ b/twin/lib/kdecoration.cpp
@@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE.
#include <tqapplication.h>
#include <tdeglobal.h>
#include <assert.h>
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
#include <fixx11h.h>
#endif
diff --git a/twin/lib/kdecoration.h b/twin/lib/kdecoration.h
index 03e1c863e..03daebc28 100644
--- a/twin/lib/kdecoration.h
+++ b/twin/lib/kdecoration.h
@@ -37,7 +37,7 @@ class KDecorationBridge;
class KDecorationPrivate;
class KDecorationFactory;
-#define KWIN_EXPORT KDE_EXPORT
+#define KWIN_EXPORT TDE_EXPORT
/**
* This class provides a namespace for all decoration related classes.
@@ -659,7 +659,7 @@ class KWIN_EXPORT KDecoration
* This function may be reimplemented to provide custom minimize/restore animations
* The reimplementation is allowed to perform X server grabs if necessary
* (only using the functions provided by this API, no direct Xlib calls), but no
- * futher event processing is allowed (i.e. no kapp->processEvents()).
+ * futher event processing is allowed (i.e. no tdeApp->processEvents()).
* @a False should be returned if the default implementation should be used.
* Note that you should not use this function to force disabling of the animation.
*
diff --git a/twin/main.cpp b/twin/main.cpp
index 4fd81d245..c988b53f2 100644
--- a/twin/main.cpp
+++ b/twin/main.cpp
@@ -45,13 +45,13 @@ Atoms* atoms;
int screen_number = -1;
bool disable_twin_composition_manager = false;
-static bool initting = FALSE;
+static bool initting = false;
static
int x11ErrorHandler(Display *d, XErrorEvent *e)
{
char msg[80], req[80], number[80];
- bool ignore_badwindow = TRUE; //maybe temporary
+ bool ignore_badwindow = true; //maybe temporary
if (initting &&
(
@@ -84,10 +84,6 @@ int x11ErrorHandler(Display *d, XErrorEvent *e)
Application::Application( )
: TDEApplication( ), owner( screen_number )
{
-#ifdef USE_QT4
- // I'm special...
- setQuitOnLastWindowClosed(false);
-#endif // USE_QT4
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
if (!config()->isImmutable() && args->isSet("lock"))
{
@@ -150,12 +146,12 @@ Application::Application( )
::exit(1);
}
}
- connect( &owner, TQT_SIGNAL( lostOwnership()), TQT_SLOT( lostSelection()));
+ connect( &owner, TQ_SIGNAL( lostOwnership()), TQ_SLOT( lostSelection()));
// if there was already twin running, it saved its configuration after loosing the selection -> reread
config()->reparseConfiguration();
- initting = TRUE; // startup....
+ initting = true; // startup....
// install X11 error handler
XSetErrorHandler( x11ErrorHandler );
@@ -180,7 +176,7 @@ Application::Application( )
DCOPRef ref( "kded", "kded" );
ref.send( "unloadModule", TQCString( "kdetrayproxy" ));
- initting = FALSE; // startup done, we are up and running now.
+ initting = false; // startup done, we are up and running now.
dcopClient()->send( "ksplash", "", "upAndRunning(TQString)", TQString("wm started"));
XEvent e;
@@ -198,7 +194,7 @@ Application::~Application()
delete Workspace::self();
if( owner.ownerWindow() != None ) // if there was no --replace (no new WM)
{
- XSetInputFocus( tqt_xdisplay(), PointerRoot, RevertToPointerRoot, GET_QT_X_TIME() );
+ XSetInputFocus( tqt_xdisplay(), PointerRoot, RevertToPointerRoot, get_tqt_x_time() );
DCOPRef ref( "kded", "kded" );
if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
@@ -220,7 +216,7 @@ void Application::lostSelection()
bool Application::x11EventFilter( XEvent *e )
{
if ( Workspace::self()->workspaceEvent( e ) )
- return TRUE;
+ return true;
return TDEApplication::x11EventFilter( e );
}
@@ -244,7 +240,7 @@ static TDECmdLineOptions args[] =
};
extern "C"
-KDE_EXPORT int kdemain( int argc, char * argv[] )
+TDE_EXPORT int kdemain( int argc, char * argv[] )
{
bool restored = false;
for (int arg = 1; arg < argc; arg++)
@@ -346,6 +342,8 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
else
appname.sprintf("twin-screen-%d", KWinInternal::screen_number);
+ TDEGlobal::locale()->insertCatalogue("twin_lib");
+
DCOPClient* client = a.dcopClient();
client->registerAs( appname.data(), false);
client->setDefaultObject( "KWinInterface" );
diff --git a/twin/manage.cpp b/twin/manage.cpp
index ec6a5d675..394d7fc20 100644
--- a/twin/manage.cpp
+++ b/twin/manage.cpp
@@ -190,7 +190,7 @@ bool Client::manage( Window w, bool isMapped )
// onAllDesktopsChange(); decoration doesn't exist here yet
TQRect geom( attr.x, attr.y, attr.width, attr.height );
- bool placementDone = FALSE;
+ bool placementDone = false;
if ( session )
geom = session->geometry;
@@ -269,7 +269,7 @@ bool Client::manage( Window w, bool isMapped )
if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) ||
(xSizeHint.flags & USPosition) )
{
- placementDone = TRUE;
+ placementDone = true;
// disobey xinerama placement option for now (#70943)
area = workspace()->clientArea( PlacementArea, geom.center(), desktop());
}
@@ -290,7 +290,7 @@ bool Client::manage( Window w, bool isMapped )
if( isMovable())
{
if( geom.x() > area.right() || geom.y() > area.bottom())
- placementDone = FALSE; // weird, do not trust.
+ placementDone = false; // weird, do not trust.
}
if ( placementDone )
@@ -312,7 +312,7 @@ bool Client::manage( Window w, bool isMapped )
if( !placementDone )
{ // placement needs to be after setting size
workspace()->place( this, area );
- placementDone = TRUE;
+ placementDone = true;
}
if(( !isSpecialWindow() || isToolbar()) && isMovable())
@@ -358,7 +358,7 @@ bool Client::manage( Window w, bool isMapped )
// probably should be replaced by something better
bool doNotShow = false;
if ( workspace()->isNotManaged( caption() ) )
- doNotShow = TRUE;
+ doNotShow = true;
// other settings from the previous session
if ( session )
@@ -520,9 +520,9 @@ bool Client::manage( Window w, bool isMapped )
if( user_time == CurrentTime || user_time == -1U ) // no known user time, set something old
{
- user_time = GET_QT_X_TIME() - 1000000;
+ user_time = get_tqt_x_time() - 1000000;
if( user_time == CurrentTime || user_time == -1U ) // let's be paranoid
- user_time = GET_QT_X_TIME() - 1000000 + 10;
+ user_time = get_tqt_x_time() - 1000000 + 10;
}
updateWorkareaDiffs();
@@ -577,9 +577,9 @@ void Client::embedClient( Window w, const XWindowAttributes &attr )
attr.depth, InputOutput, attr.visual,
CWColormap | CWBackPixmap | CWBorderPixel, &swa );
- XDefineCursor( tqt_xdisplay(), frame, tqarrowCursor.handle());
+ XDefineCursor( tqt_xdisplay(), frame, TQt::arrowCursor.handle());
// some apps are stupid and don't define their own cursor - set the arrow one for them
- XDefineCursor( tqt_xdisplay(), wrapper, tqarrowCursor.handle());
+ XDefineCursor( tqt_xdisplay(), wrapper, TQt::arrowCursor.handle());
XReparentWindow( tqt_xdisplay(), client, wrapper, 0, 0 );
XSelectInput( tqt_xdisplay(), frame,
KeyPressMask | KeyReleaseMask |
diff --git a/twin/notifications.cpp b/twin/notifications.cpp
index 5a83e9bce..43ae37cdf 100644
--- a/twin/notifications.cpp
+++ b/twin/notifications.cpp
@@ -92,7 +92,7 @@ TQString Notify::eventToName( Event e )
return event;
}
-static bool forgetIt = FALSE;
+static bool forgetIt = false;
TQValueList< Notify::EventData > Notify::pending_events;
bool Notify::raise( Event e, const TQString& message, Client* c )
diff --git a/twin/options.cpp b/twin/options.cpp
index 46c557b4a..c9411f6de 100644
--- a/twin/options.cpp
+++ b/twin/options.cpp
@@ -77,7 +77,7 @@ unsigned long Options::updateSettings()
separateScreenFocus = config->readBoolEntry( "SeparateScreenFocus", false );
activeMouseScreen = config->readBoolEntry( "ActiveMouseScreen", focusPolicy != ClickToFocus );
- rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE);
+ rollOverDesktops = config->readBoolEntry("RollOverDesktops", true);
// focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 );
// TODO use low level for now
@@ -99,8 +99,8 @@ unsigned long Options::updateSettings()
xineramaPlacementScreen = KCLAMP( config->readNumEntry( "XineramaPlacementScreen", -1 ),
-1, tqApp->desktop()->numScreens() - 1 );
- animateShade = config->readBoolEntry("AnimateShade", TRUE );
- animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE );
+ animateShade = config->readBoolEntry("AnimateShade", true );
+ animateMinimize = config->readBoolEntry("AnimateMinimize", true );
animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 );
if( focusPolicy == ClickToFocus )
@@ -112,21 +112,21 @@ unsigned long Options::updateSettings()
}
else
{
- autoRaise = config->readBoolEntry("AutoRaise", FALSE );
+ autoRaise = config->readBoolEntry("AutoRaise", false );
autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 );
- delayFocus = config->readBoolEntry("DelayFocus", FALSE );
+ delayFocus = config->readBoolEntry("DelayFocus", false );
delayFocusInterval = config->readNumEntry("DelayFocusInterval", 0 );
}
- shadeHover = config->readBoolEntry("ShadeHover", FALSE );
+ shadeHover = config->readBoolEntry("ShadeHover", false );
shadeHoverInterval = config->readNumEntry("ShadeHoverInterval", 250 );
// important: autoRaise implies ClickRaise
- clickRaise = autoRaise || config->readBoolEntry("ClickRaise", TRUE );
+ clickRaise = autoRaise || config->readBoolEntry("ClickRaise", true );
borderSnapZone = config->readNumEntry("BorderSnapZone", 10);
windowSnapZone = config->readNumEntry("WindowSnapZone", 10);
- snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",FALSE);
+ snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",false);
// active borders: compatibility with old option names (Electric*)
active_borders = config->readNumEntry("ActiveBorders", -1);
@@ -205,7 +205,7 @@ unsigned long Options::updateSettings()
onlyDecoTranslucent = config->readBoolEntry("OnlyDecoTranslucent",false);
resetKompmgr = config->readBoolEntry("ResetKompmgr", false);
if (resetKompmgr)
- config->writeEntry("ResetKompmgr",FALSE);
+ config->writeEntry("ResetKompmgr",false);
// window drop shadows
config->setGroup("Style");
diff --git a/twin/pics/CMakeLists.txt b/twin/pics/CMakeLists.txt
deleted file mode 100644
index e9068f5d9..000000000
--- a/twin/pics/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-#################################################
-#
-# (C) 2010-2011 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-install( FILES
- close.png maximize.png maximizedown.png menu.png
- iconify.png pindown.png pinup.png unknown.png fog.png
- fog-grey.png bluesun.png greenie.light.png greenie.dim.png
- DESTINATION ${DATA_INSTALL_DIR}/twin/pics )
diff --git a/twin/pics/tile_bottom.png b/twin/pics/tile_bottom.png
new file mode 100644
index 000000000..de6a89093
--- /dev/null
+++ b/twin/pics/tile_bottom.png
Binary files differ
diff --git a/twin/pics/tile_bottomleft.png b/twin/pics/tile_bottomleft.png
new file mode 100644
index 000000000..30ae6d94d
--- /dev/null
+++ b/twin/pics/tile_bottomleft.png
Binary files differ
diff --git a/twin/pics/tile_bottomright.png b/twin/pics/tile_bottomright.png
new file mode 100644
index 000000000..34ef23211
--- /dev/null
+++ b/twin/pics/tile_bottomright.png
Binary files differ
diff --git a/twin/pics/tile_left.png b/twin/pics/tile_left.png
new file mode 100644
index 000000000..14a77d1a6
--- /dev/null
+++ b/twin/pics/tile_left.png
Binary files differ
diff --git a/twin/pics/tile_right.png b/twin/pics/tile_right.png
new file mode 100644
index 000000000..c04d5fc1b
--- /dev/null
+++ b/twin/pics/tile_right.png
Binary files differ
diff --git a/twin/pics/tile_top.png b/twin/pics/tile_top.png
new file mode 100644
index 000000000..ca1e277e8
--- /dev/null
+++ b/twin/pics/tile_top.png
Binary files differ
diff --git a/twin/pics/tile_topleft.png b/twin/pics/tile_topleft.png
new file mode 100644
index 000000000..1e0cd5b9e
--- /dev/null
+++ b/twin/pics/tile_topleft.png
Binary files differ
diff --git a/twin/pics/tile_topright.png b/twin/pics/tile_topright.png
new file mode 100644
index 000000000..c0316cfa2
--- /dev/null
+++ b/twin/pics/tile_topright.png
Binary files differ
diff --git a/twin/plugins.cpp b/twin/plugins.cpp
index bb995de22..6df451dc3 100644
--- a/twin/plugins.cpp
+++ b/twin/plugins.cpp
@@ -30,7 +30,7 @@ PluginMgr::PluginMgr()
void PluginMgr::error( const TQString &error_msg )
{
tqWarning( "%s", (i18n("TWin: ") + error_msg +
- i18n("\nTWin will now exit...")).local8Bit().data() );
+ i18n("\nTWin will now exit…")).local8Bit().data() );
exit(1);
}
diff --git a/twin/popupinfo.cpp b/twin/popupinfo.cpp
index 79386a5a8..324b8a782 100644
--- a/twin/popupinfo.cpp
+++ b/twin/popupinfo.cpp
@@ -39,10 +39,10 @@ PopupInfo::PopupInfo( Workspace* ws, const char *name )
m_shown = false;
reset();
reconfigure();
- connect(&m_delayedHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hide()));
+ connect(&m_delayedHideTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(hide()));
TQFont f = font();
- f.setBold( TRUE );
+ f.setBold( true );
f.setPointSize( 14 );
setFont( f );
@@ -74,7 +74,7 @@ void PopupInfo::reset()
void PopupInfo::paintEvent( TQPaintEvent* )
{
TQPainter p( this );
- style().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ),
+ style().drawPrimitive( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ),
colorGroup(), TQStyle::Style_Default );
paintContents();
}
diff --git a/twin/resumer/resumer.cpp b/twin/resumer/resumer.cpp
index 3c915b8c8..91db4e341 100644
--- a/twin/resumer/resumer.cpp
+++ b/twin/resumer/resumer.cpp
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#include <tdecmdlineargs.h>
#include <tdeapplication.h>
#include <tdemessagebox.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <tdelocale.h>
#include <unistd.h>
#include <twin.h>
diff --git a/twin/rules.cpp b/twin/rules.cpp
index 63fc0e37b..aa4b7904a 100644
--- a/twin/rules.cpp
+++ b/twin/rules.cpp
@@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <tdeconfig.h>
#include <tqregexp.h>
#include <tdetempfile.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tqfile.h>
#ifndef KCMRULES
@@ -75,7 +75,7 @@ Rules::Rules( const TQString& str, bool temporary )
f->writeBlock( s.data(), s.length());
}
file.close();
- KSimpleConfig cfg( file.name());
+ TDESimpleConfig cfg( file.name());
readFromCfg( cfg );
if( description.isEmpty())
description = "temporary";
@@ -1008,7 +1008,7 @@ void Workspace::gotTemporaryRulesMessage( const TQString& message )
Rules* rule = new Rules( message, true );
rules.prepend( rule ); // highest priority first
if( !was_temporary )
- TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules()));
+ TQTimer::singleShot( 60000, this, TQ_SLOT( cleanupTemporaryRules()));
}
void Workspace::cleanupTemporaryRules()
@@ -1028,7 +1028,7 @@ void Workspace::cleanupTemporaryRules()
}
}
if( has_temporary )
- TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules()));
+ TQTimer::singleShot( 60000, this, TQ_SLOT( cleanupTemporaryRules()));
}
void Workspace::discardUsedWindowRules( Client* c, bool withdrawn )
diff --git a/twin/sm.cpp b/twin/sm.cpp
index 53d2a5f29..5ef97f62d 100644
--- a/twin/sm.cpp
+++ b/twin/sm.cpp
@@ -42,13 +42,13 @@ bool SessionManaged::saveState( TQSessionManager& sm )
{
Workspace::self()->sessionSaveStarted();
if( ksmserver ) // save stacking order etc. before "save file?" etc. dialogs change it
- Workspace::self()->storeSession( kapp->sessionConfig(), SMSavePhase0 );
+ Workspace::self()->storeSession( tdeApp->sessionConfig(), SMSavePhase0 );
sm.release(); // Qt doesn't automatically release in this case (bug?)
sm.requestPhase2();
return true;
}
- Workspace::self()->storeSession( kapp->sessionConfig(), ksmserver ? SMSavePhase2 : SMSavePhase2Full );
- kapp->sessionConfig()->sync();
+ Workspace::self()->storeSession( tdeApp->sessionConfig(), ksmserver ? SMSavePhase2 : SMSavePhase2Full );
+ tdeApp->sessionConfig()->sync();
return true;
}
@@ -94,7 +94,7 @@ void Workspace::storeSession( TDEConfig* config, SMSavePhase phase )
config->writeEntry( TQString("wmClientMachine")+n, c->wmClientMachine( true ).data() );
config->writeEntry( TQString("resourceName")+n, c->resourceName().data() );
config->writeEntry( TQString("resourceClass")+n, c->resourceClass().data() );
- config->writeEntry( TQString("geometry")+n, TQRect( c->calculateGravitation(TRUE), c->clientSize() ) ); // FRAME
+ config->writeEntry( TQString("geometry")+n, TQRect( c->calculateGravitation(true), c->clientSize() ) ); // FRAME
config->writeEntry( TQString("restore")+n, c->geometryRestore() );
config->writeEntry( TQString("fsrestore")+n, c->geometryFSRestore() );
config->writeEntry( TQString("maximize")+n, (int) c->maximizeMode() );
@@ -149,7 +149,7 @@ void Workspace::storeSession( TDEConfig* config, SMSavePhase phase )
void Workspace::loadSessionInfo()
{
session.clear();
- TDEConfig* config = kapp->sessionConfig();
+ TDEConfig* config = tdeApp->sessionConfig();
config->setGroup("Session" );
int count = config->readNumEntry( "count" );
int active_client = config->readNumEntry( "active" );
@@ -170,15 +170,15 @@ void Workspace::loadSessionInfo()
info->maximized = config->readNumEntry( TQString("maximize")+n, 0 );
info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 );
info->desktop = config->readNumEntry( TQString("desktop")+n, 0 );
- info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE );
- info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE );
- info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE );
- info->shadowed = config->readBoolEntry( TQString("shadowed")+n, TRUE );
- info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE );
- info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE );
- info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE );
- info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE );
- info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE );
+ info->minimized = config->readBoolEntry( TQString("iconified")+n, false );
+ info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, false );
+ info->shaded = config->readBoolEntry( TQString("shaded")+n, false );
+ info->shadowed = config->readBoolEntry( TQString("shadowed")+n, true );
+ info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, false );
+ info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, false );
+ info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, false );
+ info->skipPager = config->readBoolEntry( TQString("skipPager")+n, false );
+ info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, false );
info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1());
info->shortcut = config->readEntry( TQString("shortcut")+n );
info->active = ( active_client == i );
@@ -416,8 +416,8 @@ SessionSaveDoneHelper::SessionSaveDoneHelper()
SmProp* p[ 5 ] = { &props[ 0 ], &props[ 1 ], &props[ 2 ], &props[ 3 ], &props[ 4 ] };
SmcSetProperties( conn, 5, p );
notifier = new TQSocketNotifier( IceConnectionNumber( SmcGetIceConnection( conn )),
- TQSocketNotifier::Read, TQT_TQOBJECT(this) );
- connect( notifier, TQT_SIGNAL( activated( int )), TQT_SLOT( processData()));
+ TQSocketNotifier::Read, this );
+ connect( notifier, TQ_SIGNAL( activated( int )), TQ_SLOT( processData()));
}
SessionSaveDoneHelper::~SessionSaveDoneHelper()
diff --git a/twin/sm.h b/twin/sm.h
index c1542e721..951db4e32 100644
--- a/twin/sm.h
+++ b/twin/sm.h
@@ -59,7 +59,7 @@ enum SMSavePhase
};
class SessionSaveDoneHelper
- : public QObject
+ : public TQObject
{
TQ_OBJECT
public:
diff --git a/twin/tabbox.cpp b/twin/tabbox.cpp
index 1cf0fb8c2..f638d755e 100644
--- a/twin/tabbox.cpp
+++ b/twin/tabbox.cpp
@@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kstringhandler.h>
#include <stdarg.h>
#include <kdebug.h>
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
#include <kkeynative.h>
#include <tdeglobalsettings.h>
#include <kiconeffect.h>
@@ -53,7 +53,7 @@ TabBox::TabBox( Workspace *ws, const char *name )
m = DesktopMode; // init variables
reconfigure();
reset();
- connect(&delayedShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(show()));
+ connect(&delayedShowTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(show()));
XSetWindowAttributes attr;
attr.override_redirect = 1;
@@ -203,7 +203,7 @@ void TabBox::reset()
if ( clients.count() == 0 ) // height for the "not tasks" text
{
TQFont f = font();
- f.setBold( TRUE );
+ f.setBold( true );
f.setPointSize( 14 );
h = TQFontMetrics(f).height()*4;
@@ -401,7 +401,7 @@ void TabBox::drawContents( TQPainter * )
if ( !currentClient() )
{
TQFont f = font();
- f.setBold( TRUE );
+ f.setBold( true );
f.setPointSize( 14 );
p.setFont(f);
@@ -708,7 +708,7 @@ void TabBox::delayedShow()
void TabBox::handleMouseEvent( XEvent* e )
{
- XAllowEvents( tqt_xdisplay(), AsyncPointer, GET_QT_X_TIME() );
+ XAllowEvents( tqt_xdisplay(), AsyncPointer, get_tqt_x_time() );
if( e->type != ButtonPress )
return;
TQPoint pos( e->xbutton.x_root, e->xbutton.y_root );
@@ -866,7 +866,7 @@ void Workspace::slotWalkThroughWindows()
return;
if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable())
{
- //XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); // need that because of accelerator raw mode
+ //XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time()); // need that because of accelerator raw mode
// CDE style raise / lower
CDEWalkThroughWindows( true );
}
@@ -993,26 +993,26 @@ bool Workspace::startKDEWalkThroughWindows()
{
if( !establishTabBoxGrab())
return false;
- tab_grab = TRUE;
+ tab_grab = true;
keys->suspend( true );
disable_shortcuts_keys->suspend( true );
client_keys->suspend( true );
tab_box->setMode( TabBox::WindowsMode );
tab_box->reset();
- return TRUE;
+ return true;
}
bool Workspace::startWalkThroughDesktops( int mode )
{
if( !establishTabBoxGrab())
return false;
- control_grab = TRUE;
+ control_grab = true;
keys->suspend( true );
disable_shortcuts_keys->suspend( true );
client_keys->suspend( true );
tab_box->setMode( (TabBox::Mode) mode );
tab_box->reset();
- return TRUE;
+ return true;
}
bool Workspace::startWalkThroughDesktops()
@@ -1195,8 +1195,8 @@ void Workspace::closeTabBox()
keys->suspend( false );
disable_shortcuts_keys->suspend( false );
client_keys->suspend( false );
- tab_grab = FALSE;
- control_grab = FALSE;
+ tab_grab = false;
+ control_grab = false;
}
/*!
@@ -1360,7 +1360,7 @@ Client* Workspace::previousStaticClient( Client* c ) const
bool Workspace::establishTabBoxGrab()
{
if( XGrabKeyboard( tqt_xdisplay(), root, FALSE,
- GrabModeAsync, GrabModeAsync, GET_QT_X_TIME()) != GrabSuccess )
+ GrabModeAsync, GrabModeAsync, get_tqt_x_time()) != GrabSuccess )
return false;
// Don't try to establish a global mouse grab using XGrabPointer, as that would prevent
// using Alt+Tab while DND (#44972). However force passive grabs on all windows
@@ -1376,7 +1376,7 @@ bool Workspace::establishTabBoxGrab()
void Workspace::removeTabBoxGrab()
{
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
assert( forced_global_mouse_grab );
forced_global_mouse_grab = false;
if( active_client != NULL )
diff --git a/twin/tabbox.h b/twin/tabbox.h
index 3fd419ad7..0f07b019c 100644
--- a/twin/tabbox.h
+++ b/twin/tabbox.h
@@ -46,7 +46,7 @@ class TabBox : public TQFrame
bool isAppsOnly() const;
void reset();
- void nextPrev( bool next = TRUE);
+ void nextPrev( bool next = true);
void delayedShow();
void hide();
diff --git a/twin/tools/decobenchmark/main.cpp b/twin/tools/decobenchmark/main.cpp
index c4efddace..d4930ee84 100644
--- a/twin/tools/decobenchmark/main.cpp
+++ b/twin/tools/decobenchmark/main.cpp
@@ -130,7 +130,7 @@ int main(int argc, char** argv)
DecoBenchApplication app(library, test, count);
- TQTimer::singleShot(0, &app, TQT_SLOT(executeTest()));
+ TQTimer::singleShot(0, &app, TQ_SLOT(executeTest()));
app.exec();
}
#include "main.moc"
diff --git a/twin/tools/decobenchmark/preview.cpp b/twin/tools/decobenchmark/preview.cpp
index 6034a613e..33ee8fd3e 100644
--- a/twin/tools/decobenchmark/preview.cpp
+++ b/twin/tools/decobenchmark/preview.cpp
@@ -67,7 +67,7 @@ void KDecorationPreview::performRepaintTest(int n)
positionPreviews(0);
for (int i = 0; i < n; ++i) {
deco->widget()->repaint();
- kapp->processEvents();
+ tdeApp->processEvents();
}
}
@@ -80,7 +80,7 @@ void KDecorationPreview::performCaptionTest(int n)
bridge->setCaption(caption.arg(i) );
deco->captionChange();
deco->widget()->repaint();
- kapp->processEvents();
+ tdeApp->processEvents();
}
}
@@ -91,7 +91,7 @@ void KDecorationPreview::performResizeTest(int n)
deco->captionChange();
for (int i = 0; i < n; ++i) {
positionPreviews(i % 200);
- kapp->processEvents();
+ tdeApp->processEvents();
}
}
@@ -103,7 +103,7 @@ void KDecorationPreview::performRecreationTest(int n)
positionPreviews(0);
for (int i = 0; i < n; ++i) {
recreateDecoration();
- kapp->processEvents();
+ tdeApp->processEvents();
}
}
@@ -188,7 +188,7 @@ TQWidget* KDecorationPreviewBridge::initialParentWidget() const
return preview;
}
-Qt::WFlags KDecorationPreviewBridge::initialWFlags() const
+TQt::WFlags KDecorationPreviewBridge::initialWFlags() const
{
return 0;
}
diff --git a/twin/tools/decobenchmark/preview.h b/twin/tools/decobenchmark/preview.h
index d69a2f57f..38cd08b19 100644
--- a/twin/tools/decobenchmark/preview.h
+++ b/twin/tools/decobenchmark/preview.h
@@ -30,7 +30,7 @@ class KDecorationPreviewBridge;
class KDecorationPreviewOptions;
class KDecorationPreview
- : public QWidget
+ : public TQWidget
{
public:
KDecorationPreview( KDecorationPlugins* plugin, TQWidget* parent = NULL, const char* name = NULL );
diff --git a/twin/twinbindings.cpp b/twin/twinbindings.cpp
index 08d6bf0d1..7e918f49f 100644
--- a/twin/twinbindings.cpp
+++ b/twin/twinbindings.cpp
@@ -1,8 +1,8 @@
#ifndef NOSLOTS
# define DEF2( name, descr, key3, key4, fnSlot ) \
- keys->insert( name, i18n(descr), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
+ keys->insert( name, i18n(descr), TQString::null, key3, key4, this, TQ_SLOT(fnSlot) )
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
+ keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQ_SLOT(fnSlot) )
#else
# define DEF2( name, descr, key3, key4, fnSlot ) \
keys->insert( name, i18n(descr), TQString::null, key3, key4 )
diff --git a/twin/useractions.cpp b/twin/useractions.cpp
index 205ecfbc4..fe60c4d04 100644
--- a/twin/useractions.cpp
+++ b/twin/useractions.cpp
@@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kiconloader.h>
#include <tdelocale.h>
#include <tdeconfig.h>
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
#include <tdeapplication.h>
#include <tqregexp.h>
@@ -44,20 +44,47 @@ namespace KWinInternal
// Workspace
//****************************************
+TQPopupMenu* Workspace::makeTileMenu()
+{
+ TQPopupMenu *m = new TQPopupMenu;
+
+ // Tile to side (the menu id matched the ActiveBorder index used for tiling)
+ int id = m->insertItem( SmallIconSet("tile_left"), i18n("&Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 6 );
+ id = m->insertItem( SmallIconSet("tile_right"), i18n("&Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 2 );
+ id = m->insertItem( SmallIconSet("tile_top"), i18n("&Top"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 0 );
+ id = m->insertItem( SmallIconSet("tile_bottom"), i18n("&Bottom"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 4 );
+
+ // Tile to corner (the menu id matched the ActiveBorder index used for tiling)
+ id = m->insertItem( SmallIconSet("tile_topleft"), i18n("Top &Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 7 );
+ id = m->insertItem( SmallIconSet("tile_topright"), i18n("Top &Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 1 );
+ id = m->insertItem( SmallIconSet("tile_bottomleft"), i18n("Bottom L&eft"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 5 );
+ id = m->insertItem( SmallIconSet("tile_bottomright"), i18n("&Bottom R&ight"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) );
+ m->setItemParameter( id, 3 );
+
+ return m;
+}
+
TQPopupMenu* Workspace::clientPopup()
{
if ( !popup )
{
popup = new TQPopupMenu;
- popup->setCheckable( TRUE );
+ popup->setCheckable( true );
popup->setFont(TDEGlobalSettings::menuFont());
- connect( popup, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( clientPopupAboutToShow() ) );
- connect( popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) );
+ connect( popup, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( clientPopupAboutToShow() ) );
+ connect( popup, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( clientPopupActivated(int) ) );
advanced_popup = new TQPopupMenu( popup );
- advanced_popup->setCheckable( TRUE );
+ advanced_popup->setCheckable( true );
advanced_popup->setFont(TDEGlobalSettings::menuFont());
- connect( advanced_popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) );
+ connect( advanced_popup, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( clientPopupActivated(int) ) );
advanced_popup->insertItem( SmallIconSet( "go-up" ),
i18n("Keep &Above Others")+'\t'+keys->shortcut("Window Above Other Windows").seq(0).toString(), Options::KeepAboveOp );
advanced_popup->insertItem( SmallIconSet( "go-down" ),
@@ -67,15 +94,16 @@ TQPopupMenu* Workspace::clientPopup()
advanced_popup->insertItem( i18n("&No Border")+'\t'+keys->shortcut("Window No Border").seq(0).toString(), Options::NoBorderOp );
advanced_popup->insertItem( i18n("Shad&ow"), Options::ShadowOp );
advanced_popup->insertItem( SmallIconSet("key_bindings"),
- i18n("Window &Shortcut...")+'\t'+keys->shortcut("Setup Window Shortcut").seq(0).toString(), Options::SetupWindowShortcutOp );
+ i18n("Window &Shortcut…")+'\t'+keys->shortcut("Setup Window Shortcut").seq(0).toString(), Options::SetupWindowShortcutOp );
advanced_popup->insertSeparator();
advanced_popup->insertItem( SmallIconSet( "suspend" ), i18n("&Suspend Application"), Options::SuspendWindowOp );
advanced_popup->insertItem( SmallIconSet( "application-x-executable" ), i18n("&Resume Application"), Options::ResumeWindowOp );
advanced_popup->insertSeparator();
- advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Window Settings..."), Options::WindowRulesOp );
- advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Application Settings..."), Options::ApplicationRulesOp );
+ advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Window Settings…"), Options::WindowRulesOp );
+ advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Application Settings…"), Options::ApplicationRulesOp );
popup->insertItem(i18n("Ad&vanced"), advanced_popup );
+ tile_popup_index = popup->insertItem(i18n("T&ile"), makeTileMenu());
desk_popup_index = popup->count();
if (options->useTranslucency){
@@ -85,11 +113,11 @@ TQPopupMenu* Workspace::clientPopup()
TQToolTip::add(transButton, i18n("Reset opacity to default value"));
transSlider = new TQSlider(0, 100, 1, 100, TQt::Horizontal, transBox, "transSlider");
TQToolTip::add(transSlider, i18n("Slide this to set the window's opacity"));
- connect(transButton, TQT_SIGNAL(clicked()), TQT_SLOT(resetClientOpacity()));
- connect(transButton, TQT_SIGNAL(clicked()), trans_popup, TQT_SLOT(hide()));
- connect(transSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setTransButtonText(int)));
- connect(transSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setPopupClientOpacity(int)));
-// connect(transSlider, TQT_SIGNAL(sliderReleased()), trans_popup, TQT_SLOT(hide()));
+ connect(transButton, TQ_SIGNAL(clicked()), TQ_SLOT(resetClientOpacity()));
+ connect(transButton, TQ_SIGNAL(clicked()), trans_popup, TQ_SLOT(hide()));
+ connect(transSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(setTransButtonText(int)));
+ connect(transSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setPopupClientOpacity(int)));
+// connect(transSlider, TQ_SIGNAL(sliderReleased()), trans_popup, TQ_SLOT(hide()));
trans_popup->insertItem(transBox);
popup->insertItem(i18n("&Opacity"), trans_popup );
}
@@ -103,9 +131,9 @@ TQPopupMenu* Workspace::clientPopup()
popup->insertSeparator();
if (!TDEGlobal::config()->isImmutable() &&
- !kapp->authorizeControlModules(Workspace::configModules(true)).isEmpty())
+ !tdeApp->authorizeControlModules(Workspace::configModules(true)).isEmpty())
{
- popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior..."), this, TQT_SLOT( configureWM() ));
+ popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior…"), this, TQ_SLOT( configureWM() ));
popup->insertSeparator();
}
@@ -179,10 +207,11 @@ void Workspace::clientPopupAboutToShow()
advanced_popup->setItemEnabled( Options::ResumeWindowOp, active_popup_client->isResumeable() );
advanced_popup->setItemChecked( Options::NoBorderOp, active_popup_client->noBorder() );
advanced_popup->setItemEnabled( Options::NoBorderOp, active_popup_client->userCanSetNoBorder() );
-
advanced_popup->setItemEnabled( Options::ShadowOp, (options->shadowWindowType(active_popup_client->windowType()) && options->shadowEnabled(active_popup_client->isActive())) );
advanced_popup->setItemChecked( Options::ShadowOp, active_popup_client->isShadowed() );
+ popup->setItemEnabled( tile_popup_index, active_popup_client->isMovable() && active_popup_client->isResizable());
+
popup->setItemEnabled( Options::MinimizeOp, active_popup_client->isMinimizable() );
popup->setItemEnabled( Options::CloseOp, active_popup_client->isCloseable() );
if (options->useTranslucency)
@@ -199,12 +228,12 @@ void Workspace::initDesktopPopup()
return;
desk_popup = new TQPopupMenu( popup );
- desk_popup->setCheckable( TRUE );
+ desk_popup->setCheckable( true );
desk_popup->setFont(TDEGlobalSettings::menuFont());
- connect( desk_popup, TQT_SIGNAL( activated(int) ),
- this, TQT_SLOT( slotSendToDesktop(int) ) );
- connect( desk_popup, TQT_SIGNAL( aboutToShow() ),
- this, TQT_SLOT( desktopPopupAboutToShow() ) );
+ connect( desk_popup, TQ_SIGNAL( activated(int) ),
+ this, TQ_SLOT( slotSendToDesktop(int) ) );
+ connect( desk_popup, TQ_SIGNAL( aboutToShow() ),
+ this, TQ_SLOT( desktopPopupAboutToShow() ) );
popup->insertItem(i18n("To &Desktop"), desk_popup, -1, desk_popup_index );
}
@@ -221,7 +250,7 @@ void Workspace::desktopPopupAboutToShow()
desk_popup->clear();
desk_popup->insertItem( i18n("&All Desktops"), 0 );
if ( active_popup_client && active_popup_client->isOnAllDesktops() )
- desk_popup->setItemChecked( 0, TRUE );
+ desk_popup->setItemChecked( 0, true );
desk_popup->insertSeparator( -1 );
int id;
const int BASE = 10;
@@ -239,7 +268,7 @@ void Workspace::desktopPopupAboutToShow()
i );
if ( active_popup_client &&
!active_popup_client->isOnAllDesktops() && active_popup_client->desktop() == i )
- desk_popup->setItemChecked( id, TRUE );
+ desk_popup->setItemChecked( id, true );
}
}
@@ -299,7 +328,7 @@ void Workspace::setupWindowShortcut( Client* c )
client_keys->suspend( true );
client_keys_dialog = new ShortcutDialog( c->shortcut());
client_keys_client = c;
- connect( client_keys_dialog, TQT_SIGNAL( dialogDone( bool )), TQT_SLOT( setupWindowShortcutDone( bool )));
+ connect( client_keys_dialog, TQ_SIGNAL( dialogDone( bool )), TQ_SLOT( setupWindowShortcutDone( bool )));
TQRect r = clientArea( ScreenArea, c );
TQSize size = client_keys_dialog->sizeHint();
TQPoint pos = c->pos() + c->clientPos();
@@ -336,7 +365,7 @@ void Workspace::clientShortcutUpdated( Client* c )
{
client_keys->insert( key, key );
client_keys->setShortcut( key, c->shortcut());
- client_keys->setSlot( key, c, TQT_SLOT( shortcutActivated()));
+ client_keys->setSlot( key, c, TQ_SLOT( shortcutActivated()));
client_keys->setActionEnabled( key, true );
}
client_keys->updateConnections();
@@ -472,7 +501,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
*/
bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalPos, bool handled )
{
- bool replay = FALSE;
+ bool replay = false;
switch (command)
{
case Options::MouseRaise:
@@ -519,12 +548,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP
case Options::MouseActivateRaiseAndPassClick:
workspace()->takeActivity( this, ActivityFocus | ActivityRaise, handled );
workspace()->setActiveScreenMouse( globalPos );
- replay = TRUE;
+ replay = true;
break;
case Options::MouseActivateAndPassClick:
workspace()->takeActivity( this, ActivityFocus, handled );
workspace()->setActiveScreenMouse( globalPos );
- replay = TRUE;
+ replay = true;
break;
case Options::MouseActivateRaiseAndMove:
case Options::MouseActivateRaiseAndUnrestrictedMove:
@@ -542,7 +571,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP
if( moveResizeMode )
finishMoveResize( false );
mode = PositionCenter;
- buttonDown = TRUE;
+ buttonDown = true;
moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove
@@ -562,7 +591,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP
break;
if( moveResizeMode )
finishMoveResize( false );
- buttonDown = TRUE;
+ buttonDown = true;
moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
int x = moveOffset.x(), y = moveOffset.y();
bool left = x < width() / 3;
@@ -623,12 +652,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP
{
if (opacity_ < 0xF3333333)
{
- setOpacity(TRUE, opacity_ + 0xCCCCCCC);
+ setOpacity(true, opacity_ + 0xCCCCCCC);
custom_opacity = true;
}
else
{
- setOpacity(FALSE, 0xFFFFFFFF);
+ setOpacity(false, 0xFFFFFFFF);
custom_opacity = false;
}
}
@@ -636,23 +665,89 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP
case Options::MouseOpacityLess:
if (opacity_ > 0)
{
- setOpacity(TRUE, (opacity_ > 0xCCCCCCC) ? opacity_ - 0xCCCCCCC : 0);
+ setOpacity(true, (opacity_ > 0xCCCCCCC) ? opacity_ - 0xCCCCCCC : 0);
custom_opacity = true;
}
break;
case Options::MouseNothing:
- replay = TRUE;
+ replay = true;
break;
}
return replay;
}
-// KDE4 remove me
-void Workspace::showWindowMenuAt( unsigned long, int, int )
+void Workspace::showWindowMenuAt( unsigned long window, int x, int y )
+ {
+ Client *client;
+ if ((client = findClient(WindowMatchPredicate((WId)window))))
+ showWindowMenu( x, y, client );
+ }
+
+void Workspace::showWindowMenu( unsigned long window )
{
- slotWindowOperations();
+ Client *client;
+ if ((client = findClient(WindowMatchPredicate((WId)window))))
+ {
+ TQPoint pos = client->pos() + client->clientPos();
+ showWindowMenu( pos, client );
+ }
}
+void Workspace::tileCurrentWindowToBorder(int position)
+{
+ Client *c = active_popup_client ? active_popup_client : active_client;
+ if (!c) return;
+
+ c->tileToBorder((ActiveBorder)position);
+}
+
+void Workspace::tileWindowToBorder(unsigned long w1, int location) {
+ if (location < ActiveTop || location >= ACTIVE_BORDER_COUNT) return;
+
+ Client *c1 = findClient(WindowMatchPredicate((WId)w1));
+ if (!c1) return;
+
+ c1->tileToBorder((ActiveBorder)location);
+}
+
+void Workspace::tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2) {
+ if (w1 == w2) return;
+
+ Client *c1 = findClient(WindowMatchPredicate((WId)w1));
+ Client *c2 = findClient(WindowMatchPredicate((WId)w2));
+ if (!c1 || !c2) return;
+
+ c1->tileToBorder(ActiveTop);
+ c2->tileToBorder(ActiveBottom);
+}
+
+void Workspace::tileTwoWindowsVertically(unsigned long w1, unsigned long w2) {
+ if (w1 == w2) return;
+
+ Client *c1 = findClient(WindowMatchPredicate((WId)w1));
+ Client *c2 = findClient(WindowMatchPredicate((WId)w2));
+ if (!c1 || !c2) return;
+
+ c1->tileToBorder(ActiveLeft);
+ c2->tileToBorder(ActiveRight);
+}
+
+void Workspace::tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4) {
+ if (w1 == w2 || w1 == w3 || w1 == w4 || w2 == w3 || w2 == w4 || w3 == w4)
+ return;
+
+ Client *c1 = findClient(WindowMatchPredicate((WId)w1));
+ Client *c2 = findClient(WindowMatchPredicate((WId)w2));
+ Client *c3 = findClient(WindowMatchPredicate((WId)w3));
+ Client *c4 = findClient(WindowMatchPredicate((WId)w4));
+ if (!c1 || !c2 || !c3 || !c4) return;
+
+ c1->tileToBorder(ActiveTopLeft);
+ c2->tileToBorder(ActiveTopRight);
+ c3->tileToBorder(ActiveBottomLeft);
+ c4->tileToBorder(ActiveBottomRight);
+}
+
void Workspace::slotActivateAttentionWindow()
{
if( attention_chain.count() > 0 )
@@ -1053,7 +1148,7 @@ void Workspace::slotWindowOperations()
void Workspace::showWindowMenu( const TQRect &pos, Client* cl )
{
- if (!kapp->authorizeTDEAction("twin_rmb"))
+ if (!tdeApp->authorizeTDEAction("twin_rmb"))
return;
if( !cl )
return;
@@ -1070,17 +1165,21 @@ void Workspace::showWindowMenu( const TQRect &pos, Client* cl )
active_popup = p;
int x = pos.left();
int y = pos.bottom();
- if (y == pos.top())
- p->exec( TQPoint( x, y ) );
+ clientPopupAboutToShow(); // needed for sizeHint() to be correct :-/
+
+ TQRect area = clientArea(ScreenArea, TQPoint(x, y), currentDesktop());
+ TQSize hint = p->sizeHint();
+ if (x < 0) x = area.right() - hint.width() + x;
+ if (y < 0) y = area.bottom() - hint.height() + y;
+
+ if (pos.bottom() == pos.top())
+ p->exec( TQPoint( x, y ) );
else
{
- TQRect area = clientArea(ScreenArea, TQPoint(x, y), currentDesktop());
- clientPopupAboutToShow(); // needed for sizeHint() to be correct :-/
- int popupHeight = p->sizeHint().height();
- if (y + popupHeight < area.height())
- p->exec( TQPoint( x, y ) );
- else
- p->exec( TQPoint( x, pos.top() - popupHeight ) );
+ if (y + hint.height() < area.height())
+ p->exec( TQPoint( x, y ) );
+ else
+ p->exec( TQPoint( x, pos.top() - hint.height() ) );
}
// active popup may be already changed (e.g. the window shortcut dialog)
if( active_popup == p )
diff --git a/twin/utils.cpp b/twin/utils.cpp
index e7e5c7d32..d21393d2e 100644
--- a/twin/utils.cpp
+++ b/twin/utils.cpp
@@ -37,10 +37,6 @@ License. See the file "COPYING" for the exact licensing terms.
#include "atoms.h"
#include "notifications.h"
-#ifdef USE_QT4
-#include <Qt/qx11info_x11.h>
-#endif // USE_QT4
-
#endif
namespace KWinInternal
@@ -61,7 +57,7 @@ bool Shape::hasShape( WId w)
unsigned int wws, hws, wbs, hbs;
int boundingShaped = 0, clipShaped = 0;
if (!available())
- return FALSE;
+ return false;
XShapeQueryExtents(tqt_xdisplay(), w,
&boundingShaped, &xws, &yws, &wws, &hws,
&clipShaped, &xbs, &ybs, &wbs, &hbs);
@@ -278,7 +274,7 @@ void updateXTime()
XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL );
}
assert( next_x_time != CurrentTime );
- SET_QT_X_TIME(next_x_time);
+ set_tqt_x_time(next_x_time);
XEvent ev; // remove the PropertyNotify event from the events queue
XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
}
diff --git a/twin/utils.h b/twin/utils.h
index 36e9879a5..da2f9c2e3 100644
--- a/twin/utils.h
+++ b/twin/utils.h
@@ -110,19 +110,16 @@ enum ShadeMode
enum ActiveBorder
{
- ActiveNone = 0,
-
- ActiveLeft = 1,
- ActiveRight = 2,
- ActiveTop = 4,
- ActiveBottom = 8,
-
- ActiveTopLeft = ActiveTop | ActiveLeft,
- ActiveTopRight = ActiveTop | ActiveRight,
- ActiveBottomLeft = ActiveBottom | ActiveLeft,
- ActiveBottomRight = ActiveBottom | ActiveRight,
-
- ACTIVE_BORDER_COUNT
+ ActiveTop = 0,
+ ActiveTopRight,
+ ActiveRight,
+ ActiveBottomRight,
+ ActiveBottom,
+ ActiveBottomLeft,
+ ActiveLeft,
+ ActiveTopLeft,
+ ACTIVE_BORDER_COUNT,
+ ActiveNone
};
enum ActiveMaximizingMode
diff --git a/twin/workspace.cpp b/twin/workspace.cpp
index a06c624a4..2d95e9226 100644
--- a/twin/workspace.cpp
+++ b/twin/workspace.cpp
@@ -23,8 +23,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <tqbitmap.h>
#include <tqclipboard.h>
#include <tdemenubar.h>
-#include <kprocess.h>
-#include <kglobalaccel.h>
+#include <tdeprocess.h>
+#include <tdeglobalaccel.h>
#include <dcopclient.h>
#include <kipc.h>
@@ -58,7 +58,7 @@ Workspace *Workspace::_self = 0;
TDEProcess* kompmgr = 0;
TDESelectionOwner* kompmgr_selection;
-bool allowKompmgrRestart = TRUE;
+bool allowKompmgrRestart = true;
extern bool disable_twin_composition_manager;
bool supportsCompMgr()
@@ -187,7 +187,7 @@ Workspace::Workspace( bool restore )
root = tqt_xrootwin();
default_colormap = DefaultColormap(tqt_xdisplay(), tqt_xscreen() );
installed_colormap = default_colormap;
- session.setAutoDelete( TRUE );
+ session.setAutoDelete( true );
for (int i = 0; i < ACTIVE_BORDER_COUNT; ++i)
{
@@ -195,16 +195,16 @@ Workspace::Workspace( bool restore )
active_windows[i] = None;
}
- connect( &temporaryRulesMessages, TQT_SIGNAL( gotMessage( const TQString& )),
- this, TQT_SLOT( gotTemporaryRulesMessage( const TQString& )));
- connect( &rulesUpdatedTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( writeWindowRules()));
+ connect( &temporaryRulesMessages, TQ_SIGNAL( gotMessage( const TQString& )),
+ this, TQ_SLOT( gotTemporaryRulesMessage( const TQString& )));
+ connect( &rulesUpdatedTimer, TQ_SIGNAL( timeout()), this, TQ_SLOT( writeWindowRules()));
updateXTime(); // needed for proper initialization of user_time in Client ctor
delayFocusTimer = 0;
- active_time_first = GET_QT_X_TIME();
- active_time_last = GET_QT_X_TIME();
+ active_time_first = get_tqt_x_time();
+ active_time_last = get_tqt_x_time();
if ( restore )
loadSessionInfo();
@@ -220,7 +220,7 @@ Workspace::Workspace( bool restore )
(WFlags)(TQt::WType_Desktop | TQt::WPaintUnclipped)
);
- kapp->setGlobalMouseTracking( true ); // so that this doesn't mess eventmask on root window later
+ tdeApp->setGlobalMouseTracking( true ); // so that this doesn't mess eventmask on root window later
// call this before XSelectInput() on the root window
startup = new TDEStartupInfo(
TDEStartupInfo::DisableKWinModule | TDEStartupInfo::AnnounceSilenceChanges, this );
@@ -259,7 +259,7 @@ Workspace::Workspace( bool restore )
init();
#if (TQT_VERSION-0 >= 0x030200) // XRANDR support
- connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized()));
+ connect( tdeApp->desktop(), TQ_SIGNAL( resized( int )), TQ_SLOT( desktopResized()));
#endif
if (!supportsCompMgr()) {
@@ -274,7 +274,7 @@ Workspace::Workspace( bool restore )
if (options->useTranslucency)
{
kompmgr = new TDEProcess;
- connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
+ connect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
*kompmgr << TDE_COMPOSITOR_BINARY;
if (kompmgrpid)
{
@@ -414,12 +414,12 @@ void Workspace::init()
// extra NETRootInfo instance in Client mode is needed to get the values of the properties
NETRootInfo client_info( tqt_xdisplay(), NET::ActiveWindow | NET::CurrentDesktop );
int initial_desktop;
- if( !kapp->isSessionRestored())
+ if( !tdeApp->isSessionRestored())
initial_desktop = client_info.currentDesktop();
else
{
- TDEConfigGroupSaver saver( kapp->sessionConfig(), "Session" );
- initial_desktop = kapp->sessionConfig()->readNumEntry( "desktop", 1 );
+ TDEConfigGroupSaver saver( tdeApp->sessionConfig(), "Session" );
+ initial_desktop = tdeApp->sessionConfig()->readNumEntry( "desktop", 1 );
}
if( !setCurrentDesktop( initial_desktop ))
setCurrentDesktop( 1 );
@@ -427,20 +427,20 @@ void Workspace::init()
// now we know how many desktops we'll, thus, we initialise the positioning object
initPositioning = new Placement(this);
- connect(&reconfigureTimer, TQT_SIGNAL(timeout()), this,
- TQT_SLOT(slotReconfigure()));
- connect( &updateToolWindowsTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( slotUpdateToolWindows()));
+ connect(&reconfigureTimer, TQ_SIGNAL(timeout()), this,
+ TQ_SLOT(slotReconfigure()));
+ connect( &updateToolWindowsTimer, TQ_SIGNAL( timeout()), this, TQ_SLOT( slotUpdateToolWindows()));
- connect(kapp, TQT_SIGNAL(appearanceChanged()), this,
- TQT_SLOT(slotReconfigure()));
- connect(kapp, TQT_SIGNAL(settingsChanged(int)), this,
- TQT_SLOT(slotSettingsChanged(int)));
- connect(kapp, TQT_SIGNAL( kipcMessage( int, int )), this, TQT_SLOT( kipcMessage( int, int )));
+ connect(tdeApp, TQ_SIGNAL(appearanceChanged()), this,
+ TQ_SLOT(slotReconfigure()));
+ connect(tdeApp, TQ_SIGNAL(settingsChanged(int)), this,
+ TQ_SLOT(slotSettingsChanged(int)));
+ connect(tdeApp, TQ_SIGNAL( kipcMessage( int, int )), this, TQ_SLOT( kipcMessage( int, int )));
active_client = NULL;
rootInfo->setActiveWindow( None );
focusToNull();
- if( !kapp->isSessionRestored())
+ if( !tdeApp->isSessionRestored())
++block_focus; // because it will be set below
char nm[ 100 ];
@@ -503,7 +503,7 @@ void Workspace::init()
} // end updates blocker block
Client* new_active_client = NULL;
- if( !kapp->isSessionRestored())
+ if( !tdeApp->isSessionRestored())
{
--block_focus;
new_active_client = findClient( WindowMatchPredicate( client_info.activeWindow()));
@@ -1188,10 +1188,10 @@ void Workspace::slotReconfigure()
if (!kompmgr)
{
kompmgr = new TDEProcess;
- connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
+ connect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
*kompmgr << TDE_COMPOSITOR_BINARY;
}
- TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart
+ TQTimer::singleShot( 200, this, TQ_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart
}
}
else
@@ -1277,7 +1277,7 @@ TQStringList Workspace::configModules(bool controlCenter)
args << "tde-twindecoration.desktop";
if (controlCenter)
args << "tde-twinoptions.desktop";
- else if (kapp->authorizeControlModule("tde-twinoptions.desktop"))
+ else if (tdeApp->authorizeControlModule("tde-twinoptions.desktop"))
args << "twinactions" << "twinfocus" << "twinmoving" << "twinadvanced" << "twinrules" << "twintranslucency";
return args;
}
@@ -1306,10 +1306,10 @@ bool Workspace::isNotManaged( const TQString& title )
if (r.search(title) != -1)
{
doNotManageList.remove( it );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
@@ -1423,7 +1423,7 @@ bool Workspace::setCurrentDesktop( int new_desktop )
current_desktop = new_desktop; // change the desktop (so that Client::updateVisibility() works)
- bool desktopHasCompositing = kapp->isCompositionManagerAvailable(); // Technically I should call isX11CompositionAvailable(), but it isn't initialized via my kapp constructir, and in this case it doesn't really matter anyway....
+ bool desktopHasCompositing = tdeApp->isCompositionManagerAvailable(); // Technically I should call isX11CompositionAvailable(), but it isn't initialized via my tdeApp constructir, and in this case it doesn't really matter anyway....
if (!desktopHasCompositing) {
// If composition is not in use then we can hide the old windows before showing the new ones
for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) {
@@ -1806,7 +1806,7 @@ void Workspace::setActiveScreenMouse( TQPoint mousepos )
TQRect Workspace::screenGeometry( int screen ) const
{
- if (( !options->xineramaEnabled ) || (kapp->desktop()->numScreens() < 2))
+ if (( !options->xineramaEnabled ) || (tdeApp->desktop()->numScreens() < 2))
return tqApp->desktop()->geometry();
return tqApp->desktop()->screenGeometry( screen );
}
@@ -1875,19 +1875,19 @@ void Workspace::calcDesktopLayout(int &x, int &y) const
bool Workspace::addSystemTrayWin( WId w )
{
if ( systemTrayWins.contains( w ) )
- return TRUE;
+ return true;
NETWinInfo ni( tqt_xdisplay(), w, root, NET::WMKDESystemTrayWinFor );
WId trayWinFor = ni.kdeSystemTrayWinFor();
if ( !trayWinFor )
- return FALSE;
+ return false;
systemTrayWins.append( SystemTrayWindow( w, trayWinFor ) );
XSelectInput( tqt_xdisplay(), w,
StructureNotifyMask
);
XAddToSaveSet( tqt_xdisplay(), w );
propagateSystemTrayWins();
- return TRUE;
+ return true;
}
/*!
@@ -1897,7 +1897,7 @@ bool Workspace::addSystemTrayWin( WId w )
bool Workspace::removeSystemTrayWin( WId w, bool check )
{
if ( !systemTrayWins.contains( w ) )
- return FALSE;
+ return false;
if( check )
{
// When getting UnmapNotify, it's not clear if it's the systray
@@ -1925,7 +1925,7 @@ bool Workspace::removeSystemTrayWin( WId w, bool check )
systemTrayWins.remove( w );
XRemoveFromSaveSet (tqt_xdisplay (), w);
propagateSystemTrayWins();
- return TRUE;
+ return true;
}
@@ -2154,17 +2154,17 @@ void Workspace::slotMouseEmulation()
if ( mouse_emulation )
{
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
- mouse_emulation = FALSE;
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
+ mouse_emulation = false;
return;
}
if ( XGrabKeyboard(tqt_xdisplay(),
- root, FALSE,
+ root, false,
GrabModeAsync, GrabModeAsync,
- GET_QT_X_TIME()) == GrabSuccess )
+ get_tqt_x_time()) == GrabSuccess )
{
- mouse_emulation = TRUE;
+ mouse_emulation = true;
mouse_emulation_state = 0;
mouse_emulation_window = 0;
}
@@ -2218,7 +2218,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xmotion.window = w;
e.xmotion.root = tqt_xrootwin();
e.xmotion.subwindow = w;
- e.xmotion.time = GET_QT_X_TIME();
+ e.xmotion.time = get_tqt_x_time();
e.xmotion.x = x;
e.xmotion.y = y;
e.xmotion.x_root = pos.x();
@@ -2234,7 +2234,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xbutton.window = w;
e.xbutton.root = tqt_xrootwin();
e.xbutton.subwindow = w;
- e.xbutton.time = GET_QT_X_TIME();
+ e.xbutton.time = get_tqt_x_time();
e.xbutton.x = x;
e.xbutton.y = y;
e.xbutton.x_root = pos.x();
@@ -2284,7 +2284,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
{
if ( root != tqt_xrootwin() )
- return FALSE;
+ return false;
int kc = XkbKeycodeToKeysym(tqt_xdisplay(), ev.keycode, 0, 0);
int km = ev.state & (ControlMask | Mod1Mask | ShiftMask);
@@ -2360,17 +2360,17 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
}
// fall through
case XK_Escape:
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
- mouse_emulation = FALSE;
- return TRUE;
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
+ mouse_emulation = false;
+ return true;
default:
- return FALSE;
+ return false;
}
TQCursor::setPos( pos );
if ( mouse_emulation_state )
mouse_emulation_state = sendFakedMouseEvent( pos, mouse_emulation_window, EmuMove, 0, mouse_emulation_state );
- return TRUE;
+ return true;
}
@@ -2396,8 +2396,8 @@ void Workspace::requestDelayFocus( Client* c )
delayfocus_client = c;
delete delayFocusTimer;
delayFocusTimer = new TQTimer( this );
- connect( delayFocusTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( delayFocus() ) );
- delayFocusTimer->start( options->delayFocusInterval, TRUE );
+ connect( delayFocusTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( delayFocus() ) );
+ delayFocusTimer->start( options->delayFocusInterval, true );
}
void Workspace::cancelDelayFocus()
@@ -2415,9 +2415,9 @@ void Workspace::cancelDelayFocus()
*/
void Workspace::updateActiveBorders()
{
- active_time_first = GET_QT_X_TIME();
- active_time_last = GET_QT_X_TIME();
- active_time_last_trigger = GET_QT_X_TIME();
+ active_time_first = get_tqt_x_time();
+ active_time_last = get_tqt_x_time();
+ active_time_last_trigger = get_tqt_x_time();
active_current_border = ActiveNone;
TQRect r = TQApplication::desktop()->geometry();
activeTop = r.top();
@@ -2506,7 +2506,7 @@ void Workspace::reserveActiveBorder( ActiveBorder border )
return;
if (active_reserved[border]++ == 0)
- TQTimer::singleShot(0, this, TQT_SLOT(updateActiveBorders()));
+ TQTimer::singleShot(0, this, TQ_SLOT(updateActiveBorders()));
}
void Workspace::unreserveActiveBorder( ActiveBorder border )
@@ -2516,7 +2516,7 @@ void Workspace::unreserveActiveBorder( ActiveBorder border )
assert(active_reserved[ border ] > 0);
if (--active_reserved[ border ] == 0)
- TQTimer::singleShot(0, this, TQT_SLOT(updateActiveBorders()));
+ TQTimer::singleShot(0, this, TQ_SLOT(updateActiveBorders()));
}
void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
@@ -2542,15 +2542,21 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
int distance_reset = activation_distance + 10;
// Leave active maximizing mode when window moved away
- if (active_current_border != ActiveNone &&
- (pos.x() > activeLeft + distance_reset) &&
- (pos.x() < activeRight - distance_reset) &&
- (pos.y() > activeTop + distance_reset) &&
- (pos.y() < activeBottom - distance_reset))
- {
- if (movingClient &&
- (options->activeBorders() == Options::ActiveTileMaximize ||
- options->activeBorders() == Options::ActiveTileOnly))
+ if (movingClient &&
+ (options->activeBorders() == Options::ActiveTileMaximize ||
+ options->activeBorders() == Options::ActiveTileOnly))
+ {
+ TQRect r = TQApplication::desktop()->screenGeometry(pos);
+ activeTop = r.top();
+ activeBottom = r.bottom();
+ activeLeft = r.left();
+ activeRight = r.right();
+
+ if (active_current_border != ActiveNone &&
+ (pos.x() > activeLeft + distance_reset) &&
+ (pos.x() < activeRight - distance_reset) &&
+ (pos.y() > activeTop + distance_reset) &&
+ (pos.y() < activeBottom - distance_reset))
{
movingClient->cancelActiveBorderMaximizing();
return;
@@ -2559,53 +2565,77 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
// These checks take activation distance into account, creating a
// virtual "activation band" for easier border/corner activation.
- bool active_left = pos.x() < activeLeft + activation_distance,
- active_right = pos.x() > activeRight - activation_distance,
- active_top = pos.y() < activeTop + activation_distance,
- active_bottom = pos.y() > activeBottom - activation_distance;
+ bool active_left = pos.x() < activeLeft + activation_distance;
+ bool active_right = pos.x() > activeRight - activation_distance;
+ bool active_top = pos.y() < activeTop + activation_distance;
+ bool active_bottom = pos.y() > activeBottom - activation_distance;
+
+ if (!active_left && !active_right && !active_top && !active_bottom)
+ return;
// These checks are used to make corner activation easier: we assume
// a 25% zone on the edge of each border where instead of half size
// tiling we perform quarter size tiling. The rest 50% is left for
// normal half size tiling.
- uint active_width_quart = activeRight / 4,
- active_height_quart = activeBottom / 4;
+ // These options make sense only for the tiling mode.
+ int active_width_quart = (activeRight - activeLeft) / 4;
+ int active_height_quart = (activeBottom - activeTop) / 4;
- bool active_qleft = pos.x() < activeLeft + active_width_quart,
- active_qright = pos.x() > activeRight - active_width_quart,
- active_qtop = pos.y() < activeTop + active_height_quart,
- active_qbottom = pos.y() > activeBottom - active_height_quart;
-
- int border = ActiveNone;
-
- if (active_left) border |= ActiveLeft;
- if (active_right) border |= ActiveRight;
- if (active_top) border |= ActiveTop;
- if (active_bottom) border |= ActiveBottom;
-
- if (border == ActiveLeft || border == ActiveRight) {
- if (active_qtop) border |= ActiveTop;
- if (active_qbottom) border |= ActiveBottom;
+ bool active_qleft = false;
+ bool active_qright = false;
+ bool active_qtop = false;
+ bool active_qbottom = false;
+ if (options->activeBorders() == Options::ActiveTileMaximize ||
+ options->activeBorders() == Options::ActiveTileOnly)
+ {
+ active_qleft = pos.x() < activeLeft + active_width_quart;
+ active_qright = pos.x() > activeRight - active_width_quart;
+ active_qtop = pos.y() < activeTop + active_height_quart;
+ active_qbottom = pos.y() > activeBottom - active_height_quart;
}
- else if (border == ActiveTop || border == ActiveBottom) {
- if (active_qleft) border |= ActiveLeft;
- if (active_qright) border |= ActiveRight;
+ ActiveBorder border = ActiveNone;
+ if ((active_left && active_qtop) || (active_top && active_qleft))
+ {
+ border = ActiveTopLeft;
}
-
- bool border_valid = false;
- for (int i = 0; i < ACTIVE_BORDER_COUNT; ++i) {
- if (border == (ActiveBorder)i) {
- border_valid = true;
- }
+ else if ((active_right && active_qtop) || (active_top && active_qright))
+ {
+ border = ActiveTopRight;
}
-
- if (!border_valid) {
- abort();
+ else if ((active_left && active_qbottom) || (active_bottom && active_qleft))
+ {
+ border = ActiveBottomLeft;
+ }
+ else if ((active_right && active_qbottom) || (active_bottom && active_qright))
+ {
+ border = ActiveBottomRight;
+ }
+ else if (active_left)
+ {
+ border = ActiveLeft;
+ }
+ else if (active_right)
+ {
+ border = ActiveRight;
+ }
+ else if (active_top)
+ {
+ border = ActiveTop;
+ }
+ else if (active_bottom)
+ {
+ border = ActiveBottom;
+ }
+ else
+ {
+ // Should never happen
+ abort();
}
- if (border == ActiveNone || active_windows[border] == None) {
- return;
+ if( active_windows[border] == None )
+ {
+ return;
}
if ((active_current_border == border) &&
@@ -2627,7 +2657,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
if (options->activeBorders() == Options::ActiveSwitchAlways ||
options->activeBorders() == Options::ActiveSwitchOnMove)
{
- activeBorderSwitchDesktop((ActiveBorder)border, pos);
+ activeBorderSwitchDesktop(border, pos);
return; // Don't reset cursor position
}
@@ -2637,6 +2667,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
{
if (!movingClient->isResizable()) return;
movingClient->setActiveBorderMode(ActiveMaximizeMode);
+ movingClient->setActiveBorderPos(pos);
movingClient->setActiveBorder(ActiveNone);
movingClient->setActiveBorderMaximizing(true);
}
@@ -2647,7 +2678,8 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
{
if (!movingClient->isResizable()) return;
movingClient->setActiveBorderMode(ActiveTilingMode);
- movingClient->setActiveBorder((ActiveBorder)border);
+ movingClient->setActiveBorderPos(pos);
+ movingClient->setActiveBorder(border);
movingClient->setActiveBorderMaximizing(true);
}
@@ -2661,7 +2693,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
// Desktop switching
if (options->activeBorders() == Options::ActiveSwitchAlways && isSide)
{
- activeBorderSwitchDesktop((ActiveBorder)border, pos);
+ activeBorderSwitchDesktop(border, pos);
return; // Don't reset cursor position
}
}
@@ -2669,7 +2701,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
}
else
{
- active_current_border = (ActiveBorder)border;
+ active_current_border = border;
active_time_first = now;
active_time_last = now;
active_push_point = pos;
@@ -2680,9 +2712,9 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now)
{
// Reset the pointer to find out whether the user is really pushing
// (ordered according to enum ActiveBorder minus ActiveNone)
- const int xdiff[ACTIVE_BORDER_COUNT] = {1, -1, 0, 0, 1, -1, 1, -1};
- const int ydiff[ACTIVE_BORDER_COUNT] = {0, 0, 1, -1, 1, 1, -1, -1};
- TQCursor::setPos(pos.x() + xdiff[border - 1], pos.y() + ydiff[border - 1]);
+ const int xdiff[ ACTIVE_BORDER_COUNT ] = { 0, -1, -1, -1, 0, 1, 1, 1 };
+ const int ydiff[ ACTIVE_BORDER_COUNT ] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+ TQCursor::setPos(pos.x() + xdiff[border], pos.y() + ydiff[border]);
}
}
@@ -2745,7 +2777,7 @@ bool Workspace::activeBorderEvent(XEvent *e)
if (active_windows[i] != None && e->xclient.window == active_windows[i])
{
updateXTime();
- checkActiveBorder(TQPoint(e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), GET_QT_X_TIME());
+ checkActiveBorder(TQPoint(e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), get_tqt_x_time());
return true;
}
}
@@ -2788,12 +2820,12 @@ void Workspace::lostTopMenuSelection()
{
// kdDebug() << "lost TopMenu selection" << endl;
// make sure this signal is always set when not owning the selection
- disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
- connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
+ disconnect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner()));
+ connect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner()));
if( !managing_topmenus )
return;
- connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
- disconnect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection()));
+ connect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner()));
+ disconnect( topmenu_selection, TQ_SIGNAL( lostOwnership()), this, TQ_SLOT( lostTopMenuSelection()));
managing_topmenus = false;
delete topmenu_space;
topmenu_space = NULL;
@@ -2822,8 +2854,8 @@ void Workspace::setupTopMenuHandling()
{
if( managing_topmenus )
return;
- connect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection()));
- disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
+ connect( topmenu_selection, TQ_SIGNAL( lostOwnership()), this, TQ_SLOT( lostTopMenuSelection()));
+ disconnect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner()));
managing_topmenus = true;
topmenu_space = new TQWidget;
Window stack[ 2 ];
@@ -2868,7 +2900,7 @@ bool Workspace::checkStartupNotification( Window w, TDEStartupInfoId& id, TDESta
*/
void Workspace::focusToNull()
{
- XSetInputFocus(tqt_xdisplay(), null_focus_window, RevertToPointerRoot, GET_QT_X_TIME() );
+ XSetInputFocus(tqt_xdisplay(), null_focus_window, RevertToPointerRoot, get_tqt_x_time() );
}
void Workspace::helperDialog( const TQString& message, const Client* c )
@@ -2934,7 +2966,7 @@ void Workspace::startKompmgr()
}
else {
// Try again a bit later!
- TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) );
+ TQTimer::singleShot( 200, this, TQ_SLOT(startKompmgr()) );
return;
}
pid_t kompmgrpid = getCompositorPID();
@@ -2949,7 +2981,7 @@ void Workspace::startKompmgr()
}
if (!kompmgr->start(TDEProcess::OwnGroup, TDEProcess::Stderr))
{
- options->useTranslucency = FALSE;
+ options->useTranslucency = false;
TDEProcess proc;
proc << "kdialog" << "--error"
<< i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.")
@@ -2962,16 +2994,16 @@ void Workspace::startKompmgr()
char selection_name[ 100 ];
sprintf( selection_name, "_NET_WM_CM_S%d", DefaultScreen( tqt_xdisplay()));
kompmgr_selection = new TDESelectionOwner( selection_name );
- connect( kompmgr_selection, TQT_SIGNAL( lostOwnership()), TQT_SLOT( stopKompmgr()));
+ connect( kompmgr_selection, TQ_SIGNAL( lostOwnership()), TQ_SLOT( stopKompmgr()));
kompmgr_selection->claim( true );
- connect(kompmgr, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(restartKompmgr(TDEProcess*)));
- options->useTranslucency = TRUE;
- //allowKompmgrRestart = FALSE;
- //TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) );
+ connect(kompmgr, TQ_SIGNAL(processExited(TDEProcess*)), TQ_SLOT(restartKompmgr(TDEProcess*)));
+ options->useTranslucency = true;
+ //allowKompmgrRestart = false;
+ //TQTimer::singleShot( 60000, this, TQ_SLOT(unblockKompmgrRestart()) );
TQByteArray ba;
TQDataStream arg(ba, IO_WriteOnly);
arg << "";
- kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba);
+ tdeApp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba);
}
if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider
}
@@ -2983,14 +3015,14 @@ void Workspace::stopKompmgr()
}
delete kompmgr_selection;
kompmgr_selection = NULL;
- kompmgr->disconnect(this, TQT_SLOT(restartKompmgr(TDEProcess*)));
- options->useTranslucency = FALSE;
+ kompmgr->disconnect(this, TQ_SLOT(restartKompmgr(TDEProcess*)));
+ options->useTranslucency = false;
if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider
kompmgr->kill(SIGKILL);
TQByteArray ba;
TQDataStream arg(ba, IO_WriteOnly);
arg << "";
- kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba);
+ tdeApp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba);
}
void Workspace::kompmgrReloadSettings()
@@ -3008,11 +3040,11 @@ bool Workspace::kompmgrIsRunning()
void Workspace::unblockKompmgrRestart()
{
- allowKompmgrRestart = TRUE;
+ allowKompmgrRestart = true;
}
void Workspace::restartKompmgr( TDEProcess *proc )
-// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); TQTimer::singleShot(200, workspace, TQT_SLOT(startKompmgr()));
+// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); TQTimer::singleShot(200, workspace, TQ_SLOT(startKompmgr()));
{
bool crashed;
if (proc->signalled()) { // looks like kompmgr may have crashed
@@ -3027,7 +3059,7 @@ void Workspace::restartKompmgr( TDEProcess *proc )
{
delete kompmgr_selection;
kompmgr_selection = NULL;
- options->useTranslucency = FALSE;
+ options->useTranslucency = false;
if (crashed) {
TDEProcess proc;
proc << "kdialog" << "--error"
@@ -3051,7 +3083,7 @@ void Workspace::restartKompmgr( TDEProcess *proc )
{
delete kompmgr_selection;
kompmgr_selection = NULL;
- options->useTranslucency = FALSE;
+ options->useTranslucency = false;
TDEProcess proc;
proc << "kdialog" << "--error"
<< i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.")
@@ -3060,8 +3092,8 @@ void Workspace::restartKompmgr( TDEProcess *proc )
}
else
{
- allowKompmgrRestart = FALSE;
- TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) );
+ allowKompmgrRestart = false;
+ TQTimer::singleShot( 60000, this, TQ_SLOT(unblockKompmgrRestart()) );
}
}
}
@@ -3088,7 +3120,7 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen)
else return; //skip others
// kompmgr startup failed or succeeded, release connection
kompmgr->closeStderr();
- disconnect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
+ disconnect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
if( !message.isEmpty())
{
TDEProcess proc;
@@ -3099,7 +3131,6 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen)
}
}
-
void Workspace::setOpacity(unsigned long winId, unsigned int opacityPercent)
{
if (opacityPercent > 100) opacityPercent = 100;
diff --git a/twin/workspace.h b/twin/workspace.h
index 47ba7bb15..17ef0c0b3 100644
--- a/twin/workspace.h
+++ b/twin/workspace.h
@@ -74,7 +74,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
{
TQ_OBJECT
public:
- Workspace( bool restore = FALSE );
+ Workspace( bool restore = false );
virtual ~Workspace();
static Workspace * self() { return _self; }
@@ -119,8 +119,8 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
// stealing prevention code.
Client* mostRecentlyActivatedClient() const;
- void activateClient( Client*, bool force = FALSE );
- void requestFocus( Client* c, bool force = FALSE );
+ void activateClient( Client*, bool force = false );
+ void requestFocus( Client* c, bool force = false );
void takeActivity( Client* c, int flags, bool handled ); // flags are ActivityFlags
void handleTakeActivity( Client* c, Time timestamp, int flags ); // flags are ActivityFlags
bool allowClientActivation( const Client* c, Time time = -1U, bool focus_in = false );
@@ -204,8 +204,13 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
void windowToNextDesktop( Client* c );
void sendClientToScreen( Client* c, int screen );
- // KDE4 remove me - and it's also in the DCOP interface :(
void showWindowMenuAt( unsigned long id, int x, int y );
+ void showWindowMenu( unsigned long id );
+
+ void tileWindowToBorder(unsigned long w1, int location);
+ void tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2);
+ void tileTwoWindowsVertically(unsigned long w1, unsigned long w2);
+ void tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4);
void kDestopResized();
/**
@@ -410,6 +415,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
void writeWindowRules();
void kipcMessage( int id, int data );
void updateActiveBorders();
+ void tileCurrentWindowToBorder(int position);
// kompmgr
void setPopupClientOpacity(int v);
void resetClientOpacity();
@@ -501,6 +507,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
void calcDesktopLayout(int &x, int &y) const;
+ TQPopupMenu* makeTileMenu();
TQPopupMenu* clientPopup();
void closeActivePopup();
@@ -585,6 +592,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
TQPopupMenu *advanced_popup;
TQPopupMenu *desk_popup;
int desk_popup_index;
+ int tile_popup_index;
TDEGlobalAccel *keys;
TDEGlobalAccel *client_keys;