@@ -25,8 +25,8 @@ LFSWM2_clientClass::LFSWM2_clientClass(LFSWM2_Class *mainclass,Window id)
2525 int menucnt=0 ;
2626
2727 this ->mainClass =mainclass;
28- this ->picFormat =XRenderFindStandardFormat (this ->mainClass ->display ,PictStandardRGB24);
29- this ->pa .subwindow_mode =IncludeInferiors;
28+ // this->picFormat=XRenderFindStandardFormat(this->mainClass->display,PictStandardRGB24);
29+ // this->pa.subwindow_mode=IncludeInferiors;
3030 while (menuItemlabels[menucnt]!=NULL )
3131 menuNames.push_back (menuItemlabels[menucnt++]);
3232}
@@ -35,7 +35,9 @@ LFSWM2_clientClass::~LFSWM2_clientClass(void)
3535{
3636 XWindowAttributes x_window_attrs;
3737
38- this ->mainClass ->mainWindowClass ->LFSWM2_freeHints (this ->windowHints );
38+ // if(this->windowHints!=NULL)
39+ // this->mainClass->mainWindowClass->LFSWM2_freeHints(this->windowHints);
40+ this ->mainClass ->LFSWM2_freeHints (&this ->windowHints );
3941 this ->mainClass ->mainWindowClass ->LFSWM2_setClientList (this ->contentWindow ,false );
4042
4143 this ->mainClass ->mainWindowClass ->LFSWM2_deleteClientEntry (this ->frameWindow );
@@ -96,7 +98,7 @@ void LFSWM2_clientClass::LFSWM2_setWindowName(void)
9698 if (namex!=NULL )
9799 {
98100 this ->name =namex;
99- this ->nameIsUTF =false ;;
101+ this ->nameIsUTF =false ;
100102 }
101103 XFree (p.value );
102104 }
@@ -255,39 +257,39 @@ bool LFSWM2_clientClass::doResizeDraggers(XEvent *e)
255257 this ->setWindowRects (false );
256258 this ->dragRect =this ->frameWindowRect ;
257259
258- switch (this ->resizeMode )
259- {
260- case FASTRESIZE:
261- XMoveWindow (this ->mainClass ->display ,this ->contentWindow ,this ->frameWindowRect .w +10 ,0 );
262- break ;
263- case LIVERESIZE:
264- break ;
265- case SIZERESIZE:
266- break ;
267- case SCALERESIZE:
268- {
269- this ->currentRootPixmap =XCreatePixmap (this ->mainClass ->display ,this ->contentWindow ,this ->contentWindowRect .w ,this ->contentWindowRect .h ,this ->mainClass ->depth );
270- XSetClipMask (this ->mainClass ->display ,this ->mainClass ->mainGC ,None);
271- XSetClipOrigin (this ->mainClass ->display , this ->mainClass ->mainGC ,0 ,0 );
272- this ->resizeImage =XGetImage (this ->mainClass ->display ,this ->contentWindow ,0 ,0 ,this ->contentWindowRect .w ,this ->contentWindowRect .h ,AllPlanes,ZPixmap);
273-
274- XSetClipMask (this ->mainClass ->display ,this ->mainClass ->mainGC ,None);
275- XSetClipOrigin (this ->mainClass ->display ,this ->mainClass ->mainGC ,0 ,0 );
276- XPutImage (this ->mainClass ->display ,this ->currentRootPixmap , this ->mainClass ->mainGC ,this ->resizeImage ,0 ,0 ,0 ,0 ,this ->contentWindowRect .w ,this ->contentWindowRect .h );
277-
278- this ->ow =this ->contentWindowRect .w ;
279- this ->oh =this ->contentWindowRect .h ;
280- this ->resizeWindow =XCreateSimpleWindow (this ->mainClass ->display ,this ->frameWindow ,this ->mainClass ->leftSideBarSize ,this ->mainClass ->titleBarSize ,this ->contentWindowRect .w ,this ->contentWindowRect .h ,BORDER_WIDTH,this ->mainClass ->frameFG ->pixel ,this ->mainClass ->frameBG ->pixel );
281- XMoveWindow (this ->mainClass ->display ,this ->contentWindow ,this ->mainClass ->displayWidth +10 ,0 );
282- XMapWindow (this ->mainClass ->display ,this ->resizeWindow );
283- XRaiseWindow (this ->mainClass ->display ,this ->resizeWindow );
284- primaryPicture=XRenderCreatePicture (this ->mainClass ->display ,this ->currentRootPixmap ,picFormat,CPSubwindowMode,&pa);
285- windowPicture=XRenderCreatePicture (this ->mainClass ->display ,this ->resizeWindow ,picFormat,CPSubwindowMode,&pa);
286-
287- XRenderComposite (this ->mainClass ->display ,PictOpSrc,primaryPicture,0 ,windowPicture,0 ,0 ,0 ,0 ,0 ,0 ,this ->ow ,this ->oh );
288- }
289- break ;
290- }
260+ // switch(this->resizeMode)
261+ // {
262+ // case FASTRESIZE:
263+ // XMoveWindow(this->mainClass->display,this->contentWindow,this->frameWindowRect.w+10,0);
264+ // break;
265+ // case LIVERESIZE:
266+ // break;
267+ // case SIZERESIZE:
268+ // break;
269+ // // case SCALERESIZE:
270+ // // {
271+ // // this->currentRootPixmap=XCreatePixmap(this->mainClass->display,this->contentWindow,this->contentWindowRect.w,this->contentWindowRect.h,this->mainClass->depth);
272+ // // XSetClipMask(this->mainClass->display,this->mainClass->mainGC,None);
273+ // // XSetClipOrigin(this->mainClass->display, this->mainClass->mainGC,0,0);
274+ // // this->resizeImage=XGetImage(this->mainClass->display,this->contentWindow,0,0,this->contentWindowRect.w,this->contentWindowRect.h,AllPlanes,ZPixmap);
275+ // //
276+ // // XSetClipMask(this->mainClass->display,this->mainClass->mainGC,None);
277+ // // XSetClipOrigin(this->mainClass->display,this->mainClass->mainGC,0,0);
278+ // // XPutImage(this->mainClass->display,this->currentRootPixmap, this->mainClass->mainGC,this->resizeImage,0,0,0,0,this->contentWindowRect.w,this->contentWindowRect.h);
279+ // //
280+ // // this->ow=this->contentWindowRect.w;
281+ // // this->oh=this->contentWindowRect.h;
282+ // // this->resizeWindow=XCreateSimpleWindow(this->mainClass->display,this->frameWindow,this->mainClass->leftSideBarSize,this->mainClass->titleBarSize,this->contentWindowRect.w,this->contentWindowRect.h,BORDER_WIDTH,this->mainClass->frameFG->pixel,this->mainClass->frameBG->pixel);
283+ // // XMoveWindow(this->mainClass->display,this->contentWindow,this->mainClass->displayWidth+10,0);
284+ // // XMapWindow(this->mainClass->display,this->resizeWindow);
285+ // // XRaiseWindow(this->mainClass->display,this->resizeWindow);
286+ // // primaryPicture=XRenderCreatePicture(this->mainClass->display,this->currentRootPixmap,picFormat,CPSubwindowMode,&pa);
287+ // // windowPicture=XRenderCreatePicture(this->mainClass->display,this->resizeWindow,picFormat,CPSubwindowMode,&pa);
288+ // //
289+ // // XRenderComposite(this->mainClass->display,PictOpSrc,primaryPicture,0,windowPicture,0,0,0,0,0,0,this->ow,this->oh);
290+ // // }
291+ // // break;
292+ // }
291293 }
292294 break ;
293295
@@ -299,19 +301,19 @@ bool LFSWM2_clientClass::doResizeDraggers(XEvent *e)
299301 this ->isShaded =false ;
300302 this ->adjustContentWindow ();
301303 this ->resetContentWindow ();
302- if (this ->currentRootPixmap !=None)
303- XFreePixmap (this ->mainClass ->display ,this ->currentRootPixmap );
304- if (this ->primaryPicture !=None)
305- XRenderFreePicture (this ->mainClass ->display ,this ->primaryPicture );
306- if (this ->windowPicture !=None)
307- XRenderFreePicture (this ->mainClass ->display ,this ->windowPicture );
308- if (this ->resizeImage !=NULL )
309- XDestroyImage (this ->resizeImage );
310-
311- this ->currentRootPixmap =None;
312- this ->primaryPicture =None;
313- this ->windowPicture =None;
314- this ->resizeImage =None;
304+ // if(this->currentRootPixmap!=None)
305+ // XFreePixmap(this->mainClass->display,this->currentRootPixmap);
306+ // if(this->primaryPicture!=None)
307+ // XRenderFreePicture(this->mainClass->display,this->primaryPicture);
308+ // if(this->windowPicture!=None)
309+ // XRenderFreePicture(this->mainClass->display,this->windowPicture);
310+ // if(this->resizeImage!=NULL)
311+ // XDestroyImage(this->resizeImage);
312+
313+ // this->currentRootPixmap=None;
314+ // this->primaryPicture=None;
315+ // this->windowPicture=None;
316+ // this->resizeImage=None;
315317
316318 XMoveResizeWindow (this ->mainClass ->display ,this ->resizeWindow ,this ->mainClass ->displayWidth +10 ,0 ,1 ,1 );
317319 this ->setWindowRects (true );
@@ -385,34 +387,34 @@ bool LFSWM2_clientClass::doResizeDraggers(XEvent *e)
385387 this ->frameWindowRect =r;
386388 XMoveResizeWindow (this ->mainClass ->display ,this ->frameWindow ,r.x ,r.y ,r.w ,r.h );
387389
388- if (this ->resizeMode ==SCALERESIZE)
389- {
390- XResizeWindow (this ->mainClass ->display ,this ->resizeWindow ,r.w -contentwadjust,r.h -contenthadjust);
391- double x_scale=(double )ow /((double )this ->frameWindowRect .w -(double )(this ->mainClass ->leftSideBarSize +this ->mainClass ->riteSideBarSize ));
392- double y_scale=(double )oh /((double )this ->frameWindowRect .h -(double )(this ->mainClass ->titleBarSize +this ->mainClass ->bottomBarSize ));
393- XTransform transform_matrix1=
394- {{
395- {XDoubleToFixed (x_scale),XDoubleToFixed (0 ),XDoubleToFixed (0 )},
396- {XDoubleToFixed (0 ),XDoubleToFixed (y_scale),XDoubleToFixed (0 )},
397- {XDoubleToFixed (0 ),XDoubleToFixed (0 ),XDoubleToFixed (1.0 )}
398- }};
399- XResizeWindow (this ->mainClass ->display ,this ->contentWindow ,r.w -contentwadjust,r.h -contenthadjust);
400- XRenderSetPictureTransform (this ->mainClass ->display ,primaryPicture,&transform_matrix1);
401- XRenderComposite (this ->mainClass ->display ,PictOpSrc,primaryPicture,0 ,windowPicture,0 ,0 ,0 ,0 ,0 ,0 ,r.w -contentwadjust,r.h -contenthadjust);
402-
403- this ->steps =0 ;
404- break ;
405- }
406-
407- if (this ->resizeMode ==LIVERESIZE)
390+ // if(this->resizeMode==SCALERESIZE)
391+ // {
392+ // XResizeWindow(this->mainClass->display,this->resizeWindow,r.w-contentwadjust,r.h-contenthadjust);
393+ // double x_scale=(double)ow /((double)this->frameWindowRect.w-(double)(this->mainClass->leftSideBarSize+this->mainClass->riteSideBarSize));
394+ // double y_scale=(double)oh /((double)this->frameWindowRect.h-(double)(this->mainClass->titleBarSize+this->mainClass->bottomBarSize));
395+ // XTransform transform_matrix1=
396+ // {{
397+ // {XDoubleToFixed(x_scale),XDoubleToFixed(0),XDoubleToFixed(0)},
398+ // {XDoubleToFixed(0),XDoubleToFixed(y_scale),XDoubleToFixed(0)},
399+ // {XDoubleToFixed(0),XDoubleToFixed(0),XDoubleToFixed(1.0)}
400+ // }};
401+ // XResizeWindow(this->mainClass->display,this->contentWindow,r.w-contentwadjust,r.h-contenthadjust);
402+ // XRenderSetPictureTransform(this->mainClass->display,primaryPicture,&transform_matrix1);
403+ // XRenderComposite(this->mainClass->display,PictOpSrc,primaryPicture,0,windowPicture,0,0,0,0,0,0,r.w-contentwadjust,r.h-contenthadjust);
404+ //
405+ // this->steps=0;
406+ // break;
407+ // }
408+
409+ // if(this->resizeMode==LIVERESIZE)
408410 {
409411 this ->contentWindowRect ={this ->mainClass ->leftSideBarSize ,this ->mainClass ->titleBarSize ,r.w -contentwadjust,r.h -contenthadjust};
410412 XResizeWindow (this ->mainClass ->display ,this ->contentWindow ,r.w -contentwadjust,r.h -contenthadjust);
411413 }
412- else
413- {
414- XMoveWindow (this ->mainClass ->display ,this ->contentWindow ,this ->frameWindowRect .w +10 ,0 );
415- }
414+ // else
415+ // {
416+ // XMoveWindow(this->mainClass->display,this->contentWindow,this->frameWindowRect.w+10,0);
417+ // }
416418
417419 this ->steps =0 ;
418420 break ;
@@ -611,10 +613,10 @@ bool LFSWM2_clientClass::wmCB(void *p,void* ud)
611613
612614 if (static_cast <LFSTK_gadgetClass*>(p)->LFSTK_getLabel ().compare (" Close" )==0 )
613615 cc->LFSWM2_sendCloseWindow ();
614- if (static_cast <LFSTK_gadgetClass*>(p)->LFSTK_getLabel ().compare (" Fast Resize" )==0 )
615- cc->resizeMode =FASTRESIZE;
616- if (static_cast <LFSTK_gadgetClass*>(p)->LFSTK_getLabel ().compare (" Live Resize" )==0 )
617- cc->resizeMode =LIVERESIZE;
616+ // if(static_cast<LFSTK_gadgetClass*>(p)->LFSTK_getLabel().compare("Fast Resize")==0)
617+ // cc->resizeMode=FASTRESIZE;
618+ // if(static_cast<LFSTK_gadgetClass*>(p)->LFSTK_getLabel().compare("Live Resize")==0)
619+ // cc->resizeMode=LIVERESIZE;
618620
619621 if (static_cast <LFSTK_gadgetClass*>(p)->LFSTK_getLabel ().compare (" About" )==0 )
620622 system (" lfsabout &" );
0 commit comments