aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-09-15 19:02:00 -0400
committerKen Moore <moorekou@gmail.com>2015-09-15 19:02:00 -0400
commit043cb2ef441b4ee46961ed837fedab082db14ceb (patch)
tree8f070d92e9b589d2cce1b1f522dfaac0d4ca6631 /lumina-desktop
parentAdjust the theming of the calendar widgets so that the day/week are a bit mor... (diff)
downloadlumina-043cb2ef441b4ee46961ed837fedab082db14ceb.tar.gz
lumina-043cb2ef441b4ee46961ed837fedab082db14ceb.tar.bz2
lumina-043cb2ef441b4ee46961ed837fedab082db14ceb.zip
Finally fix up the system tray updates:
Found out that (at least on FreeBSD 10.2 right now), the xcb_damage_create() routine does absolutely nothing (no damage events ever sent out when the window changes). Switching this back to the Xlib XDamageCreate() routine makes it work perfectly again. Need to ask about this upstream and see if this is a known bug/regression in the XCB libraries.
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LXcbEventFilter.cpp1
-rw-r--r--lumina-desktop/panel-plugins/systemtray/LSysTray.cpp5
-rw-r--r--lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp16
3 files changed, 17 insertions, 5 deletions
diff --git a/lumina-desktop/LXcbEventFilter.cpp b/lumina-desktop/LXcbEventFilter.cpp
index a3a8147b..aa38002b 100644
--- a/lumina-desktop/LXcbEventFilter.cpp
+++ b/lumina-desktop/LXcbEventFilter.cpp
@@ -31,6 +31,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
if(stopping){ return false; } //don't do any parsing
//qDebug() << "New Event";
if(eventType=="xcb_generic_event_t"){
+ //qDebug() << " - XCB event";
//Convert to known event type (for X11 systems)
xcb_generic_event_t *ev = static_cast<xcb_generic_event_t *>(message);
//Now parse the event and emit signals as necessary
diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
index 220c7858..05c601e1 100644
--- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
@@ -150,8 +150,9 @@ void LSysTray::UpdateTrayWindow(WId win){
for(int i=0; i<trayIcons.length(); i++){
if(trayIcons[i]->appID()==win){
qDebug() << "System Tray: Update Window " << win;
- trayIcons[i]->update();
- QTimer::singleShot(1000, trayIcons[i], SLOT(update()) );
+ trayIcons[i]->repaint(); //don't use update() because we need an instant repaint (not a cached version)
+ //QTimer::singleShot(10, trayIcons[i], SLOT(repaint()) ); //re-paint in 10ms (give it a moment to settle)
+ //QTimer::singleShot(1000, trayIcons[i], SLOT(update()) );
return; //finished now
}
}
diff --git a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
index 3e26683f..01af6936 100644
--- a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
@@ -83,19 +83,29 @@ void TrayIcon::updateIcon(){
void TrayIcon::paintEvent(QPaintEvent *event){
QWidget::paintEvent(event); //make sure the background is already painted
if(AID!=0){
+ //Update the background on the tray app
+ //qDebug() << "Paint Tray Background";
+ //LSession::handle()->XCB->SetWindowBackground(this, this->geometry(), AID);
//qDebug() << "Paint Tray:" << AID;
QPainter painter(this);
//Now paint the tray app on top of the background
//qDebug() << " - Draw tray:" << AID << IID << this->winId();
//qDebug() << " - - " << event->rect().x() << event->rect().y() << event->rect().width() << event->rect().height();
//qDebug() << " - Get image:" << AID;
- QPixmap pix; //= WIN->icon().pixmap(this->size());
- //Try to grab the window directly with Qt
- QList<QScreen*> scrnlist = QApplication::screens();
+ QPixmap pix = LSession::handle()->XCB->TrayImage(AID); //= WIN->icon().pixmap(this->size());
+ //if(pix.isNull()){
+ //qDebug() << "Null Image - use Qt grab Window";
+ //Try to grab the window directly with Qt instead
+ /*QList<QScreen*> scrnlist = QApplication::screens();
for(int i=0; i<scrnlist.length(); i++){
pix = scrnlist[i]->grabWindow(AID);
break; //stop here
}
+ //}
+ if(pix.isNull()){
+ qDebug() << "Null Qt Pixmap - Use XCB grab image:";
+ pix = LSession::handle()->XCB->TrayImage(AID);
+ }*/
//qDebug() << " - Pix size:" << pix.size().width() << pix.size().height();
//qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height();
if(!pix.isNull()){
bgstack15