Add basic support for a modified compton compositor instead of the old buggy kompmgr

Update additional Xorg atom names
pull/2/head
Timothy Pearson 10 years ago
parent 39cbbdb160
commit 24e34ad989

@ -201,3 +201,6 @@
// Kickoff menu // Kickoff menu
#cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT1 "@KICKOFF_DIST_CONFIG_SHORTCUT1@" #cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT1 "@KICKOFF_DIST_CONFIG_SHORTCUT1@"
#cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT2 "@KICKOFF_DIST_CONFIG_SHORTCUT2@" #cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT2 "@KICKOFF_DIST_CONFIG_SHORTCUT2@"
// TDE compositor binary name
#define TDE_COMPOSITOR_BINARY "compton-tde"

@ -177,7 +177,7 @@ TDMAppearanceWidget::TDMAppearanceWidget(TQWidget *parent, const char *name)
compositorcombo = new KBackedComboBox(group); compositorcombo = new KBackedComboBox(group);
compositorcombo->insertItem( "", i18n("None") ); 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); label = new TQLabel(compositorcombo, i18n("Compositor:"), group);
connect(compositorcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); connect(compositorcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
hglay->addWidget(label, 0, 0); hglay->addWidget(label, 0, 0);

@ -36,7 +36,7 @@ AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog"
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Automatic Logout Notification")); setCaption(i18n("Automatic Logout Notification"));

@ -68,7 +68,7 @@ InfoDlg::InfoDlg(LockProcess *parent)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Information")); setCaption(i18n("Information"));

@ -103,7 +103,7 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Desktop Session Locked")); 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) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), dialog.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
dialog.setCaption(i18n("Authentication Subsystem Notice")); dialog.setCaption(i18n("Authentication Subsystem Notice"));
@ -645,7 +645,7 @@ void PasswordDlg::slotStartNewSession()
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), dialog->winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
dialog->setCaption(i18n("New Session")); dialog->setCaption(i18n("New Session"));
@ -771,7 +771,7 @@ void PasswordDlg::slotSwitchUser()
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), dialog.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
dialog.setCaption(i18n("Switch User")); dialog.setCaption(i18n("Switch User"));

@ -229,7 +229,7 @@ LockProcess::LockProcess()
setupSignals(); setupSignals();
// Set up atoms // 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_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False);
kde_wm_transparent_to_black = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_BLACK", False); kde_wm_transparent_to_black = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_BLACK", False);

@ -68,7 +68,7 @@ QueryDlg::QueryDlg(LockProcess *parent)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Information Needed")); setCaption(i18n("Information Needed"));

@ -70,7 +70,7 @@ SAKDlg::SAKDlg(LockProcess *parent)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Desktop Session Locked")); setCaption(i18n("Desktop Session Locked"));

@ -70,7 +70,7 @@ SecureDlg::SecureDlg(LockProcess *parent)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(i18n("Secure Desktop Area")); setCaption(i18n("Secure Desktop Area"));

@ -532,7 +532,7 @@ void SystemTrayApplet::embedWindow( WId w, bool kde_tray )
if (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 ); XChangeProperty( tqt_xdisplay(), w, hack_atom, hack_atom, 32, PropModeReplace, NULL, 0 );
emb->embed(w); emb->embed(w);
XDeleteProperty( tqt_xdisplay(), w, hack_atom ); XDeleteProperty( tqt_xdisplay(), w, hack_atom );

@ -5807,10 +5807,10 @@ void KonqMainWindow::resetWindow()
XEvent ev; XEvent ev;
XWindowEvent( tqt_xdisplay(), tmp_widget.winId(), PropertyChangeMask, &ev ); XWindowEvent( tqt_xdisplay(), tmp_widget.winId(), PropertyChangeMask, &ev );
long x_time = ev.xproperty.time; 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 // KWin will apply don't_steal_focus to this window, and will not make it active
// (shows mainly with 'konqueror --preload') // (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, XChangeProperty( tqt_xdisplay(), winId(), atom, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *) &x_time, 1); PropModeReplace, (unsigned char *) &x_time, 1);
SET_QT_X_USER_TIME(CurrentTime); // won't have _NET_WM_USER_TIME set SET_QT_X_USER_TIME(CurrentTime); // won't have _NET_WM_USER_TIME set

