Changeset e6e5ccdf


Ignore:
Timestamp:
05/14/14 12:41:12 (12 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
441a9b7
Parents:
ff64089d
Message:

Add the (newly updated) taskmanager plugin for the panel. It still has a couple visual details to work out, so do not set it as used by default for now (although it is possible to manually add it to the toolbar with lumina-config).

Location:
lumina
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • lumina/libLumina/LuminaX11.cpp

    r0ccf75ef re6e5ccdf  
    1010QList<WId> LX11::WindowList(){ 
    1111  QList<WId> output; 
    12   //Method 1 - EWMH 
    13     //Openbox lists the windows split up between various atoms - combine all of them 
    14     //output << LX11::ActiveWindow(); 
    15     output << LX11::GetClientList(); 
    16     //output << LX11::GetClientStackingList(); 
    17    
    18    
    19   //Method 2 - ICCC 
    20   /*output = LX11::findChildren(QX11Info::appRootWindow(),4); 
    21   //Now go through them and filter out all the invalid windows 
    22   //Display *disp = QX11Info::display(); 
    23  
    24   for(int i=0; i<output.length(); i++){ 
    25     //Now filter 
    26     bool good = false; 
    27     //Check if this is a redirect window */ 
    28     /*WId leader = LX11::leaderWindow(output[i]); 
    29     if(leader !=0 && leader != output[i]){ 
    30       qDebug() << "Leader Found:" << output[i] << " -> " << leader; 
    31       output[i] = leader; //replace this window with the leader 
    32       //now go back one to check this window 
    33       i--; 
    34       continue; 
    35     }*/ 
    36     /* 
    37     //Now check for a usable window (either visible/invisible) 
    38     if( LX11::isNormalWindow(output[i],true) && !LX11::WindowClass(output[i]).isEmpty() ){ 
    39       good=true; 
    40     } 
    41      
    42     //Remove item from list if not good 
    43     if(!good){ 
    44       output.removeAt(i); 
    45       i--; //make sure we don't miss a window since the list index/length got decreased  
    46     }else{ 
    47       //Check if this is a redirect window 
    48       WId leader = LX11::leaderWindow(output[i]); 
    49       if(leader !=0 && leader != output[i]){ 
    50         qDebug() << "Leader Found:" << output[i] << " -> " << leader; 
    51         output[i] = leader; //replace this window with the leader 
    52       } 
    53     } 
    54   } 
    55   */ 
     12  output << LX11::GetClientList(); 
     13 
    5614   
    5715  //Validate windows 
    5816  for(int i=0; i<output.length(); i++){ 
    5917    bool remove=false; 
    60         QString name = LX11::WindowClass(output[i]); 
     18    QString name = LX11::WindowClass(output[i]); 
    6119    if(output[i] == 0){ remove=true; } 
    62     else if( name.startsWith("Lumina") || name.isEmpty() ){ remove=true; } 
     20    else if( name.startsWith("Lumina-DE") || name.isEmpty() ){  
     21        //qDebug() << "Trim Window:" << name; 
     22        remove=true;  
     23    } 
    6324    if(remove){ 
    6425      output.removeAt(i); 
     
    229190} 
    230191 
     192// ===== ValidWindowEvent() ===== 
     193bool LX11::ValidWindowEvent(Atom evAtom){ 
     194         
     195  if(evAtom == XInternAtom(QX11Info::display(),"_NET_CLIENT_LIST",false) ){ return true; } 
     196  else if( evAtom == XInternAtom(QX11Info::display(),"_NET_ACTIVE_WINDOW",false) ){ return true; } 
     197  else if( evAtom == XInternAtom(QX11Info::display(),"_NET_WM_NAME",false) ){ return true; } 
     198  else if( evAtom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_NAME",false) ){ return true; } 
     199  else if( evAtom == XInternAtom(QX11Info::display(),"_NET_WM_ICON_NAME",false) ){ return true; } 
     200  else if( evAtom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_ICON_NAME",false) ){ return true; } 
     201  else{ return false; } 
     202} 
     203 
    231204// ===== CloseWindow() ===== 
    232205void LX11::CloseWindow(WId win){ 
    233 XClientMessageEvent msg; 
    234     msg.type = ClientMessage; 
    235     msg.window = win; 
    236     msg.message_type = XInternAtom(QX11Info::display(),"_NET_CLOSE_WINDOW",true); 
    237     msg.format = 32; 
    238     msg.data.l[0] = CurrentTime; 
    239     msg.data.l[1] = 1; //Normal Window state 
    240     msg.data.l[2] = 0; 
    241     msg.data.l[3] = 0; 
    242     msg.data.l[4] = 0; 
    243   XSendEvent(QX11Info::display(), QX11Info::appRootWindow(), False, StructureNotifyMask, (XEvent*)&msg);                 
     206  Display *display = QX11Info::display(); 
     207  Window rootWindow = QX11Info::appRootWindow(); 
     208 
     209  Atom atom = XInternAtom(display, "_NET_CLOSE_WINDOW", False); 
     210  XEvent xevent; 
     211  xevent.type                 = ClientMessage; 
     212  xevent.xclient.type         = ClientMessage;  
     213  xevent.xclient.display      = display; 
     214  xevent.xclient.window       = win; 
     215  xevent.xclient.message_type = atom; 
     216  xevent.xclient.format       = 32; 
     217  xevent.xclient.data.l[0]    = CurrentTime; 
     218  xevent.xclient.data.l[1]    = 2; 
     219  xevent.xclient.data.l[2]    = 0; 
     220  xevent.xclient.data.l[3]    = 0; 
     221  xevent.xclient.data.l[4]    = 0; 
     222  XSendEvent(display, rootWindow, False, SubstructureNotifyMask | SubstructureRedirectMask, &xevent); 
     223 
     224  XFlush(display); 
    244225} 
    245226 
     
    253234  Display *disp = QX11Info::display(); 
    254235    XMapRaised(disp, win); //make it visible again and raise it to the top 
     236} 
     237 
     238// ===== ActivateWindow() ===== 
     239void LX11::ActivateWindow(WId win){ 
     240  Display *display = QX11Info::display(); 
     241  Window rootWindow = QX11Info::appRootWindow(); 
     242 
     243  Atom atom = XInternAtom(display, "_NET_ACTIVE_WINDOW", False); 
     244  XEvent xevent; 
     245  xevent.type                 = ClientMessage; 
     246  xevent.xclient.type         = ClientMessage;  
     247  xevent.xclient.display      = display; 
     248  xevent.xclient.window       = win; 
     249  xevent.xclient.message_type = atom; 
     250  xevent.xclient.format       = 32; 
     251  xevent.xclient.data.l[0]    = 2; 
     252  xevent.xclient.data.l[1]    = CurrentTime; 
     253  xevent.xclient.data.l[2]    = LX11::ActiveWindow(); 
     254  xevent.xclient.data.l[3]    = 0; 
     255  xevent.xclient.data.l[4]    = 0; 
     256  XSendEvent(display, rootWindow, False, SubstructureNotifyMask | SubstructureRedirectMask, &xevent); 
     257 
     258  XFlush(display); 
    255259} 
    256260 
     
    352356} 
    353357 
    354 // ===== WindowPixmap() ===== 
    355 QPixmap LX11::WindowPixmap(WId win){ 
     358// ===== WindowIcon() ===== 
     359QIcon LX11::WindowIcon(WId win){ 
    356360  //Use the _NET_WM_ICON value instead of the WMHints pixmaps 
    357361        // - the pixmaps are very unstable and erratic 
    358   QPixmap pix; 
     362  QIcon icon; 
    359363  Display *disp = QX11Info::display(); 
    360364  Atom type; 
     
    362366  int format; 
    363367  unsigned long num, bytes; 
    364   unsigned char *data = 0; 
    365   int status = XGetWindowProperty( disp, win, SA, XA_CARDINAL, ~(0L), false, AnyPropertyType, 
    366                                 &type, &format, &num, &bytes, &data); 
    367   if(status != 0 && data != 0){ 
     368  unsigned long *data = 0; 
     369  XGetWindowProperty( disp, win, SA, 0, LONG_MAX, False, AnyPropertyType, 
     370                                &type, &format, &num, &bytes, (uchar**)&data); 
     371  if(data != 0){ 
     372    //qDebug() << "Icon Data Found:" << win; 
     373    ulong* dat = data; 
     374    while(dat < data+num){ //consider the fact that there may be multiple graphical layers 
    368375    //Now convert it into a Qt image 
    369376    // - first 2 elements are width and height 
    370377    // - data in rows from left to right and top to bottom 
    371     QImage image(data[0], data[1], QImage::Format_ARGB32); //initial setup 
    372         for(int i=0; i<image.byteCount()/4; ++i){ 
    373           ((uint*)image.bits())[i] = data[i+2]; //remember the first 2 element offset 
     378      QImage image(dat[0], dat[1], QImage::Format_ARGB32); //initial setup 
     379        dat+=2; //remember the first 2 element offset 
     380        for(int i=0; i<image.byteCount()/4; ++i, ++dat){ 
     381          ((uint*)image.bits())[i] = *dat;  
    374382        } 
    375     pix = QPixmap::fromImage(image); //Now convert it into the pixmap 
    376     XFree(data); 
    377   } 
    378    
    379   if(pix.isNull()){ 
    380     //Fall back on the old method 
    381     XWMHints *hints = XGetWMHints(QX11Info::display(), win); 
    382     if(hints != 0){ 
    383       if( hints->flags & IconWindowHint ){ 
    384         pix = QPixmap::grabWindow( hints->icon_window ); 
    385       } 
    386       else if( hints->flags & IconPixmapHint ){ 
    387         pix = QPixmap::fromX11Pixmap( hints->icon_pixmap ) ; 
    388       } 
    389       if( hints->flags & IconMaskHint ){ 
    390         pix.setMask( QPixmap::fromX11Pixmap(hints->icon_mask).createHeuristicMask() ); 
    391       } 
    392       XFree(hints); 
    393     } 
    394   } 
    395   return pix; 
    396 } 
     383      icon.addPixmap(QPixmap::fromImage(image)); //layer this pixmap onto the icon 
     384    } 
     385    XFree(data); 
     386  } 
     387  return icon; 
     388} 
     389 
    397390 
    398391// ===== GetWindowState() ===== 
    399 LX11::WINDOWSTATE LX11::GetWindowState(WId win, bool forDisplay){ 
    400   //forDisplay lets the function know whether it needs to follow the TaskBar/Pager ignore rules 
    401          
    402   //OPENBOX DOES NOT SUPPORT THE _NET_WM_STATE VALUES (4/7/14) 
     392LX11::WINDOWSTATE LX11::GetWindowState(WId win){ 
     393 
    403394  Display *disp = QX11Info::display(); /* 
    404395  Atom SA = XInternAtom(disp, "_NET_WM_STATE", false); 
     
    436427  LX11::WINDOWSTATE state = LX11::VISIBLE; 
    437428  if(state==LX11::VISIBLE){ 
    438     //Use another method for detecting whether the window is actually mapped (more reliable) 
    439     /*Atom STATE = XInternAtom(disp, "WM_STATE", false); 
    440     //re-use the other variables 
    441     data = 0; 
    442     if( 0 != XGetWindowProperty( disp, win, STATE, 0, ~(0L), false, AnyPropertyType, &type, &format, &num, &bytes, &data) ){ 
    443       qint32 *array = (qint32 *) data; 
    444       if(array[0]==NormalState){ state = LX11::VISIBLE; } 
    445       else if(array[0]==IconicState){ state = LX11::INVISIBLE; } 
    446       else{ 
    447         qDebug() << "Unknown State:" << win; 
    448         state = LX11::IGNORE; 
    449       } 
    450     } 
    451     */ 
    452429    XWindowAttributes attr; 
    453430    if( 0 != XGetWindowAttributes(disp, win, &attr) ){ 
  • lumina/libLumina/LuminaX11.h

    r7e29143 re6e5ccdf  
    1616#include <QPixmap> 
    1717#include <QImage> 
    18 #include <QBitmap> 
     18#include <QIcon> 
     19#include <QPixmap> 
    1920#include <QX11Info> 
    2021#include <QDebug> 
     
    5556        static int GetNumberOfDesktops();               // get number of virtual desktops 
    5657        static int GetCurrentDesktop();                 // get current virtual desktop 
     58        static bool ValidWindowEvent(Atom evAtom);      //Check if the property changed is a window event 
    5759         
    5860        //Single Window Management 
    5961        static void CloseWindow(WId);                   // Close the Window 
    6062        static void IconifyWindow(WId);                 // Iconify (minimize) the Window 
    61         static void RestoreWindow(WId);         //  Restore (non-iconify) the Window  
     63        static void RestoreWindow(WId);         // Restore (non-iconify) the Window 
     64        static void ActivateWindow(WId);                // Make the window active; 
    6265        static void ReservePanelLocation(WId win, int xstart, int ystart, int width, int height); 
    6366        static void SetAsSticky(WId win); 
     
    7174        static QString WindowIconName(WId);     // short name (untranslated) 
    7275        static QString WindowVisibleIconName(WId); // short name (translated) 
    73         static QPixmap WindowPixmap(WId);               // Pixmap/icon for the window 
    74         static WINDOWSTATE GetWindowState(WId win, bool forDisplay=true); //State of activity 
     76        static QIcon WindowIcon(WId);           // Icon for the window 
     77        static WINDOWSTATE GetWindowState(WId win); //State of activity 
    7578        static WId leaderWindow(WId);                   //Get the main window if this one is a redirect 
    7679        static bool isNormalWindow(WId win, bool includeDialogs=false); 
  • lumina/lumina-config/LPlugins.cpp

    r66e23d4 re6e5ccdf  
    8787    info.ID = "clock"; 
    8888    info.icon = "preferences-system-time"; 
    89   PANEL.insert(info.ID, info);           
     89  PANEL.insert(info.ID, info);   
     90  //Task Manager 
     91  info = LPI(); //clear it 
     92    info.name = QObject::tr("Task Manager"); 
     93    info.description = QObject::tr("View and control any running application windows"); 
     94    info.ID = "taskmanager"; 
     95    info.icon = "preferences-system-windows"; 
     96  PANEL.insert(info.ID, info);     
    9097} 
    9198 
  • lumina/lumina-desktop/LPanel.cpp

    r5f42f3f re6e5ccdf  
    3131    layout->setContentsMargins(0,0,0,0); 
    3232    layout->setAlignment(Qt::AlignLeft); 
     33    layout->setSpacing(1); 
    3334  this->setLayout(layout); 
    3435  QTimer::singleShot(1,this, SLOT(UpdatePanel()) ); //start this in a new thread 
  • lumina/lumina-desktop/LSession.cpp

    r77ee7b2 re6e5ccdf  
    1414LSession::LSession(int &argc, char ** argv) : QApplication(argc, argv){ 
    1515  this->setApplicationName("Lumina Desktop Environment"); 
    16   this->setApplicationVersion("0.2"); 
     16  this->setApplicationVersion("0.3"); 
    1717  this->setOrganizationName("LuminaDesktopEnvironment"); 
    1818  this->setQuitOnLastWindowClosed(false); //since the LDesktop's are not necessarily "window"s 
     
    4444        } 
    4545        break; 
    46     case MapNotify:      //window mapped (visible) 
    47     case UnmapNotify:    //window unmapped (invisible) 
    48     case VisibilityNotify: //window subsection visibility changed 
    49     case ReparentNotify: //window re-parented 
    50     case DestroyNotify:  //window destroyed 
    51     case CreateNotify:   //window created 
    52     default: 
    53         emit WindowListEvent(); 
     46    case PropertyNotify: 
     47        //qDebug() << "Property Event:"; 
     48        if(LX11::ValidWindowEvent(event->xproperty.atom)){ 
     49          qDebug() << " - Emit Window Event"; 
     50          emit WindowListEvent(); 
     51        } 
     52        break; 
    5453  } 
    5554  // ----------------------- 
  • lumina/lumina-desktop/LSession.h

    r51ace02 re6e5ccdf  
    5151signals: 
    5252        void NewSystemTrayApp(WId); //WinID 
     53        void WindowListEvent(WId); 
    5354        void WindowListEvent(); 
    5455         
  • lumina/lumina-desktop/panel-plugins/LTBWidget.h

    r214f3d5 re6e5ccdf  
    99 
    1010#include <QToolButton> 
    11 //#include <QTimer> 
    12 //#include <QMenu> 
    13 //#include <QMouseEvent> 
    1411#include <QEvent> 
    1512#include <QWheelEvent> 
    1613 
    17 //#include <QObject> 
    18 //#include <QHBoxLayout> 
    1914#include "Globals.h" 
    2015 
     
    2318private: 
    2419        Lumina::STATES cstate; 
    25  
     20        QString rawstyle; 
    2621        void updateBackground(){ 
    27           if(cstate == Lumina::NONE){ this->setBackgroundRole(QPalette::NoRole); } 
    28           else if(cstate == Lumina::VISIBLE){ this->setBackgroundRole(QPalette::Light); } 
    29           else if(cstate == Lumina::INVISIBLE){ this->setBackgroundRole(QPalette::Dark); } 
    30           else if(cstate == Lumina::ACTIVE){ this->setBackgroundRole(QPalette::Button); } 
    31           else if(cstate == Lumina::NOTIFICATION){ this->setBackgroundRole(QPalette::Highlight); } 
     22          QString background = "background: transparent; "; //default value 
     23          QString border = "border: 1px solid transparent;"; 
     24          if(cstate == Lumina::NONE){ } //just use the defaults 
     25          else if(cstate == Lumina::VISIBLE){ background = "background: rgba(170,170,170,120);"; border="border: 1px solid grey;"; } 
     26          else if(cstate == Lumina::INVISIBLE){} 
     27          else if(cstate == Lumina::ACTIVE){ background= "background: rgba(175,238,238,255);"; border ="border: 1px solid grey;"; } 
     28          else if(cstate == Lumina::NOTIFICATION){ background= "background: rgba(255,250,205,255);"; border="border: 1px solid grey"; } 
     29          QString raw = rawstyle; 
     30          this->setStyleSheet( raw.replace("%1",background).replace("%2", border) ); 
    3231        } 
    3332         
     
    3837public: 
    3938        LTBWidget(QWidget* parent) : QToolButton(parent){ 
    40           this->setStyleSheet( this->styleSheet()+" LTBWidget::menu-indicator{image: none;}"); 
     39          //this->setStyleSheet( this->styleSheet()+" LTBWidget::menu-indicator{image: none;}"); 
    4140          cstate = Lumina::NONE; 
    42           //this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 
    4341          this->setPopupMode(QToolButton::InstantPopup); 
    4442          this->setAutoRaise(true); 
    45  
     43          rawstyle = "LTBWidget{ %1 %2 border-radius: 5px;}  LTBWidget::menu-indicator{image: none;} LTBWidget::hover{ %1 border: 1px solid lightblue; border-radius: 5px; } LTBWidget::menu-button{ background: transparent; width: 15px; } LTBWidget[popupMode=\"1\"]{%1 %2 border-radius: 5px; padding-right: 15px;} LTBWidget[popupMode=\"1\"]::hover{%1 border: 1px solid lightblue; border-radius: 5px; padding-right: 15px}"; 
     44          updateBackground(); 
    4645        } 
    4746         
  • lumina/lumina-desktop/panel-plugins/NewPP.h

    r7ae73d3 re6e5ccdf  
    2020#include "battery/LBattery.h" 
    2121#include "desktopswitcher/LDesktopSwitcher.h" 
    22 //#include "taskmanager/LTaskManagerPlugin.h" 
     22#include "taskmanager/LTaskManagerPlugin.h" 
    2323//#include "systemtray/LSysTray.h" //must be last due to X11 compile issues 
    2424 
     
    3333          }else if(plugin=="spacer"){ 
    3434            plug = new LSpacerPlugin(parent); 
    35           /*}else if(plugin=="taskmanager"){ 
     35          }else if(plugin=="taskmanager"){ 
    3636            plug = new LTaskManagerPlugin(parent); 
    37           }else if(plugin=="systemtray"){ 
     37          /*}else if(plugin=="systemtray"){ 
    3838            plug = new LSysTray(parent); 
    3939                  */ 
  • lumina/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp

    r214f3d5 re6e5ccdf  
    3131QList<LWinInfo> LTaskButton::windows(){ 
    3232  return WINLIST; 
     33} 
     34 
     35QString LTaskButton::classname(){ 
     36  return cname; 
    3337} 
    3438 
     
    7882      //Update the button visuals from the first window 
    7983      this->setIcon(WINLIST[i].icon()); 
    80       this->setText(WINLIST[i].Class()); 
    81       this->setIcon(WINLIST[i].icon()); 
     84      cname = WINLIST[i].Class();    
     85      this->setText(cname); 
    8286    } 
    8387    winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); 
     
    99103    this->setPopupMode(QToolButton::MenuButtonPopup); 
    100104    this->setMenu(actMenu); 
     105    this->setText( this->fontMetrics().elidedText(WINLIST[0].text(), Qt::ElideRight ,100) ); //max out at 100 pixel length 
    101106  }else if(WINLIST.length() > 1){ 
    102107    //multiple windows 
    103108    this->setPopupMode(QToolButton::InstantPopup); 
    104109    this->setMenu(winMenu); 
    105     this->setText( this->text() +" ("+QString::number(WINLIST.length())+")" ); 
     110    this->setText( cname +" ("+QString::number(WINLIST.length())+")" ); 
    106111  } 
    107112} 
     
    135140  //Check which state the window is currently in and flip it to the other 
    136141  LX11::WINDOWSTATE state = LX11::GetWindowState(win.windowID()); 
    137   if(state == LX11::VISIBLE || state == LX11::ACTIVE){ 
     142  if(state == LX11::ACTIVE){ 
    138143    qDebug() << "Minimize Window:" << this->text(); 
    139144    LX11::IconifyWindow(win.windowID()); 
     145  }else if(state == LX11::VISIBLE){ 
     146    qDebug() << "Activate Window:" << this->text(); 
     147    LX11::ActivateWindow(win.windowID()); 
    140148  }else{ 
    141149    qDebug() << "Restore Window:" << this->text(); 
  • lumina/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h

    r214f3d5 re6e5ccdf  
    3333        //Window Information 
    3434        QList<LWinInfo> windows(); 
     35        QString classname(); 
    3536 
    3637        //Window Management 
     
    4445        QMenu *winMenu; // window menu (if more than 1) 
    4546        LWinInfo cWin; 
     47        QString cname; //class name for the entire button 
    4648 
    4749        LWinInfo currentWindow(); //For getting the currently-active window 
  • lumina/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp

    r214f3d5 re6e5ccdf  
    1010  updating=false; 
    1111  timer = new QTimer(this); 
    12         timer->setInterval(100); // 1/10 second 
     12        timer->setSingleShot(true); 
     13        timer->setInterval(10); // 1/100 second 
    1314        connect(timer, SIGNAL(timeout()), this, SLOT(UpdateButtons()) );  
    1415  connect(LSession::instance(), SIGNAL(WindowListEvent()), this, SLOT(checkWindows()) ); 
    1516  this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); 
    1617  this->layout()->setAlignment(Qt::AlignLeft); 
     18  QTimer::singleShot(0,this, SLOT(UpdateButtons()) ); //perform an initial sync 
    1719} 
    1820 
     
    5052          break; //break out of the button->window loop 
    5153        }else{ 
     54          //qDebug() << "Remove Window:" << WI[w].windowID() << "Button:" << w; 
    5255          BUTTONS[i]->rmWindow(WI[w]); // one of the multiple windows for the button 
    5356          WI.removeAt(w); //remove this window from the list 
     
    5861    } 
    5962    if(!updated){ 
     63      //qDebug() << "Update Button:" << i; 
    6064      QTimer::singleShot(1,BUTTONS[i], SLOT(UpdateButton()) ); //keep moving on 
    6165    } 
     
    6872    bool found = false; 
    6973    for(int b=0; b<BUTTONS.length(); b++){ 
    70       if(BUTTONS[b]->text().section("(",0,0).simplified() == ctxt){ 
     74      if(BUTTONS[b]->classname()== ctxt){ 
    7175        found = true; 
     76        //qDebug() << "Add Window to Button:" << b; 
    7277        BUTTONS[b]->addWindow(winlist[i]); 
    7378        break; 
     
    7681    if(!found){ 
    7782      //No group, create a new button 
     83      //qDebug() << "New Button"; 
    7884      LTaskButton *but = new LTaskButton(this); 
    7985        but->addWindow( LWinInfo(winlist[i]) ); 
     
    8288    } 
    8389  } 
    84   updating=false; 
     90  updating=false; //flag that we are done updating the buttons 
    8591} 
    8692 
  • lumina/lumina-desktop/panel-plugins/taskmanager/LWinInfo.h

    r214f3d5 re6e5ccdf  
    1616// libLumina includes 
    1717#include <LuminaX11.h> 
     18#include <LuminaXDG.h> 
    1819 
    1920// Local includes 
     
    4950        QIcon icon(){ 
    5051          if(window==0){ return QIcon(); } 
    51           QIcon ico; 
    52           ico.addPixmap(LX11::WindowPixmap(window)); 
     52          //qDebug() << "Check for Window Icon:" << window; 
     53          QIcon ico = LX11::WindowIcon(window); 
     54          //Check for a null icon, and supply one if necessary 
     55          if(ico.isNull()){ ico = LXDG::findIcon("preferences-system-windows",""); } 
    5356          return ico; 
    5457        } 
  • lumina/lumina-open/main.cpp

    r214f3d5 re6e5ccdf  
    180180  getCMD(argc, argv, cmd, args, path); 
    181181  qDebug() << "Run CMD:" << cmd << args; 
    182   //Now run the command 
     182  //Now run the command (move to execvp() later?) 
     183  //int retcode = system( QString(cmd+" "+args).toUtf8() ); 
     184 
    183185  QProcess *p = new QProcess(); 
    184186  p->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); 
Note: See TracChangeset for help on using the changeset viewer.