@@ -174,6 +174,16 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
174
174
}
175
175
}
176
176
177
+ // if(e.xany.window==0x3400006)
178
+ // {
179
+ // cc=this->mainClass->mainWindowClass->LFSWM2_getClientClass(e.xkey.window);
180
+ // if((cc!=NULL) && (cc->isMinimized==true))
181
+ // {
182
+ // fprintf(stderr,"e.xany.window==0x3400006 cc->isMinimized==true cc->isVisible=%i\n",cc->visible);
183
+ // //cc->LFSWM2_showWindow(false);
184
+ // }
185
+ // }
186
+
177
187
switch (e.type )
178
188
{
179
189
case KeyRelease:
@@ -238,6 +248,18 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
238
248
case MapNotify:
239
249
{
240
250
// fprintf(stderr,"MapNotify main event loop window=%x when=%i\n",e.xmap.window,when++);
251
+ //
252
+ //
253
+ // cc=this->mainClass->mainWindowClass->LFSWM2_getClientClass(e.xproperty.window);
254
+ // if((cc!=NULL) )
255
+ // {
256
+ // fprintf(stderr,">>>>>>>\n");
257
+ // // cc->LFSWM2_unSpecial();
258
+ // // cc->LFSWM2_showWindow(false);
259
+ // }
260
+
261
+
262
+
241
263
this ->noRestack =false ;
242
264
Atom *v=NULL ;
243
265
long unsigned int nitems_return;
@@ -255,7 +277,7 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
255
277
256
278
case MapRequest:
257
279
{
258
- // fprintf(stderr,"MapRequest main event loop window=%x when=%i\n",e.xmap.window,when++);
280
+ // fprintf(stderr,"MapRequest main event loop window=%x when=%i\n",e.xmap.window,when++);
259
281
this ->noRestack =false ;
260
282
this ->mainClass ->mainWindowClass ->LFSWM2_removeProp (this ->mainClass ->rootWindow ,LFSTK_UtilityClass::LFSTK_hashFromKey (" _NET_ACTIVE_WINDOW" ));
261
283
XWindowAttributes x_window_attrs;
@@ -275,8 +297,10 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
275
297
}
276
298
XMoveWindow (this ->mainClass ->display ,e.xmaprequest .window ,-1000000 ,-1000000 );
277
299
if (this ->mainClass ->mainWindowClass ->LFSWM2_createClient (e.xmaprequest .window ,hs)==false )
278
- this ->mainClass ->mainWindowClass ->LFSWM2_freeHints (hs);
279
-
300
+ {
301
+ this ->mainClass ->mainWindowClass ->LFSWM2_freeHints (hs);
302
+ // fprintf(stderr,"LFSWM2_createClient=false\n");
303
+ }
280
304
XMoveResizeWindow (this ->mainClass ->display ,e.xmaprequest .window ,this ->mainClass ->leftSideBarSize ,this ->mainClass ->titleBarSize ,x_window_attrs.width ,x_window_attrs.height );
281
305
this ->noRestack =false ;
282
306
}
@@ -306,7 +330,7 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
306
330
hs=this ->mainClass ->mainWindowClass ->LFSWM2_getWindowHints (e.xconfigurerequest .window );
307
331
if ((hs.mHints !=NULL ) && (hs.mHints ->decorations !=0 ))
308
332
XMoveResizeWindow (this ->mainClass ->display ,e.xconfigurerequest .window ,hs.pt .x ,hs.pt .y ,hs.sh ->min_width ,hs.sh ->min_height );
309
- break ;
333
+ break ;
310
334
}
311
335
cc->configCnt =0 ;
312
336
if ((e.xconfigurerequest .value_mask & (CWWidth|CWHeight)) !=0 )
@@ -315,7 +339,6 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
315
339
ch.height =e.xconfigurerequest .height +this ->mainClass ->titleBarSize +this ->mainClass ->bottomBarSize ;
316
340
if ((cc->buttonDown ==false ) || (cc->isBorderless ==false ))
317
341
{
318
- // if(cc->isBorderless==false)
319
342
if ((cc->isBorderless ==false ) && (cc->windowType !=UTILITYWINDOW))
320
343
XResizeWindow (this ->mainClass ->display ,cc->frameWindow ,e.xconfigurerequest .width +this ->mainClass ->riteSideBarSize +this ->mainClass ->leftSideBarSize ,e.xconfigurerequest .height +this ->mainClass ->titleBarSize +this ->mainClass ->bottomBarSize );
321
344
else
@@ -384,6 +407,7 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
384
407
{
385
408
// fprintf(stderr,"PropertyNotify IN eventnumber %i atom name=%s\n",when++,XGetAtomName(this->mainClass->display,e.xproperty.atom));
386
409
LFSWM2_clientClass *cc;
410
+ // if(e.xproperty.window==0x3200006)
387
411
if (false )
388
412
{
389
413
fprintf (stderr," PropertyNotify eventnumber %i\n " ,when++);
@@ -399,6 +423,35 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
399
423
#endif
400
424
}
401
425
426
+ if (e.xproperty .state ==PropertyNewValue)
427
+ {
428
+ bool unminim=false ;
429
+ cc=this ->mainClass ->mainWindowClass ->LFSWM2_getClientClass (e.xproperty .window );
430
+ if ((cc!=NULL ) && (cc->isMinimized ==true ))
431
+ {
432
+ if (!this ->mainClass ->mainWindowClass ->LFSWM2_hasState (cc->contentWindow ,this ->mainClass ->atomshashed .at (LFSTK_UtilityClass::LFSTK_hashFromKey (" _NET_WM_STATE_HIDDEN" ))))
433
+ unminim=true ;
434
+
435
+ if ((cc->visible ==false ) && (e.xproperty .atom ==this ->mainClass ->atomshashed .at (LFSTK_UtilityClass::LFSTK_hashFromKey (" WM_HINTS" ))))
436
+ {
437
+ XWMHints *xh=XGetWMHints (this ->mainClass ->display , e.xproperty .window );
438
+ if (xh!=NULL )
439
+ {
440
+ if (((xh->flags & StateHint)==StateHint) && (xh->initial_state ==NormalState))
441
+ unminim=true ;
442
+ XFree ((void *)xh);
443
+ }
444
+ }
445
+ if (unminim==true )
446
+ {
447
+ cc->LFSWM2_unSpecial ();
448
+ cc->LFSWM2_showWindow (false );
449
+ }
450
+ this ->noRestack =false ;
451
+ break ;
452
+ }
453
+ }
454
+
402
455
if ((e.xproperty .state ==PropertyNewValue) || (e.xproperty .state ==PropertyDelete))
403
456
{
404
457
if (e.xproperty .atom ==this ->mainClass ->atomshashed .at (LFSTK_UtilityClass::LFSTK_hashFromKey (" _NET_CURRENT_DESKTOP" )))
@@ -437,6 +490,8 @@ void LFSWM2_eventsClass::LFSWM2_mainEventLoop(void)
437
490
cc=this ->mainClass ->mainWindowClass ->LFSWM2_getClientClass (e.xproperty .window );
438
491
if (cc!=NULL )
439
492
{
493
+ // if(cc->isMinimized==true)
494
+ // cc->LFSWM2_showWindow(false);
440
495
this ->mainClass ->mainWindowClass ->LFSWM2_reloadWindowState (cc->contentWindow );
441
496
}
442
497
}
0 commit comments