@ -948,7 +948,7 @@ bool KSMServer::isCM( const KSMClient* client ) const
bool KSMServer::isCM( const TQString& program ) const bool KSMServer::isCM( const TQString& program ) const
{ {
// Returns true if the program in question is a composition manager // 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 bool KSMServer::isDesktop( const KSMClient* client ) const

@ -47,7 +47,7 @@ FDialog::FDialog( TQWidget *parent, bool framed )
if (framed) { if (framed) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }

@ -516,7 +516,7 @@ kg_main( const char *argv0 )
} }
if (comp) { if (comp) {
if (comp->isRunning()) { if (comp->isRunning()) {
if (_compositor == "kompmgr") { if (_compositor == TDE_COMPOSITOR_BINARY) {
// Change process UID // Change process UID
// Get user UID // Get user UID
passwd* userinfo = getpwnam(login_user.ascii()); passwd* userinfo = getpwnam(login_user.ascii());

@ -92,7 +92,7 @@ SAKDlg::SAKDlg(TQWidget *parent)
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all // Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification; 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); XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
} }
setCaption(TDM_LOGIN_SCREEN_BASE_TITLE); setCaption(TDM_LOGIN_SCREEN_BASE_TITLE);

@ -23,6 +23,7 @@ tde_conditional_add_subdirectory( WITH_XCOMPOSITE kompmgr )
include_directories( include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/lib
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}

@ -156,7 +156,7 @@ version 2.0
====================== ======================
/ 1.2.3. / 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. Some parts of KDE perhaps may be missing the leading underscore.
/ 1.2.6. / 1.2.6.
Should be checked. Should be checked.
@ -228,10 +228,10 @@ KDE-specific extensions (for completeness):
Property Name Type 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_SYSTEM_TRAY_WINDOWS root window property
_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR 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 _NET_WM_CONTEXT_HELP
- Qt extension - Qt extension
- has no vendor prefix even though it's not part of the spec - has no vendor prefix even though it's not part of the spec

@ -774,7 +774,7 @@ Time Client::readUserTimeMapTimestamp( const TDEStartupInfoId* asn_id, const TDE
{ // The window doesn't have any timestamp. { // The window doesn't have any timestamp.
// If it's the first window for its application // If it's the first window for its application
// (i.e. there's no other window from the same app), // (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 // Otherwise, refuse activation of a window
// from already running application if this application // from already running application if this application
// is not the active one (unless focus stealing prevention is turned off). // is not the active one (unless focus stealing prevention is turned off).

@ -27,7 +27,7 @@ Atoms::Atoms()
int n = 0; int n = 0;
atoms[n] = &twin_running; atoms[n] = &twin_running;
names[n++] = (char *) "KWIN_RUNNING"; names[n++] = (char *) "TWIN_RUNNING";
atoms[n] = &wm_protocols; atoms[n] = &wm_protocols;
names[n++] = (char *) "WM_PROTOCOLS"; names[n++] = (char *) "WM_PROTOCOLS";
@ -54,21 +54,21 @@ Atoms::Atoms()
names[n++] = (char *) "_NET_WM_PING"; names[n++] = (char *) "_NET_WM_PING";
atoms[n] = &kde_wm_change_state; 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; atoms[n] = &net_wm_user_time;
names[n++] = (char *) "_NET_WM_USER_TIME"; names[n++] = (char *) "_NET_WM_USER_TIME";
atoms[n] = &kde_net_wm_user_creation_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; 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; atoms[n] = &net_wm_take_activity;
names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY"; names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY";
atoms[n] = &net_wm_window_opacity; 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; atoms[n] = &net_wm_window_shadow;
names[n++] = (char*) "_TDE_WM_WINDOW_SHADOW"; names[n++] = (char*) "_TDE_WM_WINDOW_SHADOW";
@ -83,7 +83,7 @@ Atoms::Atoms()
names[n++] = (char*) "_TDE_WM_WINDOW_DECOHASH"; names[n++] = (char*) "_TDE_WM_WINDOW_DECOHASH";
atoms[n] = &net_wm_system_modal_notification; 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; Atom fake;
atoms[n] = &fake; atoms[n] = &fake;
@ -99,7 +99,7 @@ Atoms::Atoms()
atoms[n] = &net_frame_extents; atoms[n] = &net_frame_extents;
names[n++] = (char*) "_NET_FRAME_EXTENTS"; names[n++] = (char*) "_NET_FRAME_EXTENTS";
atoms[n] = &kde_net_wm_frame_strut; 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 ); assert( n <= max );

@ -440,7 +440,7 @@ bool B2Client::isModalSystemNotification()
int format, result; int format, result;
unsigned long n, left; unsigned long n, left;
Atom kde_wm_system_modal_notification; 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); 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 ) if (result == Success && data != None && format == 32 )
{ {

@ -1031,7 +1031,7 @@ bool KeramikClient::isModalSystemNotification()
int format, result; int format, result;
unsigned long n, left; unsigned long n, left;
Atom kde_wm_system_modal_notification; 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); 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 ) if (result == Success && data != None && format == 32 )
{ {

@ -93,6 +93,7 @@
#define MAX_WNDW_SNAP 100 #define MAX_WNDW_SNAP 100
#define MAX_EDGE_RES 1000 #define MAX_EDGE_RES 1000
TQString TDECompositor = TDE_COMPOSITOR_BINARY;
KFocusConfig::~KFocusConfig () 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>" KActiveLabel *label = new KActiveLabel(i18n("<qt><b>It seems that alpha channel support is not available.</b><br><br>"
"Please make sure you have " "Please make sure you have "
"<a href=\"http://www.freedesktop.org/\">Xorg &ge; 6.8</a>," "<a href=\"http://www.freedesktop.org/\">Xorg &ge; 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>" "Also, make sure you have the following entries in your XConfig (e.g. /etc/X11/xorg.conf):<br><br>"
"<i>Section \"Extensions\"<br>" "<i>Section \"Extensions\"<br>"
"Option \"Composite\" \"Enable\"<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); disableARGB = new TQCheckBox(i18n("Disable ARGB windows (ignores window alpha maps, fixes gtk1 apps)"),tGroup);
vLay->addWidget(disableARGB); 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(); vLay->addStretch();
tabW->addTab(tGroup, i18n("Opacity")); 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(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
connect(keepAboveAsActive, 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(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(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
connect(removeShadowsOnResize, 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(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
@ -1503,6 +1514,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
// handle kompmgr restarts if necessary // handle kompmgr restarts if necessary
connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
connect(disableARGB, 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(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
connect(baseShadowSize, 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"); conf_.setGroup("xcompmgr");
disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE)); disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",FALSE));
useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0); useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0);
shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",-200))); shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",-200)));
@ -1592,8 +1605,9 @@ void KTranslucencyConfig::load( void )
void KTranslucencyConfig::save( void ) void KTranslucencyConfig::save( void )
{ {
if (!kompmgrAvailable_) if (!kompmgrAvailable_)
return; return;
config->setGroup( "Notification Messages" ); config->setGroup( "Notification Messages" );
config->writeEntry("UseTranslucency",useTranslucency->isChecked()); config->writeEntry("UseTranslucency",useTranslucency->isChecked());
@ -1628,6 +1642,7 @@ void KTranslucencyConfig::save( void )
conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":""); conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":"");
conf_->writeEntry("DisableARGB",disableARGB->isChecked()); conf_->writeEntry("DisableARGB",disableARGB->isChecked());
conf_->writeEntry("useOpenGL",useOpenGL->isChecked());
conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value()); conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value());
conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value()); conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value());
@ -1646,6 +1661,55 @@ void KTranslucencyConfig::save( void )
delete conf_; 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) if (standAlone)
{ {
config->sync(); config->sync();
@ -1707,7 +1771,7 @@ bool KTranslucencyConfig::kompmgrAvailable()
{ {
bool ret; bool ret;
TDEProcess proc; TDEProcess proc;
proc << "kompmgr" << "-v"; proc << TDECompositor << "-v";
ret = proc.start(TDEProcess::DontCare, TDEProcess::AllOutput); ret = proc.start(TDEProcess::DontCare, TDEProcess::AllOutput);
proc.detach(); proc.detach();
return ret; return ret;

@ -258,6 +258,7 @@ private:
TQCheckBox *dockWindowTransparency; TQCheckBox *dockWindowTransparency;
TQCheckBox *keepAboveAsActive; TQCheckBox *keepAboveAsActive;
TQCheckBox *disableARGB; TQCheckBox *disableARGB;
TQCheckBox *useOpenGL;
TQCheckBox *fadeInWindows; TQCheckBox *fadeInWindows;
TQCheckBox *fadeInMenuWindows; TQCheckBox *fadeInMenuWindows;
TQCheckBox *fadeOnOpacityChange; TQCheckBox *fadeOnOpacityChange;

@ -328,7 +328,7 @@ bool KCommonDecoration::isModalSystemNotification()
int format, result; int format, result;
unsigned long n, left; unsigned long n, left;
Atom kde_wm_system_modal_notification; 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); 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 ) if (result == Success && data != None && format == 32 )
{ {

@ -48,6 +48,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <pwd.h> #include <pwd.h>
#include "config.h"
namespace KWinInternal namespace KWinInternal
{ {
@ -227,7 +229,7 @@ Workspace::Workspace( bool restore )
{ {
kompmgr = new TDEProcess; kompmgr = new TDEProcess;
connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int)));
*kompmgr << "kompmgr"; *kompmgr << TDE_COMPOSITOR_BINARY;
startKompmgr(); startKompmgr();
} }
else if (!disable_twin_composition_manager) else if (!disable_twin_composition_manager)
@ -1135,7 +1137,7 @@ void Workspace::slotReconfigure()
{ {
kompmgr = new TDEProcess; kompmgr = new TDEProcess;
connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); 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 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 // reparenting the window into itself, or if it's the window
// going away. This is obviously a flaw in the design, and we were // going away. This is obviously a flaw in the design, and we were
// just lucky it worked for so long. Kicker's systray temporarily // 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 // embedding it, allowing KWin to figure out. Kicker just mustn't
// crash before removing it again ... *shrug* . // crash before removing it again ... *shrug* .
int num_props; int num_props;
@ -2815,7 +2817,7 @@ void Workspace::startKompmgr()
options->useTranslucency = FALSE; options->useTranslucency = FALSE;
TDEProcess proc; TDEProcess proc;
proc << "kdialog" << "--error" 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"; << "--title" << "Composite Manager Failure";
proc.start(TDEProcess::DontCare); proc.start(TDEProcess::DontCare);
} }
@ -2907,7 +2909,7 @@ void Workspace::restartKompmgr( TDEProcess *proc )
// { // {
// kompmgr = new TDEProcess; // kompmgr = new TDEProcess;
// kompmgr->clearArguments(); // kompmgr->clearArguments();
// *kompmgr << "kompmgr"; // *kompmgr << TDE_COMPOSITOR_BINARY;
// } // }
// ------------------- // -------------------
if (!kompmgr->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr)) if (!kompmgr->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr))
@ -2917,7 +2919,7 @@ void Workspace::restartKompmgr( TDEProcess *proc )
options->useTranslucency = FALSE; options->useTranslucency = FALSE;
TDEProcess proc; TDEProcess proc;
proc << "kdialog" << "--error" 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"); << "--title" << i18n("Composite Manager Failure");
proc.start(TDEProcess::DontCare); proc.start(TDEProcess::DontCare);
} }
@ -2936,9 +2938,9 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen)
if (output.contains("Started",false)) if (output.contains("Started",false))
; // don't do anything, just pass to the connection release ; // don't do anything, just pass to the connection release
else if (output.contains("Can't open display",false)) 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)) 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 &ge; 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 &ge; 6.8 from www.freedesktop.org.<br></qt>");
else if (output.contains("No composite extension",false)) else if (output.contains("No composite extension",false))
message = i18n("<qt><b>Composite extension not found</b><br>You <i>must</i> use XOrg &ge; 6.8 for translucency and shadows to work.<br>Additionally, you need to add a new section to your X config file:<br>" message = i18n("<qt><b>Composite extension not found</b><br>You <i>must</i> use XOrg &ge; 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>" "<i>Section \"Extensions\"<br>"

Loading…
Cancel
Save