merge in kconfig changes to make it compile
svn path=/branches/work/kwin_composite/; revision=635791
This commit is contained in:
parent
ce11a2cd80
commit
249a84c5d9
11 changed files with 135 additions and 136 deletions
|
@ -9,7 +9,7 @@
|
||||||
* Thin frame in fixed size windows, titlebar gradient support, accessibility
|
* Thin frame in fixed size windows, titlebar gradient support, accessibility
|
||||||
* improvements, customizable menu double click action and button hover
|
* improvements, customizable menu double click action and button hover
|
||||||
* effects are
|
* effects are
|
||||||
* Copyright (c) 2003, 2004, 2006 Luciano Montanaro <mikelima@cirulla.net>
|
* Copyright (c) 2003,2004 Luciano Montanaro <mikelima@cirulla.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "b2client.h"
|
#include "b2client.h"
|
||||||
|
@ -144,10 +144,10 @@ static void read_config(B2ClientFactory *f)
|
||||||
thickness = 8;
|
thickness = 8;
|
||||||
break;
|
break;
|
||||||
case KDecoration::BorderHuge:
|
case KDecoration::BorderHuge:
|
||||||
case KDecoration::BorderVeryHuge:
|
|
||||||
case KDecoration::BorderOversized:
|
|
||||||
thickness = 12;
|
thickness = 12;
|
||||||
break;
|
break;
|
||||||
|
case KDecoration::BorderVeryHuge:
|
||||||
|
case KDecoration::BorderOversized:
|
||||||
case KDecoration::BorderNormal:
|
case KDecoration::BorderNormal:
|
||||||
default:
|
default:
|
||||||
thickness = 4;
|
thickness = 4;
|
||||||
|
@ -199,37 +199,37 @@ static void create_pixmaps()
|
||||||
for (i = 0; i < NUM_PIXMAPS; i++) {
|
for (i = 0; i < NUM_PIXMAPS; i++) {
|
||||||
|
|
||||||
switch (i / NumStates) {
|
switch (i / NumStates) {
|
||||||
case P_MAX: // will be initialized by copying P_CLOSE
|
case P_MAX: // will be initialized by copying P_CLOSE
|
||||||
case P_RESIZE:
|
case P_RESIZE:
|
||||||
pixmap[i] = new QPixmap();
|
pixmap[i] = new QPixmap();
|
||||||
break;
|
break;
|
||||||
case P_ICONIFY:
|
case P_ICONIFY:
|
||||||
pixmap[i] = new QPixmap(10, 10);
|
pixmap[i] = new QPixmap(10, 10);
|
||||||
break;
|
break;
|
||||||
case P_SHADE:
|
case P_SHADE:
|
||||||
case P_CLOSE:
|
case P_CLOSE:
|
||||||
pixmap[i] = new QPixmap(bsize, bsize);
|
pixmap[i] = new QPixmap(bsize, bsize);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pixmap[i] = new QPixmap(16, 16);
|
pixmap[i] = new QPixmap(16, 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// there seems to be no way to load X bitmaps from data properly, so
|
// there seems to be no way to load X bitmaps from data properly, so
|
||||||
// we need to create new ones for each mask :P
|
// we need to create new ones for each mask :P
|
||||||
QBitmap pinupMask = QBitmap::fromData(QSize(16, 16), pinup_mask_bits);
|
QBitmap pinupMask = QBitmap::fromData(QSize( 16, 16 ), pinup_mask_bits);
|
||||||
PIXMAP_A(P_PINUP)->setMask(pinupMask);
|
PIXMAP_A(P_PINUP)->setMask(pinupMask);
|
||||||
PIXMAP_I(P_PINUP)->setMask(pinupMask);
|
PIXMAP_I(P_PINUP)->setMask(pinupMask);
|
||||||
QBitmap pindownMask = QBitmap::fromData(QSize(16, 16), pindown_mask_bits);
|
QBitmap pindownMask = QBitmap::fromData(QSize( 16, 16 ), pindown_mask_bits);
|
||||||
PIXMAP_AD(P_PINUP)->setMask(pindownMask);
|
PIXMAP_AD(P_PINUP)->setMask(pindownMask);
|
||||||
PIXMAP_ID(P_PINUP)->setMask(pindownMask);
|
PIXMAP_ID(P_PINUP)->setMask(pindownMask);
|
||||||
|
|
||||||
QBitmap menuMask = QBitmap::fromData(QSize(16, 16), menu_mask_bits);
|
QBitmap menuMask = QBitmap::fromData(QSize( 16, 16 ), menu_mask_bits);
|
||||||
for (i = 0; i < NumStates; i++)
|
for (i = 0; i < NumStates; i++)
|
||||||
pixmap[P_MENU * NumStates + i]->setMask(menuMask);
|
pixmap[P_MENU * NumStates + i]->setMask(menuMask);
|
||||||
|
|
||||||
QBitmap helpMask = QBitmap::fromData(QSize(16, 16), help_mask_bits);
|
QBitmap helpMask = QBitmap::fromData(QSize( 16, 16 ), help_mask_bits);
|
||||||
for (i = 0; i < NumStates; i++)
|
for (i = 0; i < NumStates; i++)
|
||||||
pixmap[P_HELP * NumStates + i]->setMask(helpMask);
|
pixmap[P_HELP * NumStates + i]->setMask(helpMask);
|
||||||
|
|
||||||
|
@ -309,9 +309,10 @@ bool B2ClientFactory::reset(unsigned long changed)
|
||||||
return needsReset;
|
return needsReset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool B2ClientFactory::supports(Ability ability)
|
bool B2ClientFactory::supports( Ability ability )
|
||||||
{
|
{
|
||||||
switch (ability) {
|
switch( ability )
|
||||||
|
{
|
||||||
case AbilityAnnounceButtons:
|
case AbilityAnnounceButtons:
|
||||||
case AbilityButtonMenu:
|
case AbilityButtonMenu:
|
||||||
case AbilityButtonOnAllDesktops:
|
case AbilityButtonOnAllDesktops:
|
||||||
|
@ -415,7 +416,7 @@ void B2Client::init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// titlebar
|
// titlebar
|
||||||
g->addItem( new QSpacerItem(0, buttonSize + 4), 0, 0 );
|
g->addItem( new QSpacerItem( 0, buttonSize + 4 ), 0, 0 );
|
||||||
|
|
||||||
titlebar = new B2Titlebar(this);
|
titlebar = new B2Titlebar(this);
|
||||||
titlebar->setMinimumWidth(buttonSize + 4);
|
titlebar->setMinimumWidth(buttonSize + 4);
|
||||||
|
@ -649,7 +650,7 @@ void B2Client::paintEvent(QPaintEvent* e)
|
||||||
qDrawShadePanel(&p, 1, t.bottom() - thickness + 2,
|
qDrawShadePanel(&p, 1, t.bottom() - thickness + 2,
|
||||||
width() - 2, fHeight - 2 - bb + thickness, fillColor, false);
|
width() - 2, fHeight - 2 - bb + thickness, fillColor, false);
|
||||||
if (thickness == 4) {
|
if (thickness == 4) {
|
||||||
p.setPen(fillColor.color(QPalette::Background));
|
p.setPen(fillColor.color( QPalette::Background ) );
|
||||||
p.drawRect(thickness - 2, t.bottom() - 1,
|
p.drawRect(thickness - 2, t.bottom() - 1,
|
||||||
width() - 2 * (thickness - 2), fHeight + 4 - bDepth);
|
width() - 2 * (thickness - 2), fHeight + 4 - bDepth);
|
||||||
} else if (thickness > 4) {
|
} else if (thickness > 4) {
|
||||||
|
@ -685,12 +686,12 @@ void B2Client::paintEvent(QPaintEvent* e)
|
||||||
p.fillRect(hx + 1, height() - thickness - 3,
|
p.fillRect(hx + 1, height() - thickness - 3,
|
||||||
hw - 2, thickness + 2, fillBrush);
|
hw - 2, thickness + 2, fillBrush);
|
||||||
|
|
||||||
p.setPen(fillColor.color(QPalette::Dark));
|
p.setPen(fillColor.color( QPalette::Dark ));
|
||||||
p.drawLine(width() - 2, height() - thickness - 4,
|
p.drawLine(width() - 2, height() - thickness - 4,
|
||||||
width() - 2, height() - 2);
|
width() - 2, height() - 2);
|
||||||
p.drawLine(hx + 1, height() - 2, width() - 2, height() - 2);
|
p.drawLine(hx + 1, height() - 2, width() - 2, height() - 2);
|
||||||
|
|
||||||
p.setPen(fillColor.color(QPalette::Light));
|
p.setPen(fillColor.color( QPalette::Light ));
|
||||||
p.drawLine(hx + 1, height() - thickness - 2,
|
p.drawLine(hx + 1, height() - thickness - 2,
|
||||||
hx + 1, height() - 3);
|
hx + 1, height() - 3);
|
||||||
p.drawLine(hx + 1, height() - thickness - 3,
|
p.drawLine(hx + 1, height() - thickness - 3,
|
||||||
|
@ -728,7 +729,7 @@ void B2Client::doShape()
|
||||||
}
|
}
|
||||||
if (t.right() < width() - 1) {
|
if (t.right() < width() - 1) {
|
||||||
mask -= QRect(width() - 1,
|
mask -= QRect(width() - 1,
|
||||||
t.height() - thickness, 1, 1); // top right point
|
t.height() - thickness, 1, 1); //top right point
|
||||||
mask -= QRect(t.right() + 1, 0,
|
mask -= QRect(t.right() + 1, 0,
|
||||||
width() - t.right() - 1, t.height() - thickness);
|
width() - t.right() - 1, t.height() - thickness);
|
||||||
}
|
}
|
||||||
|
@ -855,7 +856,7 @@ void B2Client::activeChange()
|
||||||
titlebar->repaint();
|
titlebar->repaint();
|
||||||
|
|
||||||
QColor c = options()->palette(
|
QColor c = options()->palette(
|
||||||
KDecoration::ColorTitleBar, isActive()).color(QPalette::Active, QPalette::Button);
|
KDecoration::ColorTitleBar, isActive()).color(QPalette::Active, QPalette::Button);
|
||||||
|
|
||||||
for (int i = 0; i < BtnCount; i++)
|
for (int i = 0; i < BtnCount; i++)
|
||||||
if (button[i]) {
|
if (button[i]) {
|
||||||
|
@ -871,7 +872,7 @@ void B2Client::shadeChange()
|
||||||
g->activate();
|
g->activate();
|
||||||
doShape();
|
doShape();
|
||||||
if (B2Button *b = button[BtnShade]) {
|
if (B2Button *b = button[BtnShade]) {
|
||||||
b->setToolTip(isSetShade() ? i18n("Unshade") : i18n("Shade"));
|
b->setToolTip( isSetShade() ? i18n("Unshade") : i18n("Shade"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -939,7 +940,7 @@ void B2Client::unobscureTitlebar()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
in_unobs = 1;
|
in_unobs = 1;
|
||||||
QRegion reg(QRect(0, 0, width(), buttonSize + 4));
|
QRegion reg(QRect(0,0,width(), buttonSize + 4));
|
||||||
reg = unobscuredRegion(reg);
|
reg = unobscuredRegion(reg);
|
||||||
if (!reg.isEmpty()) {
|
if (!reg.isEmpty()) {
|
||||||
// there is at least _one_ pixel from our title area, which is not
|
// there is at least _one_ pixel from our title area, which is not
|
||||||
|
@ -954,8 +955,8 @@ void B2Client::unobscureTitlebar()
|
||||||
static void redraw_pixmaps()
|
static void redraw_pixmaps()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
QPalette aGrp = options()->palette(KDecoration::ColorButtonBg, true);
|
QPalette aGrp = options()->palette(KDecoration::ColorButtonBg, true);
|
||||||
QPalette iGrp = options()->palette(KDecoration::ColorButtonBg, false);
|
QPalette iGrp = options()->palette(KDecoration::ColorButtonBg, false);
|
||||||
|
|
||||||
// close
|
// close
|
||||||
drawB2Rect(PIXMAP_A(P_CLOSE), aGrp.color( QPalette::Button ), false);
|
drawB2Rect(PIXMAP_A(P_CLOSE), aGrp.color( QPalette::Button ), false);
|
||||||
|
@ -1136,10 +1137,10 @@ bool B2Client::drawbound(const QRect& geom, bool clear)
|
||||||
if (barRight > geom.right()) barRight = geom.right();
|
if (barRight > geom.right()) barRight = geom.right();
|
||||||
// line width is 5 pixels, so compensate for the 2 outer pixels (#88657)
|
// line width is 5 pixels, so compensate for the 2 outer pixels (#88657)
|
||||||
QRect g = geom;
|
QRect g = geom;
|
||||||
g.setLeft(g.left() + 2);
|
g.setLeft( g.left() + 2 );
|
||||||
g.setTop(g.top() + 2);
|
g.setTop( g.top() + 2 );
|
||||||
g.setRight(g.right() - 2);
|
g.setRight( g.right() - 2 );
|
||||||
g.setBottom(g.bottom() - 2);
|
g.setBottom( g.bottom() - 2 );
|
||||||
frameTop += 2;
|
frameTop += 2;
|
||||||
barLeft += 2;
|
barLeft += 2;
|
||||||
barRight -= 2;
|
barRight -= 2;
|
||||||
|
@ -1208,7 +1209,7 @@ B2Button::B2Button(B2Client *_client, QWidget *parent,
|
||||||
client = _client;
|
client = _client;
|
||||||
useMiniIcon = false;
|
useMiniIcon = false;
|
||||||
setFixedSize(buttonSize, buttonSize);
|
setFixedSize(buttonSize, buttonSize);
|
||||||
this->setToolTip(tip);
|
this->setToolTip( tip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1231,8 +1232,7 @@ void B2Button::drawButton(QPainter *p)
|
||||||
p->fillRect(rect(), bg);
|
p->fillRect(rect(), bg);
|
||||||
}
|
}
|
||||||
if (useMiniIcon) {
|
if (useMiniIcon) {
|
||||||
QPixmap miniIcon = client->icon().pixmap(
|
QPixmap miniIcon = client->icon().pixmap(style()->pixelMetric( QStyle::PM_SmallIconSize ),
|
||||||
style()->pixelMetric(QStyle::PM_SmallIconSize),
|
|
||||||
client->isActive() ? QIcon::Normal : QIcon::Disabled);
|
client->isActive() ? QIcon::Normal : QIcon::Disabled);
|
||||||
p->drawPixmap((width() - miniIcon.width()) / 2,
|
p->drawPixmap((width() - miniIcon.width()) / 2,
|
||||||
(height() - miniIcon.height()) / 2, miniIcon);
|
(height() - miniIcon.height()) / 2, miniIcon);
|
||||||
|
@ -1386,7 +1386,7 @@ void B2Titlebar::resizeEvent(QResizeEvent *)
|
||||||
|
|
||||||
void B2Titlebar::paintEvent(QPaintEvent *)
|
void B2Titlebar::paintEvent(QPaintEvent *)
|
||||||
{
|
{
|
||||||
if (client->isActive())
|
if(client->isActive())
|
||||||
bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),
|
bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),
|
||||||
titleBuffer.height());
|
titleBuffer.height());
|
||||||
else {
|
else {
|
||||||
|
@ -1436,6 +1436,6 @@ void B2Titlebar::mouseMoveEvent(QMouseEvent * e)
|
||||||
|
|
||||||
#include "b2client.moc"
|
#include "b2client.moc"
|
||||||
|
|
||||||
// vim: sw=4 ts=8
|
// vim: sw=4
|
||||||
|
|
||||||
#endif // CLIENTS/B2/B2CLIENT.CPP
|
#endif // CLIENTS/B2/B2CLIENT.CPP
|
||||||
|
|
|
@ -294,7 +294,8 @@ ModernButton::ModernButton(ButtonType type, ModernSys *parent, const char *name)
|
||||||
setObjectName( name );
|
setObjectName( name );
|
||||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||||
|
|
||||||
QBitmap mask = QBitmap::fromData( QSize(14, 15), QPixmap::defaultDepth() > 8 ? btnhighcolor_mask_bits : lowcolor_mask_bits);
|
QBitmap mask(14, 15, QPixmap::defaultDepth() > 8 ?
|
||||||
|
btnhighcolor_mask_bits : lowcolor_mask_bits, true);
|
||||||
resize(14, 15);
|
resize(14, 15);
|
||||||
|
|
||||||
setMask(mask);
|
setMask(mask);
|
||||||
|
@ -343,7 +344,7 @@ void ModernButton::reset(unsigned long changed)
|
||||||
void ModernButton::setBitmap(const unsigned char *bitmap)
|
void ModernButton::setBitmap(const unsigned char *bitmap)
|
||||||
{
|
{
|
||||||
if (bitmap)
|
if (bitmap)
|
||||||
deco = QBitmap::fromData( QSize(8, 8), bitmap);
|
deco = QBitmap(8, 8, bitmap, true);
|
||||||
else {
|
else {
|
||||||
deco = QBitmap(8,8);
|
deco = QBitmap(8,8);
|
||||||
deco.fill(Qt::color0);
|
deco.fill(Qt::color0);
|
||||||
|
|
|
@ -288,7 +288,7 @@ void RedmondButton::setBitmap(const unsigned char *bitmap)
|
||||||
pix = QPixmap();
|
pix = QPixmap();
|
||||||
|
|
||||||
if (bitmap)
|
if (bitmap)
|
||||||
deco = QBitmap::fromData( QSize(10, 10), bitmap);
|
deco = QBitmap(10, 10, bitmap, true);
|
||||||
else {
|
else {
|
||||||
deco = QBitmap(10,10);
|
deco = QBitmap(10,10);
|
||||||
deco.fill(Qt::color0);
|
deco.fill(Qt::color0);
|
||||||
|
|
|
@ -531,11 +531,8 @@ void KWinDecorationModule::save()
|
||||||
emit pluginSave( kwinConfig );
|
emit pluginSave( kwinConfig );
|
||||||
|
|
||||||
kwinConfig.sync();
|
kwinConfig.sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
#include "mouse.h"
|
#include "mouse.h"
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
static KComponentData *_kcmkwm = 0;
|
static KComponentData *_kcmkwm = 0;
|
||||||
|
@ -179,12 +180,12 @@ void KWinOptions::save()
|
||||||
emit KCModule::changed( false );
|
emit KCModule::changed( false );
|
||||||
// Send signal to kwin
|
// Send signal to kwin
|
||||||
mConfig->sync();
|
mConfig->sync();
|
||||||
// Send signal to all kwin instances
|
#ifdef __GNUC__
|
||||||
QDBusMessage message =
|
#warning D-BUS TODO
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
// All these calls in kcmkwin modules should be actually kwin*, because of multihead.
|
||||||
QDBusConnection::sessionBus().send(message);
|
#endif
|
||||||
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
|
kwin.call( "reconfigure" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -259,11 +260,8 @@ void KActionsOptions::save()
|
||||||
emit KCModule::changed( false );
|
emit KCModule::changed( false );
|
||||||
// Send signal to kwin
|
// Send signal to kwin
|
||||||
mConfig->sync();
|
mConfig->sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <kmessagebox.h>
|
#include <kmessagebox.h>
|
||||||
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kcolorbutton.h>
|
#include <kcolorbutton.h>
|
||||||
#include <kconfig.h>
|
#include <kconfig.h>
|
||||||
|
@ -57,6 +56,7 @@
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
|
|
||||||
// kwin config keywords
|
// kwin config keywords
|
||||||
#define KWIN_FOCUS "FocusPolicy"
|
#define KWIN_FOCUS "FocusPolicy"
|
||||||
#define KWIN_PLACEMENT "Placement"
|
#define KWIN_PLACEMENT "Placement"
|
||||||
|
@ -496,10 +496,8 @@ void KFocusConfig::save( void )
|
||||||
if (standAlone)
|
if (standAlone)
|
||||||
{
|
{
|
||||||
config->sync();
|
config->sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
}
|
}
|
||||||
emit KCModule::changed(false);
|
emit KCModule::changed(false);
|
||||||
}
|
}
|
||||||
|
@ -690,7 +688,7 @@ void KAdvancedConfig::load( void )
|
||||||
setShadeHover(config->readEntry(KWIN_SHADEHOVER, false));
|
setShadeHover(config->readEntry(KWIN_SHADEHOVER, false));
|
||||||
setShadeHoverInterval(config->readEntry(KWIN_SHADEHOVER_INTERVAL, 250));
|
setShadeHoverInterval(config->readEntry(KWIN_SHADEHOVER_INTERVAL, 250));
|
||||||
|
|
||||||
setElectricBorders(config->readEntry(KWM_ELECTRIC_BORDER, 0));
|
setElectricBorders(config->readEntry(KWM_ELECTRIC_BORDER, false));
|
||||||
setElectricBorderDelay(config->readEntry(KWM_ELECTRIC_BORDER_DELAY, 150));
|
setElectricBorderDelay(config->readEntry(KWM_ELECTRIC_BORDER_DELAY, 150));
|
||||||
|
|
||||||
// setFocusStealing( config->readEntry(KWIN_FOCUS_STEALING, 2 ));
|
// setFocusStealing( config->readEntry(KWIN_FOCUS_STEALING, 2 ));
|
||||||
|
@ -725,11 +723,8 @@ void KAdvancedConfig::save( void )
|
||||||
if (standAlone)
|
if (standAlone)
|
||||||
{
|
{
|
||||||
config->sync();
|
config->sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
emit KCModule::changed(false);
|
emit KCModule::changed(false);
|
||||||
}
|
}
|
||||||
|
@ -1192,10 +1187,8 @@ void KMovingConfig::save( void )
|
||||||
if (standAlone)
|
if (standAlone)
|
||||||
{
|
{
|
||||||
config->sync();
|
config->sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
}
|
}
|
||||||
emit KCModule::changed(false);
|
emit KCModule::changed(false);
|
||||||
}
|
}
|
||||||
|
@ -1261,8 +1254,6 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, co
|
||||||
"And if your GPU provides hardware-accelerated Xrender support (mainly nVidia cards):<br><br>"
|
"And if your GPU provides hardware-accelerated Xrender support (mainly nVidia cards):<br><br>"
|
||||||
"<i>Option \"RenderAccel\" \"true\"</i><br>"
|
"<i>Option \"RenderAccel\" \"true\"</i><br>"
|
||||||
"In <i>Section \"Device\"</i></qt>"), this);
|
"In <i>Section \"Device\"</i></qt>"), this);
|
||||||
label->setOpenExternalLinks(true);
|
|
||||||
label->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
|
|
||||||
lay->addWidget(label);
|
lay->addWidget(label);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1483,10 +1474,8 @@ void KTranslucencyConfig::load( void )
|
||||||
|
|
||||||
if (!kompmgrAvailable_)
|
if (!kompmgrAvailable_)
|
||||||
return;
|
return;
|
||||||
config->setGroup( "Notification Messages" );
|
|
||||||
useTranslucency->setChecked(config->readEntry("UseTranslucency", false));
|
|
||||||
|
|
||||||
config->setGroup( "Translucency" );
|
config->setGroup( "Translucency" );
|
||||||
|
useTranslucency->setChecked(config->readEntry("UseTranslucency", false));
|
||||||
activeWindowTransparency->setChecked(config->readEntry("TranslucentActiveWindows", false));
|
activeWindowTransparency->setChecked(config->readEntry("TranslucentActiveWindows", false));
|
||||||
inactiveWindowTransparency->setChecked(config->readEntry("TranslucentInactiveWindows", true));
|
inactiveWindowTransparency->setChecked(config->readEntry("TranslucentInactiveWindows", true));
|
||||||
movingWindowTransparency->setChecked(config->readEntry("TranslucentMovingWindows", false));
|
movingWindowTransparency->setChecked(config->readEntry("TranslucentMovingWindows", false));
|
||||||
|
@ -1546,10 +1535,8 @@ void KTranslucencyConfig::save( void )
|
||||||
{
|
{
|
||||||
if (!kompmgrAvailable_)
|
if (!kompmgrAvailable_)
|
||||||
return;
|
return;
|
||||||
config->setGroup( "Notification Messages" );
|
|
||||||
config->writeEntry("UseTranslucency",useTranslucency->isChecked());
|
|
||||||
|
|
||||||
config->setGroup( "Translucency" );
|
config->setGroup( "Translucency" );
|
||||||
|
config->writeEntry("UseTranslucency",useTranslucency->isChecked());
|
||||||
config->writeEntry("TranslucentActiveWindows",activeWindowTransparency->isChecked());
|
config->writeEntry("TranslucentActiveWindows",activeWindowTransparency->isChecked());
|
||||||
config->writeEntry("TranslucentInactiveWindows",inactiveWindowTransparency->isChecked());
|
config->writeEntry("TranslucentInactiveWindows",inactiveWindowTransparency->isChecked());
|
||||||
config->writeEntry("TranslucentMovingWindows",movingWindowTransparency->isChecked());
|
config->writeEntry("TranslucentMovingWindows",movingWindowTransparency->isChecked());
|
||||||
|
@ -1599,11 +1586,8 @@ void KTranslucencyConfig::save( void )
|
||||||
if (standAlone)
|
if (standAlone)
|
||||||
{
|
{
|
||||||
config->sync();
|
config->sync();
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
emit KCModule::changed(false);
|
emit KCModule::changed(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kwin.h>
|
#include <kwin.h>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QtDBus>
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <fixx11h.h>
|
#include <fixx11h.h>
|
||||||
|
|
||||||
|
@ -256,10 +257,8 @@ static int edit( Window wid, bool whole_app )
|
||||||
delete orig_rule;
|
delete orig_rule;
|
||||||
}
|
}
|
||||||
saveRules( rules );
|
saveRules( rules );
|
||||||
// Send signal to all kwin instances
|
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||||
QDBusMessage message =
|
kwin.call( "reconfigure" );
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "ruleslist.h"
|
#include "ruleslist.h"
|
||||||
|
|
||||||
#include <klistwidget.h>
|
|
||||||
#include <kpushbutton.h>
|
#include <kpushbutton.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
|
@ -29,14 +28,14 @@
|
||||||
namespace KWinInternal
|
namespace KWinInternal
|
||||||
{
|
{
|
||||||
|
|
||||||
KCMRulesList::KCMRulesList( QWidget* parent)
|
KCMRulesList::KCMRulesList( QWidget* parent, const char* name )
|
||||||
: KCMRulesListBase( parent)
|
: KCMRulesListBase( parent, name )
|
||||||
{
|
{
|
||||||
// connect both current/selected, so that current==selected (stupid QListBox :( )
|
// connect both current/selected, so that current==selected (stupid QListBox :( )
|
||||||
connect( rules_listbox, SIGNAL(itemChanged(QListWidgetItem*)),
|
connect( rules_listbox, SIGNAL( currentChanged( Q3ListBoxItem* )),
|
||||||
SLOT(activeChanged(QListWidgetItem*)));
|
SLOT( activeChanged( Q3ListBoxItem*)));
|
||||||
connect( rules_listbox, SIGNAL( selectionChanged( QListWidgetItem* )),
|
connect( rules_listbox, SIGNAL( selectionChanged( Q3ListBoxItem* )),
|
||||||
SLOT( activeChanged( QListWidgetItem*)));
|
SLOT( activeChanged( Q3ListBoxItem*)));
|
||||||
connect( new_button, SIGNAL( clicked()),
|
connect( new_button, SIGNAL( clicked()),
|
||||||
SLOT( newClicked()));
|
SLOT( newClicked()));
|
||||||
connect( modify_button, SIGNAL( clicked()),
|
connect( modify_button, SIGNAL( clicked()),
|
||||||
|
@ -47,7 +46,7 @@ KCMRulesList::KCMRulesList( QWidget* parent)
|
||||||
SLOT( moveupClicked()));
|
SLOT( moveupClicked()));
|
||||||
connect( movedown_button, SIGNAL( clicked()),
|
connect( movedown_button, SIGNAL( clicked()),
|
||||||
SLOT( movedownClicked()));
|
SLOT( movedownClicked()));
|
||||||
connect( rules_listbox, SIGNAL(itemDoubleClicked(QListWidgetItem*) ),
|
connect( rules_listbox, SIGNAL( doubleClicked ( Q3ListBoxItem * ) ),
|
||||||
SLOT( modifyClicked()));
|
SLOT( modifyClicked()));
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
@ -61,16 +60,14 @@ KCMRulesList::~KCMRulesList()
|
||||||
rules.clear();
|
rules.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMRulesList::activeChanged( QListWidgetItem* item )
|
void KCMRulesList::activeChanged( Q3ListBoxItem* item )
|
||||||
{
|
{
|
||||||
int itemRow = rules_listbox->row(item);
|
|
||||||
|
|
||||||
if( item != NULL )
|
if( item != NULL )
|
||||||
item->setSelected( true ); // make current==selected
|
rules_listbox->setSelected( item, true ); // make current==selected
|
||||||
modify_button->setEnabled( item != NULL );
|
modify_button->setEnabled( item != NULL );
|
||||||
delete_button->setEnabled( item != NULL );
|
delete_button->setEnabled( item != NULL );
|
||||||
moveup_button->setEnabled( item != NULL && itemRow > 0 );
|
moveup_button->setEnabled( item != NULL && item->prev() != NULL );
|
||||||
movedown_button->setEnabled( item != NULL && itemRow < (rules_listbox->count()-1) );
|
movedown_button->setEnabled( item != NULL && item->next() != NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMRulesList::newClicked()
|
void KCMRulesList::newClicked()
|
||||||
|
@ -79,16 +76,16 @@ void KCMRulesList::newClicked()
|
||||||
Rules* rule = dlg.edit( NULL, 0, false );
|
Rules* rule = dlg.edit( NULL, 0, false );
|
||||||
if( rule == NULL )
|
if( rule == NULL )
|
||||||
return;
|
return;
|
||||||
int pos = rules_listbox->currentRow() + 1;
|
int pos = rules_listbox->currentItem() + 1;
|
||||||
rules_listbox->insertItem( pos , rule->description );
|
rules_listbox->insertItem( rule->description, pos );
|
||||||
rules_listbox->item(pos)->setSelected( true );
|
rules_listbox->setSelected( pos, true );
|
||||||
rules.insert( rules.begin() + pos, rule );
|
rules.insert( rules.begin() + pos, rule );
|
||||||
emit changed( true );
|
emit changed( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMRulesList::modifyClicked()
|
void KCMRulesList::modifyClicked()
|
||||||
{
|
{
|
||||||
int pos = rules_listbox->currentRow();
|
int pos = rules_listbox->currentItem();
|
||||||
if ( pos == -1 )
|
if ( pos == -1 )
|
||||||
return;
|
return;
|
||||||
RulesDialog dlg;
|
RulesDialog dlg;
|
||||||
|
@ -97,29 +94,29 @@ void KCMRulesList::modifyClicked()
|
||||||
return;
|
return;
|
||||||
delete rules[ pos ];
|
delete rules[ pos ];
|
||||||
rules[ pos ] = rule;
|
rules[ pos ] = rule;
|
||||||
rules_listbox->item(pos)->setText( rule->description );
|
rules_listbox->changeItem( rule->description, pos );
|
||||||
emit changed( true );
|
emit changed( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMRulesList::deleteClicked()
|
void KCMRulesList::deleteClicked()
|
||||||
{
|
{
|
||||||
int pos = rules_listbox->currentRow();
|
int pos = rules_listbox->currentItem();
|
||||||
assert( pos != -1 );
|
assert( pos != -1 );
|
||||||
delete rules_listbox->takeItem( pos );
|
rules_listbox->removeItem( pos );
|
||||||
rules.erase( rules.begin() + pos );
|
rules.erase( rules.begin() + pos );
|
||||||
emit changed( true );
|
emit changed( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMRulesList::moveupClicked()
|
void KCMRulesList::moveupClicked()
|
||||||
{
|
{
|
||||||
int pos = rules_listbox->currentRow();
|
int pos = rules_listbox->currentItem();
|
||||||
assert( pos != -1 );
|
assert( pos != -1 );
|
||||||
if( pos > 0 )
|
if( pos > 0 )
|
||||||
{
|
{
|
||||||
QString txt = rules_listbox->item(pos)->text();
|
QString txt = rules_listbox->text( pos );
|
||||||
delete rules_listbox->takeItem( pos );
|
rules_listbox->removeItem( pos );
|
||||||
rules_listbox->insertItem( pos - 1 , txt );
|
rules_listbox->insertItem( txt, pos - 1 );
|
||||||
rules_listbox->item(pos-1)->setSelected( true );
|
rules_listbox->setSelected( pos - 1, true );
|
||||||
Rules* rule = rules[ pos ];
|
Rules* rule = rules[ pos ];
|
||||||
rules[ pos ] = rules[ pos - 1 ];
|
rules[ pos ] = rules[ pos - 1 ];
|
||||||
rules[ pos - 1 ] = rule;
|
rules[ pos - 1 ] = rule;
|
||||||
|
@ -129,14 +126,14 @@ void KCMRulesList::moveupClicked()
|
||||||
|
|
||||||
void KCMRulesList::movedownClicked()
|
void KCMRulesList::movedownClicked()
|
||||||
{
|
{
|
||||||
int pos = rules_listbox->currentRow();
|
int pos = rules_listbox->currentItem();
|
||||||
assert( pos != -1 );
|
assert( pos != -1 );
|
||||||
if( pos < int( rules_listbox->count()) - 1 )
|
if( pos < int( rules_listbox->count()) - 1 )
|
||||||
{
|
{
|
||||||
QString txt = rules_listbox->item(pos)->text();
|
QString txt = rules_listbox->text( pos );
|
||||||
delete rules_listbox->takeItem( pos );
|
rules_listbox->removeItem( pos );
|
||||||
rules_listbox->insertItem( pos + 1 , txt);
|
rules_listbox->insertItem( txt, pos + 1 );
|
||||||
rules_listbox->item(pos+1)->setSelected( true );
|
rules_listbox->setSelected( pos + 1, true );
|
||||||
Rules* rule = rules[ pos ];
|
Rules* rule = rules[ pos ];
|
||||||
rules[ pos ] = rules[ pos + 1 ];
|
rules[ pos ] = rules[ pos + 1 ];
|
||||||
rules[ pos + 1 ] = rule;
|
rules[ pos + 1 ] = rule;
|
||||||
|
@ -163,10 +160,10 @@ void KCMRulesList::load()
|
||||||
cfg.changeGroup( QString::number( i ));
|
cfg.changeGroup( QString::number( i ));
|
||||||
Rules* rule = new Rules( cfg );
|
Rules* rule = new Rules( cfg );
|
||||||
rules.append( rule );
|
rules.append( rule );
|
||||||
rules_listbox->addItem( rule->description );
|
rules_listbox->insertItem( rule->description );
|
||||||
}
|
}
|
||||||
if( rules.count() > 0 )
|
if( rules.count() > 0 )
|
||||||
rules_listbox->item(0)->setSelected( true );
|
rules_listbox->setSelected( 0, true );
|
||||||
else
|
else
|
||||||
activeChanged( NULL );
|
activeChanged( NULL );
|
||||||
}
|
}
|
||||||
|
|
17
main.cpp
17
main.cpp
|
@ -14,7 +14,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <kcmdlineargs.h>
|
#include <kcmdlineargs.h>
|
||||||
|
@ -26,12 +25,13 @@ License. See the file "COPYING" for the exact licensing terms.
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fixx11h.h>
|
#include <fixx11h.h>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QtDBus>
|
||||||
#include "ksplash_interface.h"
|
#include <kglobal.h>
|
||||||
|
|
||||||
#include "atoms.h"
|
#include "atoms.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "sm.h"
|
#include "sm.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
#define INT8 _X11INT8
|
#define INT8 _X11INT8
|
||||||
#define INT32 _X11INT32
|
#define INT32 _X11INT32
|
||||||
|
@ -121,6 +121,8 @@ Application::Application( )
|
||||||
options = new Options;
|
options = new Options;
|
||||||
atoms = new Atoms;
|
atoms = new Atoms;
|
||||||
|
|
||||||
|
initting = false; // TODO
|
||||||
|
|
||||||
// create workspace.
|
// create workspace.
|
||||||
(void) new Workspace( isSessionRestored() );
|
(void) new Workspace( isSessionRestored() );
|
||||||
|
|
||||||
|
@ -128,9 +130,8 @@ Application::Application( )
|
||||||
|
|
||||||
initting = false; // startup done, we are up and running now.
|
initting = false; // startup done, we are up and running now.
|
||||||
|
|
||||||
org::kde::KSplash ksplash("org.kde.ksplash", "/KSplash", QDBusConnection::sessionBus());
|
QDBusInterface ksplash( "org.kde.ksplash", "/ksplash", "org.kde.KSplash" );
|
||||||
ksplash.upAndRunning(QString( "wm started" ));
|
ksplash.call( "upAndRunning", QString( "wm started" ));
|
||||||
|
|
||||||
XEvent e;
|
XEvent e;
|
||||||
e.xclient.type = ClientMessage;
|
e.xclient.type = ClientMessage;
|
||||||
e.xclient.message_type = XInternAtom( display(), "_KDE_SPLASH_PROGRESS", False );
|
e.xclient.message_type = XInternAtom( display(), "_KDE_SPLASH_PROGRESS", False );
|
||||||
|
@ -147,6 +148,8 @@ Application::~Application()
|
||||||
if( owner.ownerWindow() != None ) // if there was no --replace (no new WM)
|
if( owner.ownerWindow() != None ) // if there was no --replace (no new WM)
|
||||||
XSetInputFocus( display(), PointerRoot, RevertToPointerRoot, xTime() );
|
XSetInputFocus( display(), PointerRoot, RevertToPointerRoot, xTime() );
|
||||||
delete options;
|
delete options;
|
||||||
|
delete effects;
|
||||||
|
delete atoms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::lostSelection()
|
void Application::lostSelection()
|
||||||
|
@ -281,9 +284,9 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
|
||||||
|
|
||||||
QString appname;
|
QString appname;
|
||||||
if (KWinInternal::screen_number == 0)
|
if (KWinInternal::screen_number == 0)
|
||||||
appname = "org.kde.kwin";
|
appname = "kwin";
|
||||||
else
|
else
|
||||||
appname.sprintf("org.kde.kwin-screen-%d", KWinInternal::screen_number);
|
appname.sprintf("kwin-screen-%d", KWinInternal::screen_number);
|
||||||
|
|
||||||
QDBusConnection::sessionBus().interface()->registerService( appname, QDBusConnectionInterface::DontQueueService );
|
QDBusConnection::sessionBus().interface()->registerService( appname, QDBusConnectionInterface::DontQueueService );
|
||||||
|
|
||||||
|
|
24
options.cpp
24
options.cpp
|
@ -174,9 +174,8 @@ unsigned long Options::updateSettings()
|
||||||
CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing"));
|
CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing"));
|
||||||
|
|
||||||
//translucency settings - TODO
|
//translucency settings - TODO
|
||||||
config->setGroup( "Notification Messages" );
|
|
||||||
useTranslucency = config->readEntry("UseTranslucency", false);
|
|
||||||
config->setGroup( "Translucency");
|
config->setGroup( "Translucency");
|
||||||
|
useTranslucency = config->readEntry("UseTranslucency", true);
|
||||||
translucentActiveWindows = config->readEntry("TranslucentActiveWindows", false);
|
translucentActiveWindows = config->readEntry("TranslucentActiveWindows", false);
|
||||||
activeWindowOpacity = uint((config->readEntry("ActiveWindowOpacity", 100)/100.0)*0xFFFFFFFF);
|
activeWindowOpacity = uint((config->readEntry("ActiveWindowOpacity", 100)/100.0)*0xFFFFFFFF);
|
||||||
translucentInactiveWindows = config->readEntry("TranslucentInactiveWindows", false);
|
translucentInactiveWindows = config->readEntry("TranslucentInactiveWindows", false);
|
||||||
|
@ -195,6 +194,27 @@ unsigned long Options::updateSettings()
|
||||||
removeShadowsOnResize = config->readEntry("RemoveShadowsOnResize", true);
|
removeShadowsOnResize = config->readEntry("RemoveShadowsOnResize", true);
|
||||||
onlyDecoTranslucent = config->readEntry("OnlyDecoTranslucent", false);
|
onlyDecoTranslucent = config->readEntry("OnlyDecoTranslucent", false);
|
||||||
|
|
||||||
|
refreshRate = config->readEntry( "RefreshRate", 0 );
|
||||||
|
smoothScale = qBound( -1, config->readEntry( "SmoothScale", -1 ), 2 );
|
||||||
|
|
||||||
|
QString glmode = config->readEntry("GLMode", "TFP" ).upper();
|
||||||
|
if( glmode == "TFP" )
|
||||||
|
glMode = GLTFP;
|
||||||
|
else if( glmode == "SHM" )
|
||||||
|
glMode = GLSHM;
|
||||||
|
else
|
||||||
|
glMode = GLFallback;
|
||||||
|
glAlwaysRebind = config->readEntry("GLAlwaysRebind", false );
|
||||||
|
glDirect = config->readEntry("GLDirect", true );
|
||||||
|
glVSync = config->readEntry("GLVSync", true );
|
||||||
|
|
||||||
|
config->setGroup( "Effects" );
|
||||||
|
defaultEffects = config->readEntry( "Load", QStringList() << "ShowFps" << "Fade" );
|
||||||
|
|
||||||
|
config->setGroup( "EffectShowFps" );
|
||||||
|
effectShowFpsAlpha = config->readEntry( "Alpha", 0.5 );
|
||||||
|
effectShowFpsX = config->readEntry( "X", -10000 );
|
||||||
|
effectShowFpsY = config->readEntry( "Y", 0 );
|
||||||
// Read button tooltip animation effect from kdeglobals
|
// Read button tooltip animation effect from kdeglobals
|
||||||
// Since we want to allow users to enable window decoration tooltips
|
// Since we want to allow users to enable window decoration tooltips
|
||||||
// and not kstyle tooltips and vise-versa, we don't read the
|
// and not kstyle tooltips and vise-versa, we don't read the
|
||||||
|
|
|
@ -66,7 +66,7 @@ PopupInfo::~PopupInfo()
|
||||||
*/
|
*/
|
||||||
void PopupInfo::reset()
|
void PopupInfo::reset()
|
||||||
{
|
{
|
||||||
QRect r = KGlobalSettings::desktopGeometry(QCursor::pos());
|
QRect r = KGlobalSettings::desktopGeometry(cursorPos());
|
||||||
|
|
||||||
int w = fontMetrics().width( m_infoString ) + 30;
|
int w = fontMetrics().width( m_infoString ) + 30;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue