Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Tag: branch-exp E.h ewin-ops.c ewins.c ewmh.c iconify.c Log Message: Merge. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.314.2.45 retrieving revision 1.314.2.46 diff -u -3 -r1.314.2.45 -r1.314.2.46 --- E.h 21 Sep 2004 19:45:13 -0000 1.314.2.45 +++ E.h 21 Sep 2004 21:57:18 -0000 1.314.2.46 @@ -821,12 +821,6 @@ char floating; char shapedone; char fixedpos; -#if 0 /* ENABLE_GNOME - Not actually used */ - int expanded_x; - int expanded_y; - int expanded_width; - int expanded_height; -#endif char ignorearrange; char skiptask; char skip_ext_pager; @@ -852,6 +846,7 @@ } strut; struct { + unsigned donthide:1; /* Don't hide on show desktop */ unsigned vroot:1; /* Virtual root window */ unsigned inhibit_iconify:1; unsigned autosave:1; @@ -862,6 +857,7 @@ unsigned maximized_horz:1; unsigned maximized_vert:1; unsigned fullscreen:1; + unsigned showingdesk:1; /* Iconified by show desktop */ } st; struct { @@ -1733,6 +1729,8 @@ const char *EwinGetTitle(const EWin * ewin); const char *EwinGetIconName(const EWin * ewin); int EwinIsOnScreen(EWin * ewin); +void EwinRememberPositionSet(EWin * ewin); +void EwinRememberPositionGet(EWin * ewin, int *px, int *py); void EwinChange(EWin * ewin, unsigned int flag); void EwinChangesStart(EWin * ewin); @@ -1740,6 +1738,7 @@ void EwinsEventsConfigure(int mode); void EwinsSetFree(void); +void EwinsShowDesktop(int on); /* ewin-ops.c */ void SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty, =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewin-ops.c,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -3 -r1.1.2.8 -r1.1.2.9 --- ewin-ops.c 17 Sep 2004 16:13:43 -0000 1.1.2.8 +++ ewin-ops.c 21 Sep 2004 21:57:19 -0000 1.1.2.9 @@ -316,7 +316,7 @@ int i, num; char was_shaded; - EDBUG(6, "IconboxIconifyEwin"); + EDBUG(6, "EwinIconify"); if (!ewin) EDBUG_RETURN_; @@ -340,9 +340,8 @@ HideEwin(ewin); - /* Save position at which the window was iconified in req_x/y */ - ewin->req_x = ewin->x; - ewin->req_y = ewin->y; + /* Save position at which the window was iconified */ + EwinRememberPositionSet(ewin); if (was_shaded != ewin->shaded) EwinInstantShade(ewin, 0); @@ -359,8 +358,7 @@ HideEwin(e); e->iconified = 4; - e->req_x = e->x; - e->req_y = e->y; + EwinRememberPositionSet(e); } if (lst) Efree(lst); @@ -381,7 +379,7 @@ static int call_depth = 0; EWin **lst, *e; int i, num; - int x, y, dx, dy; + int x, y, ox, oy, dx, dy; EDBUG(6, "EwinDeIconify"); @@ -392,27 +390,31 @@ if (ewin->state != EWIN_STATE_ICONIC) EDBUG_RETURN_; - x = ewin->req_x; - y = ewin->req_y; + EwinRememberPositionGet(ewin, &ox, &oy); + x = ox; + y = oy; - /* If we iconified an offscreen window, get it back on screen */ - if (x + ewin->w <= 4 || x > VRoot.w - 4 || - y + ewin->h <= 4 || y > VRoot.h - 4) - { - dx = ewin->w / 2; - dy = ewin->h / 2; - x = (ewin->x + dx) % VRoot.w; - if (x < 0) - x += VRoot.w; - x -= dx; - y = (ewin->y + dy) % VRoot.h; - if (y < 0) - y += VRoot.h; - y -= dy; + if (!ewin->st.showingdesk) + { + /* If we iconified an offscreen window, get it back on screen */ + if (x + ewin->w <= 4 || x > VRoot.w - 4 || + y + ewin->h <= 4 || y > VRoot.h - 4) + { + dx = ewin->w / 2; + dy = ewin->h / 2; + x = (ewin->x + dx) % VRoot.w; + if (x < 0) + x += VRoot.w; + x -= dx; + y = (ewin->y + dy) % VRoot.h; + if (y < 0) + y += VRoot.h; + y -= dy; + } } - dx = x - ewin->req_x; - dy = y - ewin->req_y; + dx = x - ox; + dy = y - oy; if (ewin->sticky) MoveEwin(ewin, x, y); @@ -423,6 +425,8 @@ ModulesSignal(ESIGNAL_EWIN_DEICONIFY, ewin); + ewin->st.showingdesk = 0; + RaiseEwin(ewin); ShowEwin(ewin); ICCCM_DeIconify(ewin); @@ -434,10 +438,11 @@ if (e->iconified != 4) continue; + EwinRememberPositionGet(e, &ox, &oy); if (e->sticky) - MoveEwin(e, e->req_x + dx, e->req_y + dy); + MoveEwin(e, ox + dx, oy + dy); else - MoveEwinToDesktopAt(e, desks.current, e->req_x + dx, e->req_y + dy); + MoveEwinToDesktopAt(e, desks.current, ox + dx, oy + dy); RaiseEwin(e); ShowEwin(e); @@ -1153,6 +1158,38 @@ } void +EwinsShowDesktop(int on) +{ + EWin *const *lst, *ewin; + int i, num; + + lst = EwinListGetForDesktop(desks.current, &num); + + for (i = 0; i < num; i++) + { + ewin = lst[i]; + + if (on) + { + if (ewin->internal || ewin->iconified || ewin->props.donthide || + ewin->client.transient) + continue; + + ewin->st.showingdesk = 1; + EwinIconify(ewin); + } + else + { + if (!ewin->st.showingdesk) + continue; + + EwinDeIconify(ewin); + } + } + EWMH_SetShowingDesktop(on); +} + +void MoveEwinToArea(EWin * ewin, int ax, int ay) { AreaFix(&ax, &ay); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -u -3 -r1.1.2.16 -r1.1.2.17 --- ewins.c 21 Sep 2004 19:45:13 -0000 1.1.2.16 +++ ewins.c 21 Sep 2004 21:57:19 -0000 1.1.2.17 @@ -639,7 +639,10 @@ /* if is an afterstep/windowmaker dock app - dock it */ if (Conf.dock.enable && ewin->docked) - DockIt(ewin); + { + DockIt(ewin); + ewin->props.donthide = 1; + } /* if set for borderless then dont slide it in */ if ((!ewin->client.mwm_decor_title) && (!ewin->client.mwm_decor_border)) @@ -1579,6 +1582,47 @@ } /* + * Save current position in absolute viewport coordinates + */ +void +EwinRememberPositionSet(EWin * ewin) +{ + int ax, ay; + + ewin->req_x = ewin->x; + ewin->req_y = ewin->y; + if (!ewin->sticky) + { + ax = desks.desk[ewin->desktop].current_area_x; + ay = desks.desk[ewin->desktop].current_area_y; + ewin->req_x += ax * VRoot.w; + ewin->req_y += ay * VRoot.h; + } +} + +/* + * Get saved position in relative viewport coordinates + */ +void +EwinRememberPositionGet(EWin * ewin, int *px, int *py) +{ + int x, y, ax, ay; + + x = ewin->req_x; + y = ewin->req_y; + if (!ewin->sticky) + { + ax = desks.desk[ewin->desktop].current_area_x; + ay = desks.desk[ewin->desktop].current_area_y; + x -= ax * VRoot.w; + y -= ay * VRoot.h; + } + + *px = x; + *py = y; +} + +/* * Change requests */ static struct =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v retrieving revision 1.55.2.5 retrieving revision 1.55.2.6 diff -u -3 -r1.55.2.5 -r1.55.2.6 --- ewmh.c 5 Sep 2004 22:24:35 -0000 1.55.2.5 +++ ewmh.c 21 Sep 2004 21:57:19 -0000 1.55.2.6 @@ -704,6 +704,7 @@ ewin->skipfocus = 1; ewin->fixedpos = 1; EwinSetBorderByName(ewin, "BORDERLESS", 0); + ewin->props.donthide = 1; } else if (atom == _NET_WM_WINDOW_TYPE_DOCK) { @@ -712,6 +713,7 @@ ewin->skipfocus = 1; ewin->sticky = 1; ewin->never_use_area = 1; + ewin->props.donthide = 1; } else if (atom == _NET_WM_WINDOW_TYPE_UTILITY) { @@ -720,6 +722,7 @@ ewin->skipwinlist = 1; ewin->skipfocus = 1; ewin->never_use_area = 1; + ewin->props.donthide = 1; } #if 0 /* Not used by E (yet?) */ else if (atom == _NET_WM_WINDOW_TYPE_TOOLBAR) @@ -874,9 +877,7 @@ } else if (event->message_type == _NET_SHOWING_DESKTOP) { - Eprintf("EWMH_ProcessClientMessage: _NET_SHOWING_DESKTOP: %ld\n", - event->data.l[0]); - EWMH_SetShowingDesktop(event->data.l[0]); + EwinsShowDesktop(event->data.l[0]); goto done; } else if (event->message_type == _NET_STARTUP_INFO_BEGIN) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.116.2.20 retrieving revision 1.116.2.21 diff -u -3 -r1.116.2.20 -r1.116.2.21 --- iconify.c 21 Sep 2004 19:45:13 -0000 1.116.2.20 +++ iconify.c 21 Sep 2004 21:57:19 -0000 1.116.2.21 @@ -673,7 +673,7 @@ ib = SelectIconboxForEwin(ewin); if (ib) { - if (ib->animate) + if (ib->animate && !ewin->st.showingdesk) IB_Animate(1, ewin, ib->ewin); UpdateAppIcon(ewin, ib->icon_mode); IconboxAddEwin(ib, ewin); @@ -688,7 +688,7 @@ SoundPlay("SOUND_DEICONIFY"); ib = SelectIconboxForEwin(ewin); - if (ib && ib->animate) + if (ib && ib->animate && !ewin->st.showingdesk) IB_Animate(0, ewin, ib->ewin); } ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs