chiark / gitweb /
New option: movres.ignore_transience.
[e16] / debian / patch / 005_ignore_transience.patch
1 Index: e16/src/E.h
2 ===================================================================
3 --- e16.orig/src/E.h    2011-12-06 18:31:59.000000000 +0000
4 +++ e16/src/E.h 2011-12-06 16:23:55.000000000 +0000
5 @@ -216,6 +216,7 @@
6        char                update_while_moving;
7        char                enable_sync_request;
8        char                dragbar_nocover;
9 +      char               ignore_transience;
10     } movres;
11     struct {
12        int                 movres;
13 Index: e16/src/mod-misc.c
14 ===================================================================
15 --- e16.orig/src/mod-misc.c     2011-12-06 18:31:59.000000000 +0000
16 +++ e16/src/mod-misc.c  2011-12-06 16:24:35.000000000 +0000
17 @@ -159,6 +159,7 @@
18     CFG_ITEM_BOOL(Conf, movres.update_while_moving, 0),
19     CFG_ITEM_BOOL(Conf, movres.enable_sync_request, 0),
20     CFG_ITEM_BOOL(Conf, movres.dragbar_nocover, 0),
21 +   CFG_ITEM_BOOL(Conf, movres.ignore_transience, 1),
22  
23     CFG_ITEM_INT(Conf, opacity.menus, 85),
24     CFG_ITEM_INT(Conf, opacity.movres, 60),
25 Index: e16/src/ewin-ops.c
26 ===================================================================
27 --- e16.orig/src/ewin-ops.c     2011-12-06 18:31:59.000000000 +0000
28 +++ e16/src/ewin-ops.c  2011-12-06 18:23:57.000000000 +0000
29 @@ -389,7 +389,8 @@
30  #endif
31       }
32  
33 -   if (flags & (MRF_DESK | MRF_MOVE | MRF_FLOAT | MRF_UNFLOAT))
34 +   if ((flags & (MRF_DESK | MRF_MOVE | MRF_FLOAT | MRF_UNFLOAT)) &&
35 +       !Conf.movres.ignore_transience)
36       {
37         lst = EwinListTransients(ewin, &num, 0);
38         for (i = 0; i < num; i++)
39 @@ -552,20 +553,22 @@
40  
41     ICCCM_Iconify(ewin);
42  
43 -   lst = EwinListTransients(ewin, &num, 0);
44 -   for (i = 0; i < num; i++)
45 -     {
46 -       e = lst[i];
47 -       if (e->state.iconified)
48 -          continue;
49 +   if (!Conf.movres.ignore_transience) {
50 +      lst = EwinListTransients(ewin, &num, 0);
51 +      for (i = 0; i < num; i++)
52 +       {
53 +          e = lst[i];
54 +          if (e->state.iconified)
55 +             continue;
56  
57 -       EwinIconify(e);
58 -     }
59 +          EwinIconify(e);
60 +       }
61  #if ENABLE_GNOME
62 -   if (lst && call_depth == 1)
63 -      GNOME_SetClientList();
64 +      if (lst && call_depth == 1)
65 +        GNOME_SetClientList();
66  #endif
67     Efree(lst);
68 +   }
69  
70     EwinStateUpdate(ewin);
71     HintsSetWindowState(ewin);
72 @@ -647,20 +650,22 @@
73     EwinShow(ewin);
74     ICCCM_DeIconify(ewin);
75  
76 -   lst = EwinListTransients(ewin, &num, 0);
77 -   for (i = 0; i < num; i++)
78 -     {
79 -       e = lst[i];
80 -       if (!e->state.iconified)
81 -          continue;
82 +   if (!Conf.movres.ignore_transience) {
83 +      lst = EwinListTransients(ewin, &num, 0);
84 +      for (i = 0; i < num; i++)
85 +       {
86 +          e = lst[i];
87 +          if (!e->state.iconified)
88 +             continue;
89  
90 -       EwinDeIconify1(e, dx, dy);
91 -     }
92 +          EwinDeIconify1(e, dx, dy);
93 +       }
94  #if ENABLE_GNOME
95 -   if (lst && call_depth == 1)
96 -      GNOME_SetClientList();
97 +      if (lst && call_depth == 1)
98 +        GNOME_SetClientList();
99  #endif
100 -   Efree(lst);
101 +      Efree(lst);
102 +   }
103  
104     EwinStateUpdate(ewin);
105     HintsSetWindowState(ewin);
106 Index: e16/src/ewins.c
107 ===================================================================
108 --- e16.orig/src/ewins.c        2011-12-06 18:31:59.000000000 +0000
109 +++ e16/src/ewins.c     2011-12-06 17:13:30.000000000 +0000
110 @@ -1395,10 +1395,12 @@
111     if (num == 0)               /* Quit if stacking is unchanged */
112        goto done;
113  
114 -   lst = EwinListTransients(ewin, &num, 1);
115 -   for (i = 0; i < num; i++)
116 -      EwinRaise(lst[i]);
117 -   Efree(lst);
118 +   if (!Conf.movres.ignore_transience) {
119 +      lst = EwinListTransients(ewin, &num, 1);
120 +      for (i = 0; i < num; i++)
121 +        EwinRaise(lst[i]);
122 +      Efree(lst);
123 +   }
124  
125     if (call_depth == 1)
126       {
127 @@ -1430,10 +1432,12 @@
128     if (num == 0)               /* Quit if stacking is unchanged */
129        goto done;
130  
131 -   lst = EwinListTransientFor(ewin, &num);
132 -   for (i = 0; i < num; i++)
133 -      EwinLower(lst[i]);
134 -   Efree(lst);
135 +   if (!Conf.movres.ignore_transience) {
136 +      lst = EwinListTransientFor(ewin, &num);
137 +      for (i = 0; i < num; i++)
138 +        EwinLower(lst[i]);
139 +      Efree(lst);
140 +   }
141  
142     if (call_depth == 1)
143       {