Allow kdm to preload kwin

This provides a smoother and more unified logon experience


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253865 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent d4fbbf5427
commit 34869df7a3

@ -1996,6 +1996,16 @@ Comment:
Description:
Specify the Xorg compositing manager. Currently only kompmgr is supported.
Key: WindowManager
Type: string
Default: "kwin"
User: greeter
Instance: #*/""
Comment:
Window manager binary name, if window decorations are desired. "" means no window manager support.
Description:
Specify the Xorg window manager. Currently only kwin is supported.
Key: UseAdminSession
Type: bool
Default: false

@ -35,15 +35,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <tqapplication.h>
#include <tqcursor.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
extern bool has_kwin;
extern bool is_themed;
FDialog::FDialog( TQWidget *parent, bool framed )
: inherited( parent, 0, true/*, framed ? 0 : WStyle_NoBorder*/ )
: inherited( parent, 0, true, (framed&&has_kwin)?0:WX11BypassWM ), winFrame(NULL), m_wmTitle(has_kwin)
{
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(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
XChangeProperty(qt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
}
if (framed) {
winFrame = new TQFrame( this, 0, TQt::WNoAutoErase );
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
if (m_wmTitle)
winFrame->setFrameStyle( TQFrame::NoFrame );
else
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
winFrame->setLineWidth( 2 );
} else
winFrame = 0;
setCaption(i18n("Trinity Desktop Environment"));
if (framed) {
if (m_wmTitle) setFixedSize(sizeHint());
}
}
void
@ -53,6 +75,7 @@ FDialog::resizeEvent( TQResizeEvent *e )
if (winFrame) {
winFrame->resize( size() );
winFrame->erase();
if (m_wmTitle) setFixedSize(sizeHint());
}
}
@ -133,8 +156,14 @@ FDialog::box( TQWidget *parent, TQMessageBox::Icon type, const TQString &text )
}
KFMsgBox::KFMsgBox( TQWidget *parent, TQMessageBox::Icon type, const TQString &text )
: inherited( parent )
: inherited( parent, !is_themed )
{
if (type == TQMessageBox::NoIcon) setCaption(i18n("TDE"));
if (type == TQMessageBox::Question) setCaption(i18n("TDE") + " - " + i18n("Question"));
if (type == TQMessageBox::Information) setCaption(i18n("TDE") + " - " + i18n("Information"));
if (type == TQMessageBox::Warning) setCaption(i18n("TDE") + " - " + i18n("Warning"));
if (type == TQMessageBox::Critical) setCaption(i18n("TDE") + " - " + i18n("Error"));
TQLabel *label1 = new TQLabel( this );
label1->setPixmap( TQMessageBox::standardIcon( type ) );
TQLabel *label2 = new TQLabel( text, this );

@ -51,6 +51,7 @@ class FDialog : public TQDialog {
private:
TQFrame *winFrame;
bool m_wmTitle;
};
class KFMsgBox : public FDialog {

@ -63,6 +63,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <pwd.h>
bool argb_visual_available = false;
bool has_kwin = false;
bool is_themed = false;
static int
ignoreXError( Display *dpy ATTR_UNUSED, XErrorEvent *event ATTR_UNUSED )
@ -260,6 +262,7 @@ kg_main( const char *argv0 )
SecureDisplay( dpy );
KProcess *proc = 0;
KProcess *comp = 0;
KProcess *kwin = 0;
if (!_grabServer) {
if (_useBackground) {
proc = new KProcess;
@ -277,6 +280,13 @@ kg_main( const char *argv0 )
comp->start(KProcess::NotifyOnExit, KProcess::Stdin);
}
if (!_windowManager.isEmpty()) {
kwin = new KProcess;
*kwin << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + _windowManager.ascii();
kwin->start();
has_kwin = true;
}
GSendInt( G_Ready );
kdDebug() << timestamp() << " main1" << endl;
@ -323,8 +333,10 @@ kg_main( const char *argv0 )
XSetErrorHandler( ignoreXError );
KThemedGreeter *tgrt;
dialog = tgrt = new KThemedGreeter;
is_themed = true;
kdDebug() << timestamp() << " themed" << endl;
if (!tgrt->isOK()) {
is_themed = false;
delete tgrt;
dialog = new KStdGreeter;
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());
@ -394,6 +406,11 @@ kg_main( const char *argv0 )
comp->detach();
delete comp;
}
if (kwin) {
kwin->closeStdin();
kwin->detach();
delete kwin;
}
delete proc;
UnsecureDisplay( dpy );
restore_modifiers();

@ -1031,7 +1031,8 @@ void Workspace::showWindowMenu( const TQRect &pos, Client* cl )
return;
if ( cl->isDesktop()
|| cl->isDock()
|| cl->isTopMenu())
|| cl->isTopMenu()
|| cl->isModalSystemNotification())
return;
active_popup_client = cl;

Loading…
Cancel
Save