On Wed, 2003-08-27 at 14:17, Kim Woelders wrote: > ??? E doesn't change behavior depending on whether or not gnome-panel is > running or how its window list prefs are set. > Did you mean "shows up in gnome-panel's window list" in stead > of "shows up in E's focuslist"?
Something like that. My mistake. > Consider also what happens if you use non-sticky iconboxes :-) Or multiple iconboxes. I thought about it, and it might be better not to have the setting tied to an iconbox. > All in all I don't think there is one Grand Unified solution that solves > all issues. The windows in the iconboxes, the focus- and other E-lists, > and the gnome-panel window list cannot always correspond strictly. This is because gnome-panel has one window list, and E has four different ones (plus maybe some I don't use). No one would expect un-iconified windows to show up in the iconbox (I hope :), and the taskmenu/deskmenu is another mess altogether. What I'm after is an option to make it so that if a window shows up in the iconbox and de-iconifies to the current viewport, it will be in the focus list (and vice versa). > Your suggestion would have to be implemented as a radiobutton thing. > Maybe there should be an even more fine-grained control over which > windows are shown in the focus list? > And maybe this would be an overkill (not too hard to implement though). Umm... yeah... I think you're misunderstanding me! The first patch is more or less what I was thinking of. There's a new global option (I put it under Misc. instead of Focus, since it affects both the iconboxes and the focus list). It's off by default, and the iconbox/warp focus list only shows windows on the current viewport. When it's on, they include iconified windows from all viewports. I didn't change the non-warp focus list, as it's my understanding that it doesn't show iconified windows, ever. I've tested this quite a bit, and the only bug I've found is with dynamically resizing iconboxes, which show parts of windows they shouldn't if no other windows are iconified. I think this is because the if()'s I added need else's, but I couldn't figure out what to put there. Maybe this option should also affect the taskmenu, but then it would be the same as the desk menu. (See the -taskmenu patch.) Anyway, it's just a demonstration of what I'm talking about, not ready to be committed at all. On a related note: maybe it's time to clean up E's terminology for this stuff? The settings refer to "Miltiple" and "Virtual" desktops instead of desktops, viewports, workspaces, etc. On a unrelated note: does anybody remember the move/resize demo patch? It was commented out before 0.16.5. How hard would it be to get it in shape for 0.16.6? -- BAM - A classic: that which is guaranteed to be studied long after anyone is interested in it.
diff -ruNw e/src/E.h e.ben/src/E.h --- e/src/E.h 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/E.h 2003-08-27 19:05:51.000000000 -0400 @@ -1303,6 +1303,7 @@ int pager_menu_button; char area_wraparound; char dialog_headers; + char lists_all_workspaces; } EMode; @@ -2505,6 +2506,7 @@ void IB_SaveIcondefs(void); Iconbox **ListAllIconboxes(int *num); Iconbox *SelectIconboxForEwin(EWin * ewin); +void RedrawAllIconboxes(void); /* slideouts.c functions */ void SlideWindowSizeTo(Window win, int fx, int fy, int tx, diff -ruNw e/src/conf.h e.ben/src/conf.h --- e/src/conf.h 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/conf.h 2003-08-27 19:05:51.000000000 -0400 @@ -111,6 +111,7 @@ #define CONTROL_MENUONSCREEN 351 #define CONTROL_AREA_WRAPAROUND 352 #define CONTROL_DIALOG_HEADERS 353 +#define CONTROL_LISTS_ALL_WORKSPACES 354 #define CONTROL_MANUAL_PLACEMENT_MOUSE_POINTER 3360 #define CONTROL_WARPMENUS 666 #define CONTROL_USER_BG 1350 diff -ruNw e/src/config.c e.ben/src/config.c --- e/src/config.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/config.c 2003-08-27 19:05:51.000000000 -0400 @@ -769,6 +769,9 @@ case CONTROL_DIALOG_HEADERS: mode.dialog_headers = i2; break; + case CONTROL_LISTS_ALL_WORKSPACES: + mode.lists_all_workspaces = i2; + break; case CONTROL_SLIDESPEEDMAP: mode.slidespeedmap = i2; break; @@ -3874,6 +3877,7 @@ fprintf(autosavefile, "351 %i\n", (int)mode.menusonscreen); fprintf(autosavefile, "352 %i\n", (int)mode.area_wraparound); fprintf(autosavefile, "353 %i\n", (int)mode.dialog_headers); + fprintf(autosavefile, "354 %i\n", (int)mode.lists_all_workspaces); fprintf(autosavefile, "666 %i\n", (int)mode.warpmenus); fprintf(autosavefile, "667 %i\n", (int)mode.warpsticky); fprintf(autosavefile, "668 %i\n", (int)mode.warpshaded); diff -ruNw e/src/desktops.c e.ben/src/desktops.c --- e/src/desktops.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/desktops.c 2003-08-27 19:05:51.000000000 -0400 @@ -1589,6 +1589,7 @@ RedrawPagersForDesktop(num, 3); ForceUpdatePagersForDesktop(num); HandleDrawQueue(); + RedrawAllIconboxes(); EDBUG_RETURN_; } diff -ruNw e/src/iconify.c e.ben/src/iconify.c --- e/src/iconify.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/iconify.c 2003-08-27 19:05:51.000000000 -0400 @@ -1229,6 +1229,8 @@ w = 8; h = 8; ewin = ib->icons[i]; + if ((ewin->sticky) || (ewin->desktop == desks.current) || (mode.lists_all_workspaces)) + { if (!ewin->icon_pmap) UpdateAppIcon(ewin, ib->icon_mode); if (ewin->icon_pmap) @@ -1247,6 +1249,8 @@ y += h + 2; } } + } + if (ib->orientation) ib->max = y - 2; else @@ -1293,6 +1297,8 @@ w = 8; h = 8; ewin = ib->icons[i]; + if ((ewin->sticky) || (ewin->desktop == desks.current) || (mode.lists_all_workspaces)) + { if (!ewin->icon_pmap) UpdateAppIcon(ewin, ib->icon_mode); if (ewin->icon_pmap) @@ -1332,6 +1338,7 @@ x += w + 2; } } + } return NULL; } @@ -2162,6 +2169,8 @@ w = 8; h = 8; ewin = ib->icons[i]; + if ((ewin->sticky) || (ewin->desktop == desks.current) || (mode.lists_all_workspaces)) + { if (!ewin->icon_pmap) UpdateAppIcon(ewin, ib->icon_mode); if (ewin->icon_pmap) @@ -2194,6 +2203,7 @@ y += h + 2; } } + } else { int i; @@ -2290,6 +2300,9 @@ w = 8; h = 8; ewin = ib->icons[i]; + if ((ewin->sticky) || (ewin->desktop == desks.current) || (mode.lists_all_workspaces)) + { + if (!ewin->icon_pmap) UpdateAppIcon(ewin, ib->icon_mode); if (ewin->icon_pmap) @@ -2322,6 +2335,7 @@ x += w + 2; } } + } if (ib->nobg) { EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0, m, ShapeSet); @@ -2719,3 +2733,23 @@ } Efree(ib); } + +void +RedrawAllIconboxes(void) +{ + int i, num; + Iconbox **ib; + + EDBUG(5, "RedrawAllIconboxes"); + + ib = (Iconbox **) ListItemType(&num, LIST_TYPE_ICONBOX); + if (ib) + { + for (i = 0; i < num; i++) + { + RedrawIconbox(ib[i]); + } + Efree(ib); + } + +} diff -ruNw e/src/settings.c e.ben/src/settings.c --- e/src/settings.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/settings.c 2003-08-27 19:05:51.000000000 -0400 @@ -1866,6 +1866,7 @@ #endif static char tmp_dialog_headers; +static char tmp_lists_all_workspaces; static void CB_ConfigureMiscellaneous(int val, void *data); static void CB_ConfigureMiscellaneous(int val, void *data) @@ -1873,6 +1874,7 @@ if (val < 2) { mode.dialog_headers = tmp_dialog_headers; + mode.lists_all_workspaces = tmp_lists_all_workspaces; } autosave(); data = NULL; @@ -1895,6 +1897,7 @@ AUDIO_PLAY("SOUND_SETTINGS_MISCELLANEOUS"); tmp_dialog_headers = mode.dialog_headers; + tmp_lists_all_workspaces = mode.lists_all_workspaces; d = CreateDialog("CONFIGURE_MISCELLANEOUS"); DialogSetTitle(d, _("Miscellaneous Settings")); @@ -1930,6 +1933,13 @@ DialogItemCheckButtonSetState(di, tmp_dialog_headers); DialogItemCheckButtonSetPtr(di, &tmp_dialog_headers); + di = DialogAddItem(table, DITEM_CHECKBUTTON); + DialogItemSetPadding(di, 2, 2, 2, 2); + DialogItemSetFill(di, 1, 0); + DialogItemCheckButtonSetText(di, _("Task menu and iconboxes show windows\nfrom all workspaces")); + DialogItemCheckButtonSetState(di, tmp_lists_all_workspaces); + DialogItemCheckButtonSetPtr(di, &tmp_lists_all_workspaces); + di = DialogAddItem(table, DITEM_SEPARATOR); DialogItemSetColSpan(di, 2); DialogItemSetPadding(di, 2, 2, 2, 2); @@ -3944,6 +3954,7 @@ tmp_ib_cover_hide = ib->cover_hide; tmp_ib_autoresize_anchor = ib->auto_resize_anchor; tmp_ib_animate = ib->animate; + if (tmp_ib_name) Efree(tmp_ib_name); tmp_ib_name = duplicate(name); diff -ruNw e/src/setup.c e.ben/src/setup.c --- e/src/setup.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/setup.c 2003-08-27 19:05:51.000000000 -0400 @@ -504,6 +504,7 @@ mode.group_swapmove = 1; mode.area_wraparound = 0; mode.dialog_headers = 0; + mode.lists_all_workspaces = 0; mode.clickalways = 0; mode.keybinds_changed = 0; diff -ruNw e/src/warp.c e.ben/src/warp.c --- e/src/warp.c 2003-08-27 19:04:52.000000000 -0400 +++ e.ben/src/warp.c 2003-08-27 19:27:55.000000000 -0400 @@ -100,7 +100,7 @@ for (i = num0 - 1; i >= 0; --i) { ewin = lst0[i]; - if (((ewin->sticky) || (ewin->desktop == desks.current)) + if (((ewin->sticky) || (ewin->desktop == desks.current) || ((mode.lists_all_workspaces) && (ewin->iconified))) && (ewin->x + ewin->w > 0) && (ewin->x < root.w) && (ewin->y + ewin->h > 0) && (ewin->y < root.h) && (!ewin->skipfocus) && !(ewin->shaded
diff -ruNw e.ben/src/menus.c e.ben.menu/src/menus.c --- e.ben/src/menus.c 2003-08-27 19:35:57.000000000 -0400 +++ e.ben.menu/src/menus.c 2003-08-27 19:43:00.000000000 -0400 @@ -56,7 +56,10 @@ task_menu_style = ms; mode.cur_menu_mode = 1; m = NULL; + if (mode.lists_all_workspaces) m = RefreshAllTaskMenu(all_task_menu); + else + m = RefreshTaskMenu(desks.current); all_task_menu = m; if (m) {