diff options
author | Timothy Pearson <[email protected]> | 2014-03-31 23:10:03 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-03-31 23:10:03 -0500 |
commit | 24e34ad9892c4c5bf774bd0c32e369be52954936 (patch) | |
tree | 03819b1b63f5b60797d8072e1bda8a35fcefaf52 | |
parent | 39cbbdb1607e656aac07834d77573b204a717540 (diff) | |
download | tdebase-24e34ad9892c4c5bf774bd0c32e369be52954936.tar.gz tdebase-24e34ad9892c4c5bf774bd0c32e369be52954936.zip |
Add basic support for a modified compton compositor instead of the old buggy kompmgr
Update additional Xorg atom names
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | kcontrol/tdm/tdm-appear.cpp | 2 | ||||
-rw-r--r-- | kdesktop/lock/autologout.cc | 2 | ||||
-rw-r--r-- | kdesktop/lock/infodlg.cc | 2 | ||||
-rw-r--r-- | kdesktop/lock/lockdlg.cc | 8 | ||||
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 2 | ||||
-rw-r--r-- | kdesktop/lock/querydlg.cc | 2 | ||||
-rw-r--r-- | kdesktop/lock/sakdlg.cc | 2 | ||||
-rw-r--r-- | kdesktop/lock/securedlg.cc | 2 | ||||
-rw-r--r-- | kicker/applets/systemtray/systemtrayapplet.cpp | 2 | ||||
-rw-r--r-- | konqueror/konq_mainwindow.cc | 4 | ||||
-rw-r--r-- | ksmserver/server.cpp | 2 | ||||
-rw-r--r-- | tdm/kfrontend/kfdialog.cpp | 2 | ||||
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 2 | ||||
-rw-r--r-- | tdm/kfrontend/sakdlg.cc | 2 | ||||
-rw-r--r-- | twin/CMakeLists.txt | 1 | ||||
-rw-r--r-- | twin/COMPLIANCE | 6 | ||||
-rw-r--r-- | twin/activation.cpp | 2 | ||||
-rw-r--r-- | twin/atoms.cpp | 14 | ||||
-rw-r--r-- | twin/clients/b2/b2client.cpp | 2 | ||||
-rw-r--r-- | twin/clients/keramik/keramik.cpp | 2 | ||||
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.cpp | 72 | ||||
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.h | 1 | ||||
-rw-r--r-- | twin/lib/kcommondecoration.cpp | 2 | ||||
-rw-r--r-- | twin/workspace.cpp | 18 |
25 files changed, 115 insertions, 44 deletions
diff --git a/config.h.cmake b/config.h.cmake index 503a76c9d..35796b3c9 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -201,3 +201,6 @@ // Kickoff menu #cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT1 "@KICKOFF_DIST_CONFIG_SHORTCUT1@" #cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT2 "@KICKOFF_DIST_CONFIG_SHORTCUT2@" + +// TDE compositor binary name +#define TDE_COMPOSITOR_BINARY "compton-tde"
\ No newline at end of file diff --git a/kcontrol/tdm/tdm-appear.cpp b/kcontrol/tdm/tdm-appear.cpp index 66ecbbfdf..6e6761f27 100644 --- a/kcontrol/tdm/tdm-appear.cpp +++ b/kcontrol/tdm/tdm-appear.cpp @@ -177,7 +177,7 @@ TDMAppearanceWidget::TDMAppearanceWidget(TQWidget *parent, const char *name) compositorcombo = new KBackedComboBox(group); compositorcombo->insertItem( "", i18n("None") ); - compositorcombo->insertItem( "kompmgr", i18n("Trinity compositor") ); + compositorcombo->insertItem( TDE_COMPOSITOR_BINARY, i18n("Trinity compositor") ); label = new TQLabel(compositorcombo, i18n("Compositor:"), group); connect(compositorcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); hglay->addWidget(label, 0, 0); diff --git a/kdesktop/lock/autologout.cc b/kdesktop/lock/autologout.cc index 07a68c50d..0861eaef0 100644 --- a/kdesktop/lock/autologout.cc +++ b/kdesktop/lock/autologout.cc @@ -36,7 +36,7 @@ AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog" if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Automatic Logout Notification")); diff --git a/kdesktop/lock/infodlg.cc b/kdesktop/lock/infodlg.cc index 97e2ea2a6..d248d7bd0 100644 --- a/kdesktop/lock/infodlg.cc +++ b/kdesktop/lock/infodlg.cc @@ -68,7 +68,7 @@ InfoDlg::InfoDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Information")); diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index 199cc95b7..163a03e43 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -103,7 +103,7 @@ void PasswordDlg::init(GreeterPluginHandle *plugin) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Desktop Session Locked")); @@ -588,7 +588,7 @@ void PasswordDlg::gplugMsgBox( TQMessageBox::Icon type, const TQString &text ) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), dialog.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } dialog.setCaption(i18n("Authentication Subsystem Notice")); @@ -645,7 +645,7 @@ void PasswordDlg::slotStartNewSession() if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), dialog->winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } dialog->setCaption(i18n("New Session")); @@ -771,7 +771,7 @@ void PasswordDlg::slotSwitchUser() if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), dialog.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } dialog.setCaption(i18n("Switch User")); diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 6ab2ee941..f7dc1c25a 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -229,7 +229,7 @@ LockProcess::LockProcess() setupSignals(); // Set up atoms - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False); kde_wm_transparent_to_black = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_BLACK", False); diff --git a/kdesktop/lock/querydlg.cc b/kdesktop/lock/querydlg.cc index a278fcb8b..7618a5062 100644 --- a/kdesktop/lock/querydlg.cc +++ b/kdesktop/lock/querydlg.cc @@ -68,7 +68,7 @@ QueryDlg::QueryDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Information Needed")); diff --git a/kdesktop/lock/sakdlg.cc b/kdesktop/lock/sakdlg.cc index b16433b6d..1bb8305ef 100644 --- a/kdesktop/lock/sakdlg.cc +++ b/kdesktop/lock/sakdlg.cc @@ -70,7 +70,7 @@ SAKDlg::SAKDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Desktop Session Locked")); diff --git a/kdesktop/lock/securedlg.cc b/kdesktop/lock/securedlg.cc index d19df99a5..b38378f2e 100644 --- a/kdesktop/lock/securedlg.cc +++ b/kdesktop/lock/securedlg.cc @@ -70,7 +70,7 @@ SecureDlg::SecureDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(i18n("Secure Desktop Area")); diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index b91dafd27..898d2b80b 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -532,7 +532,7 @@ void SystemTrayApplet::embedWindow( WId w, bool kde_tray ) if (kde_tray) { - static Atom hack_atom = XInternAtom( tqt_xdisplay(), "_KDE_SYSTEM_TRAY_EMBEDDING", False ); + static Atom hack_atom = XInternAtom( tqt_xdisplay(), "_TDE_SYSTEM_TRAY_EMBEDDING", False ); XChangeProperty( tqt_xdisplay(), w, hack_atom, hack_atom, 32, PropModeReplace, NULL, 0 ); emb->embed(w); XDeleteProperty( tqt_xdisplay(), w, hack_atom ); diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc index ecd78b7cf..f7ebf9d6c 100644 --- a/konqueror/konq_mainwindow.cc +++ b/konqueror/konq_mainwindow.cc @@ -5807,10 +5807,10 @@ void KonqMainWindow::resetWindow() XEvent ev; XWindowEvent( tqt_xdisplay(), tmp_widget.winId(), PropertyChangeMask, &ev ); long x_time = ev.xproperty.time; - // bad hack - without updating the _KDE_NET_WM_USER_CREATION_TIME property, + // bad hack - without updating the _TDE_NET_WM_USER_CREATION_TIME property, // KWin will apply don't_steal_focus to this window, and will not make it active // (shows mainly with 'konqueror --preload') - static Atom atom = XInternAtom( tqt_xdisplay(), "_KDE_NET_WM_USER_CREATION_TIME", False ); + static Atom atom = XInternAtom( tqt_xdisplay(), "_TDE_NET_WM_USER_CREATION_TIME", False ); XChangeProperty( tqt_xdisplay(), winId(), atom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &x_time, 1); SET_QT_X_USER_TIME(CurrentTime); // won't have _NET_WM_USER_TIME set diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index 068246305..c63d70d76 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -948,7 +948,7 @@ bool KSMServer::isCM( const KSMClient* client ) const bool KSMServer::isCM( const TQString& program ) const { // Returns true if the program in question is a composition manager - return (program == "kompmgr"); + return (program == TDE_COMPOSITOR_BINARY); } bool KSMServer::isDesktop( const KSMClient* client ) const diff --git a/tdm/kfrontend/kfdialog.cpp b/tdm/kfrontend/kfdialog.cpp index 47ae5759c..5e8f8e861 100644 --- a/tdm/kfrontend/kfdialog.cpp +++ b/tdm/kfrontend/kfdialog.cpp @@ -47,7 +47,7 @@ FDialog::FDialog( TQWidget *parent, bool framed ) if (framed) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 508717275..f172521bc 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -516,7 +516,7 @@ kg_main( const char *argv0 ) } if (comp) { if (comp->isRunning()) { - if (_compositor == "kompmgr") { + if (_compositor == TDE_COMPOSITOR_BINARY) { // Change process UID // Get user UID passwd* userinfo = getpwnam(login_user.ascii()); diff --git a/tdm/kfrontend/sakdlg.cc b/tdm/kfrontend/sakdlg.cc index e5ad75a88..1f1adefdf 100644 --- a/tdm/kfrontend/sakdlg.cc +++ b/tdm/kfrontend/sakdlg.cc @@ -92,7 +92,7 @@ SAKDlg::SAKDlg(TQWidget *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // Signal that we do not want any window controls to be shown at all Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } setCaption(TDM_LOGIN_SCREEN_BASE_TITLE); diff --git a/twin/CMakeLists.txt b/twin/CMakeLists.txt index aa9f41057..32d497513 100644 --- a/twin/CMakeLists.txt +++ b/twin/CMakeLists.txt @@ -23,6 +23,7 @@ tde_conditional_add_subdirectory( WITH_XCOMPOSITE kompmgr ) include_directories( + ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib ${TDE_INCLUDE_DIR} diff --git a/twin/COMPLIANCE b/twin/COMPLIANCE index 7ae943630..c51bfae3a 100644 --- a/twin/COMPLIANCE +++ b/twin/COMPLIANCE @@ -156,7 +156,7 @@ version 2.0 ====================== / 1.2.3. - KWin uses KWIN_RUNNING atom that's missing the leading underscore. + KWin uses TWIN_RUNNING atom that's missing the leading underscore. Some parts of KDE perhaps may be missing the leading underscore. / 1.2.6. Should be checked. @@ -228,10 +228,10 @@ KDE-specific extensions (for completeness): Property Name Type ========================================================================== -_KDE_WM_CHANGE_STATE root window message +_TDE_WM_CHANGE_STATE root window message _KDE_NET_SYSTEM_TRAY_WINDOWS root window property _KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR window property -_KDE_NET_WM_FRAME_STRUT window property +_TDE_NET_WM_FRAME_STRUT window property _NET_WM_CONTEXT_HELP - Qt extension - has no vendor prefix even though it's not part of the spec diff --git a/twin/activation.cpp b/twin/activation.cpp index 36b9e88f1..6f79c47cc 100644 --- a/twin/activation.cpp +++ b/twin/activation.cpp @@ -774,7 +774,7 @@ Time Client::readUserTimeMapTimestamp( const TDEStartupInfoId* asn_id, const TDE { // The window doesn't have any timestamp. // If it's the first window for its application // (i.e. there's no other window from the same app), - // use the _KDE_NET_WM_USER_CREATION_TIME trick. + // use the _TDE_NET_WM_USER_CREATION_TIME trick. // Otherwise, refuse activation of a window // from already running application if this application // is not the active one (unless focus stealing prevention is turned off). diff --git a/twin/atoms.cpp b/twin/atoms.cpp index de2dfff9f..840f1be44 100644 --- a/twin/atoms.cpp +++ b/twin/atoms.cpp @@ -27,7 +27,7 @@ Atoms::Atoms() int n = 0; atoms[n] = &twin_running; - names[n++] = (char *) "KWIN_RUNNING"; + names[n++] = (char *) "TWIN_RUNNING"; atoms[n] = &wm_protocols; names[n++] = (char *) "WM_PROTOCOLS"; @@ -54,21 +54,21 @@ Atoms::Atoms() names[n++] = (char *) "_NET_WM_PING"; atoms[n] = &kde_wm_change_state; - names[n++] = (char *) "_KDE_WM_CHANGE_STATE"; + names[n++] = (char *) "_TDE_WM_CHANGE_STATE"; atoms[n] = &net_wm_user_time; names[n++] = (char *) "_NET_WM_USER_TIME"; atoms[n] = &kde_net_wm_user_creation_time; - names[n++] = (char *) "_KDE_NET_WM_USER_CREATION_TIME"; + names[n++] = (char *) "_TDE_NET_WM_USER_CREATION_TIME"; atoms[n] = &kde_system_tray_embedding; - names[n++] = (char*) "_KDE_SYSTEM_TRAY_EMBEDDING"; + names[n++] = (char*) "_TDE_SYSTEM_TRAY_EMBEDDING"; atoms[n] = &net_wm_take_activity; names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY"; atoms[n] = &net_wm_window_opacity; - names[n++] = (char*) "_TDE_WM_WINDOW_OPACITY"; + names[n++] = (char*) "_NET_WM_WINDOW_OPACITY"; atoms[n] = &net_wm_window_shadow; names[n++] = (char*) "_TDE_WM_WINDOW_SHADOW"; @@ -83,7 +83,7 @@ Atoms::Atoms() names[n++] = (char*) "_TDE_WM_WINDOW_DECOHASH"; atoms[n] = &net_wm_system_modal_notification; - names[n++] = (char*) "_KDE_WM_MODAL_SYS_NOTIFICATION"; + names[n++] = (char*) "_TDE_WM_MODAL_SYS_NOTIFICATION"; Atom fake; atoms[n] = &fake; @@ -99,7 +99,7 @@ Atoms::Atoms() atoms[n] = &net_frame_extents; names[n++] = (char*) "_NET_FRAME_EXTENTS"; atoms[n] = &kde_net_wm_frame_strut; - names[n++] = (char*) "_KDE_NET_WM_FRAME_STRUT"; + names[n++] = (char*) "_TDE_NET_WM_FRAME_STRUT"; assert( n <= max ); diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp index d63d6c093..6a7a8296e 100644 --- a/twin/clients/b2/b2client.cpp +++ b/twin/clients/b2/b2client.cpp @@ -440,7 +440,7 @@ bool B2Client::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); 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 ) { diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp index cdfd822c4..55eb5787d 100644 --- a/twin/clients/keramik/keramik.cpp +++ b/twin/clients/keramik/keramik.cpp @@ -1031,7 +1031,7 @@ bool KeramikClient::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); 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 ) { diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp index dbaee8b0b..ad207014f 100644 --- a/twin/kcmtwin/twinoptions/windows.cpp +++ b/twin/kcmtwin/twinoptions/windows.cpp @@ -93,6 +93,7 @@ #define MAX_WNDW_SNAP 100 #define MAX_EDGE_RES 1000 +TQString TDECompositor = TDE_COMPOSITOR_BINARY; KFocusConfig::~KFocusConfig () { @@ -1279,7 +1280,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, KActiveLabel *label = new KActiveLabel(i18n("<qt><b>It seems that alpha channel support is not available.</b><br><br>" "Please make sure you have " "<a href=\"http://www.freedesktop.org/\">Xorg ≥ 6.8</a>," - " and installed the kompmgr that came with twin.<br>" + " and installed the composition manager that came with twin.<br>" "Also, make sure you have the following entries in your XConfig (e.g. /etc/X11/xorg.conf):<br><br>" "<i>Section \"Extensions\"<br>" "Option \"Composite\" \"Enable\"<br>" @@ -1339,6 +1340,15 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, disableARGB = new TQCheckBox(i18n("Disable ARGB windows (ignores window alpha maps, fixes gtk1 apps)"),tGroup); vLay->addWidget(disableARGB); + if (TDECompositor == "compton-tde") { + disableARGB->hide(); + } + + useOpenGL = new TQCheckBox(i18n("Use OpenGL compositor (best performance)"),tGroup); + vLay->addWidget(useOpenGL); + if (TDECompositor != "compton-tde") { + useOpenGL->hide(); + } vLay->addStretch(); tabW->addTab(tGroup, i18n("Opacity")); @@ -1463,6 +1473,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, 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(useShadows, 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())); @@ -1503,6 +1514,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, // 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(useShadows, 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())); @@ -1560,6 +1572,7 @@ void KTranslucencyConfig::load( void ) conf_.setGroup("xcompmgr"); disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE)); + useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",FALSE)); useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0); shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",-200))); @@ -1592,8 +1605,9 @@ void KTranslucencyConfig::load( void ) void KTranslucencyConfig::save( void ) { - if (!kompmgrAvailable_) - return; + if (!kompmgrAvailable_) + return; + config->setGroup( "Notification Messages" ); config->writeEntry("UseTranslucency",useTranslucency->isChecked()); @@ -1628,6 +1642,7 @@ void KTranslucencyConfig::save( void ) conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":""); conf_->writeEntry("DisableARGB",disableARGB->isChecked()); + conf_->writeEntry("useOpenGL",useOpenGL->isChecked()); conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value()); conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value()); @@ -1646,6 +1661,55 @@ void KTranslucencyConfig::save( void ) delete conf_; + // Now write out compton settings + TQFile* compton_conf_file_ = new TQFile(TQDir::homeDirPath() + "/.compton-tde.conf"); + if ( compton_conf_file_->open( IO_WriteOnly ) ) { + TQTextStream stream(compton_conf_file_); + + stream << "shadow = " << (useShadows->isChecked()?"true":"false") << ";\n"; + stream << "shadow-offset-y = " << (-1*shadowTopOffset->value()) << ";\n"; + stream << "shadow-offset-x = " << (-1*shadowLeftOffset->value()) << ";\n"; + + int r, g, b; + shadowColor->color().rgb( &r, &g, &b ); + stream << "shadow-red = " << (r/255.0) << ";\n"; + stream << "shadow-green = " << (g/255.0) << ";\n"; + stream << "shadow-blue = " << (b/255.0) << ";\n"; + + stream << "shadow-radius = " << baseShadowSize->value() << ";\n"; + + bool fadeOpacity = fadeOnOpacityChange->isChecked(); + bool fadeWindows = fadeInWindows->isChecked(); + bool fadeMenuWindows = fadeInMenuWindows->isChecked(); + stream << "fading = " << ((fadeWindows || fadeMenuWindows || fadeOpacity)?"true":"false") << ";\n"; + stream << "no-fading-opacitychange = " << (fadeOpacity?"false":"true") << ";\n"; + stream << "no-fading-openclose = " << (fadeWindows?"false":"true") << ";\n"; + stream << "wintypes:" << "\n"; + stream << "{" << "\n"; + stream << " menu = { no-fading-openclose = " << (fadeMenuWindows?"false":"true") << "; }" << "\n"; + stream << " dropdown_menu = { no-fading-openclose = " << (fadeMenuWindows?"false":"true") << "; }" << "\n"; + stream << " popup_menu = { no-fading-openclose = " << (fadeMenuWindows?"false":"true") << "; }" << "\n"; + stream << "}" << "\n"; + + stream << "fade-in-step = " << (fadeInSpeed->value()/1000.0) << ";\n"; + stream << "fade-out-step = " << (fadeOutSpeed->value()/1000.0) << ";\n"; + + stream << "backend = \"" << (useOpenGL->isChecked()?"glx":"xrender") << "\";\n"; + stream << "vsync = \"" << (useOpenGL->isChecked()?"opengl":"none") << "\";\n"; + + // Global settings + stream << "no-dock-shadow = true;\n"; + stream << "no-dnd-shadow = true;\n"; + stream << "clear-shadow = true;\n"; + stream << "shadow-ignore-shaped = true;\n"; + + // Features not currently supported by compton +// stream << "DisableARGB = " << (disableARGB->isChecked()?"true":"false") << ";\n"; + + compton_conf_file_->close(); + } + delete compton_conf_file_; + if (standAlone) { config->sync(); @@ -1707,7 +1771,7 @@ bool KTranslucencyConfig::kompmgrAvailable() { bool ret; TDEProcess proc; - proc << "kompmgr" << "-v"; + proc << TDECompositor << "-v"; ret = proc.start(TDEProcess::DontCare, TDEProcess::AllOutput); proc.detach(); return ret; diff --git a/twin/kcmtwin/twinoptions/windows.h b/twin/kcmtwin/twinoptions/windows.h index 10424207d..27ea02a8d 100644 --- a/twin/kcmtwin/twinoptions/windows.h +++ b/twin/kcmtwin/twinoptions/windows.h @@ -258,6 +258,7 @@ private: TQCheckBox *dockWindowTransparency; TQCheckBox *keepAboveAsActive; TQCheckBox *disableARGB; + TQCheckBox *useOpenGL; TQCheckBox *fadeInWindows; TQCheckBox *fadeInMenuWindows; TQCheckBox *fadeOnOpacityChange; diff --git a/twin/lib/kcommondecoration.cpp b/twin/lib/kcommondecoration.cpp index 48db91040..54ee415e2 100644 --- a/twin/lib/kcommondecoration.cpp +++ b/twin/lib/kcommondecoration.cpp @@ -328,7 +328,7 @@ bool KCommonDecoration::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False); 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 ) { diff --git a/twin/workspace.cpp b/twin/workspace.cpp index 4dd5113ed..210ab7754 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -48,6 +48,8 @@ License. See the file "COPYING" for the exact licensing terms. #include <pwd.h> +#include "config.h" + namespace KWinInternal { @@ -227,7 +229,7 @@ Workspace::Workspace( bool restore ) { kompmgr = new TDEProcess; connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); - *kompmgr << "kompmgr"; + *kompmgr << TDE_COMPOSITOR_BINARY; startKompmgr(); } else if (!disable_twin_composition_manager) @@ -1135,7 +1137,7 @@ void Workspace::slotReconfigure() { kompmgr = new TDEProcess; connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); - *kompmgr << "kompmgr"; + *kompmgr << TDE_COMPOSITOR_BINARY; } TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart } @@ -1850,7 +1852,7 @@ bool Workspace::removeSystemTrayWin( WId w, bool check ) // reparenting the window into itself, or if it's the window // going away. This is obviously a flaw in the design, and we were // just lucky it worked for so long. Kicker's systray temporarily - // sets _KDE_SYSTEM_TRAY_EMBEDDING property on the window while + // sets _TDE_SYSTEM_TRAY_EMBEDDING property on the window while // embedding it, allowing KWin to figure out. Kicker just mustn't // crash before removing it again ... *shrug* . int num_props; @@ -2815,7 +2817,7 @@ void Workspace::startKompmgr() options->useTranslucency = FALSE; TDEProcess proc; proc << "kdialog" << "--error" - << i18n("The Composite Manager could not be started.\\nMake sure you have \"kompmgr\" in a $PATH directory.") + << i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.") << "--title" << "Composite Manager Failure"; proc.start(TDEProcess::DontCare); } @@ -2907,7 +2909,7 @@ void Workspace::restartKompmgr( TDEProcess *proc ) // { // kompmgr = new TDEProcess; // kompmgr->clearArguments(); -// *kompmgr << "kompmgr"; +// *kompmgr << TDE_COMPOSITOR_BINARY; // } // ------------------- if (!kompmgr->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr)) @@ -2917,7 +2919,7 @@ void Workspace::restartKompmgr( TDEProcess *proc ) options->useTranslucency = FALSE; TDEProcess proc; proc << "kdialog" << "--error" - << i18n("The Composite Manager could not be started.\\nMake sure you have \"kompmgr\" in a $PATH directory.") + << i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.") << "--title" << i18n("Composite Manager Failure"); proc.start(TDEProcess::DontCare); } @@ -2936,9 +2938,9 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen) if (output.contains("Started",false)) ; // don't do anything, just pass to the connection release else if (output.contains("Can't open display",false)) - message = i18n("<qt><b>kompmgr failed to open the display</b><br>There is probably an invalid display entry in your ~/.xcompmgrrc.</qt>"); + message = i18n("<qt><b>The TDE composition manager failed to open the display</b><br>There is probably an invalid display entry in your ~/.compton-tde.conf file.</qt>"); else if (output.contains("No render extension",false)) - message = i18n("<qt><b>kompmgr cannot find the Xrender extension</b><br>You are using either an outdated or a crippled version of XOrg.<br>Get XOrg ≥ 6.8 from www.freedesktop.org.<br></qt>"); + message = i18n("<qt><b>The TDE composition manager cannot find the Xrender extension</b><br>You are using either an outdated or a crippled version of XOrg.<br>Get XOrg ≥ 6.8 from www.freedesktop.org.<br></qt>"); else if (output.contains("No composite extension",false)) message = i18n("<qt><b>Composite extension not found</b><br>You <i>must</i> use XOrg ≥ 6.8 for translucency and shadows to work.<br>Additionally, you need to add a new section to your X config file:<br>" "<i>Section \"Extensions\"<br>" |