patches

Patches for various other programs
git clone https://git.regexghost.com/patches.git
Log | Files | Refs | README

jwm-move-unmap.diff (1665B)


      1 diff --git a/src/client.c b/src/client.c
      2 index 82ef774..4c6e779 100644
      3 --- a/src/client.c
      4 +++ b/src/client.c
      5 @@ -643,10 +643,14 @@ void HideClient(ClientNode *np)
      6        }
      7        np->state.status |= STAT_HIDDEN;
      8        if(np->state.status & (STAT_MAPPED | STAT_SHADED)) {
      9 +         int north, south, east, west;
     10 +         GetBorderSize(&np->state, &north, &south, &east, &west);
     11           if(np->parent != None) {
     12 -            JXUnmapWindow(display, np->parent);
     13 +            JXMoveWindow(display, np->parent, -np->width - 200, np->y - north);
     14 +//            JXUnmapWindow(display, np->parent);
     15           } else {
     16 -            JXUnmapWindow(display, np->window);
     17 +            JXMoveWindow(display, np->window, -np->width - 200, np->y - north);
     18 +//            JXUnmapWindow(display, np->window);
     19           }
     20        }
     21     }
     22 @@ -659,10 +663,14 @@ void ShowClient(ClientNode *np)
     23        np->state.status &= ~STAT_HIDDEN;
     24        if(np->state.status & (STAT_MAPPED | STAT_SHADED)) {
     25           if(!(np->state.status & STAT_MINIMIZED)) {
     26 +            int north, south, east, west;
     27 +            GetBorderSize(&np->state, &north, &south, &east, &west);
     28              if(np->parent != None) {
     29 -               JXMapWindow(display, np->parent);
     30 +               JXMoveWindow(display, np->parent, np->x - west, np->y - north);
     31 +//               JXMapWindow(display, np->parent);
     32              } else {
     33 -               JXMapWindow(display, np->window);
     34 +               JXMoveWindow(display, np->parent, np->x - west, np->y - north);
     35 +//               JXMapWindow(display, np->window);
     36              }
     37              if(np->state.status & STAT_ACTIVE) {
     38                 FocusClient(np);