Skip to content

Commit

Permalink
qui tweaks to dock
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithDHedger committed Nov 24, 2024
1 parent 23e3bad commit d7e5757
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 14 deletions.
2 changes: 2 additions & 0 deletions LFSDock/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
0.2.0
Fixed stuck tasks.
Fixed stuck launchers.
Fixed dropping multiple files on dock to open.
Fixed calandar not highlighting todays date.
Pop up list tweaks.
Expand Down
19 changes: 17 additions & 2 deletions LFSDock/LFSDock/src/callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ bool exitPopList(LFSTK_gadgetClass*p,void* ud)
pt={win_x_return1,win_y_return1};

if(apc->globalLib->LFSTK_pointInRect(&pt,(geometryStruct*)geom)==false)
showhidetActionList(NULL,popActionWindow,popActionList);

{
showhidetActionList(NULL,popActionWindow,popActionList);
for(int j=0;j<tasks.size();j++)
{
if(moveGadget==true)
setGadgetPosition(taskbuttons[j],false);
}
dockWindow->LFSTK_redrawAllGadgets();
}
return(true);
}

Expand Down Expand Up @@ -209,6 +216,12 @@ bool popActionWindowSelect(void *object,void* userdata)//TODO//
infoDataStruct ls;
unsigned long wud=0;

for(int j=0;j<tasks.size();j++)
{
if(moveGadget==true)
setGadgetPosition(taskbuttons[j],false);
}

LFSTK_listGadgetClass *list=static_cast<LFSTK_listGadgetClass*>(object);
ls=list->listDataArray->at(list->LFSTK_getCurrentListItem());

Expand All @@ -227,5 +240,7 @@ bool popActionWindowSelect(void *object,void* userdata)//TODO//
desktopSelect(NULL,NULL);
break;
}

dockWindow->LFSTK_redrawAllGadgets();
return(true);
}
15 changes: 8 additions & 7 deletions LFSDock/LFSDock/src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ enum WHATSORT {DESKTOPSWITCHER=100,TASKSWITCHER};

struct launcherDataStruct
{
std::string name;
std::string exec;
std::string icon;
std::string path;
bool inTerm;
unsigned long pid=0;
bool donePrelight=false;
std::string name;
std::string exec;
std::string icon;
std::string path;
bool inTerm;
unsigned long pid=0;
bool donePrelight=false;
LFSTK_gadgetClass *gadget=NULL;
};

struct taskStruct
Expand Down
20 changes: 18 additions & 2 deletions LFSDock/LFSDock/src/launchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,18 @@ bool launcherContextCB(void *p,void* ud)

bool launcherEnterCB(LFSTK_gadgetClass* p,void* ud)
{
for(int j=0;j<launchersArray.size();j++)
{
launcherDataStruct lds=launchersArray.at(j);
if(moveGadget==true)
setGadgetPosition(lds.gadget,FALSE);
}

if(p!=NULL)
{
launcherDataStruct lds=launchersArray.at((long unsigned int)ud);
XEvent event;
geometryStruct geom;
XEvent event;
geometryStruct geom;
const geometryStruct *wingeom=tooltiptWC->LFSTK_getWindowGeom();

if(lds.donePrelight==true)
Expand Down Expand Up @@ -119,6 +126,14 @@ bool launcherEnterCB(LFSTK_gadgetClass* p,void* ud)

bool launcherExitCB(LFSTK_gadgetClass* p,void* ud)
{

for(int j=0;j<launchersArray.size();j++)
{
launcherDataStruct lds=launchersArray.at(j);
if(moveGadget==true)
setGadgetPosition(lds.gadget,FALSE);
}

if(p!=NULL)
{
launcherDataStruct lds=launchersArray.at((long unsigned int)ud);
Expand Down Expand Up @@ -287,6 +302,7 @@ int addLaunchers(int x,int y,int grav)
bc->LFSTK_setImageFromPath(DATADIR "/pixmaps/command.png",CENTRE,true);

setGadgetDetails(bc);
lds.gadget=bc;
launchersArray.push_back(lds);
xpos+=iconWidth+ICONSPACE;
}
Expand Down
15 changes: 12 additions & 3 deletions LFSDock/LFSDock/src/taskBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,18 @@ bool compareTaskClass(const taskStruct &a,const taskStruct &b)
bool taskSwitcherExitCB(LFSTK_gadgetClass*p,void* ud)
{
//fprintf(stderr,"exit>>>>%p--%p<<<<\n",currentTask,p);
if(moveGadget==true)
setGadgetPosition(p,false);

//if(checkInBorder(p)==true)
//{
// for(int j=0;j<tasks.size();j++)
// {
// if(moveGadget==true)
// setGadgetPosition(taskbuttons[j],false);
// }
//}

//if(moveGadget==true)
// setGadgetPosition(p,false);

exitPopList(p,ud);
inSomeWindow=false;
Expand Down Expand Up @@ -86,7 +96,6 @@ bool taskSwitcherEnterCB(LFSTK_gadgetClass*p,void* ud)
popActionWindow->userData=USERDATA(TASKSWITCHER);
popActionWindow->LFSTK_resizeWindow(popActionList->LFSTK_getListMaxWidth()-2,(GADGETHITE*(filltasks.at(d).tasks.size()+1))-4);
showhidetActionList(p,popActionWindow,popActionList);
//XSync(apc->display,false);
XFlush(apc->display);
inSomeWindow=true;
return(true);
Expand Down

0 comments on commit d7e5757

Please sign in to comment.