Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ewins.c ewins.h hints.c snaps.c Log Message: Prepare for handling additional window flags in snapshots/across restart. =================================================================== RCS file: /cvs/e/e16/e/src/ewins.c,v retrieving revision 1.214 retrieving revision 1.215 diff -u -3 -r1.214 -r1.215 --- ewins.c 19 Jan 2008 13:44:54 -0000 1.214 +++ ewins.c 3 Feb 2008 17:03:23 -0000 1.215 @@ -1831,8 +1831,8 @@ } f; } EWinMiscFlags; -unsigned int -EwinFlagsEncode(const EWin * ewin) +void +EwinFlagsEncode(const EWin * ewin, unsigned int *flags) { EWinMiscFlags fm; @@ -1841,15 +1841,16 @@ fm.f.inh_user = ewin->inh_user.all; fm.f.inh_wm = ewin->inh_wm.all; - return fm.all; + flags[0] = fm.all; + flags[1] = 0; } void -EwinFlagsDecode(EWin * ewin, unsigned int flags) +EwinFlagsDecode(EWin * ewin, const unsigned int *flags) { EWinMiscFlags fm; - fm.all = flags; + fm.all = flags[0]; ewin->inh_app.all = fm.f.inh_app; ewin->inh_user.all = fm.f.inh_user; ewin->inh_wm.all = fm.f.inh_wm; =================================================================== RCS file: /cvs/e/e16/e/src/ewins.h,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- ewins.h 19 Jan 2008 13:44:54 -0000 1.80 +++ ewins.h 3 Feb 2008 17:03:23 -0000 1.81 @@ -384,8 +384,8 @@ int *px, int *py); void EwinSetPlacementGravity(EWin * ewin, int x, int y); void EwinReposition(EWin * ewin); -unsigned int EwinFlagsEncode(const EWin * ewin); -void EwinFlagsDecode(EWin * ewin, unsigned int flags); +void EwinFlagsEncode(const EWin * ewin, unsigned int *flags); +void EwinFlagsDecode(EWin * ewin, const unsigned int *flags); void EwinUpdateOpacity(EWin * ewin); void EwinChange(EWin * ewin, unsigned int flag); =================================================================== RCS file: /cvs/e/e16/e/src/hints.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -3 -r1.84 -r1.85 --- hints.c 18 May 2007 21:18:24 -0000 1.84 +++ hints.c 3 Feb 2008 17:03:23 -0000 1.85 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2007 Kim Woelders + * Copyright (C) 2003-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -348,6 +348,7 @@ EHintsSetInfo(const EWin * ewin) { int c[ENL_DATA_ITEMS]; + unsigned int flags[2]; EWinInfoFlags f; if (EwinIsInternal(ewin)) @@ -359,9 +360,9 @@ f.b.iconified = ewin->state.iconified; c[0] = f.all; - c[1] = EwinFlagsEncode(ewin); - - c[2] = 0; + EwinFlagsEncode(ewin, flags); + c[1] = flags[0]; + c[2] = flags[1]; c[3] = ewin->save_max.x; c[4] = ewin->save_max.y; @@ -391,6 +392,7 @@ char *str; int num; int c[ENL_DATA_ITEMS + 1]; + unsigned int flags[2]; EWinInfoFlags f; if (EwinIsInternal(ewin)) @@ -414,7 +416,9 @@ ewin->icccm.start_iconified = f.b.iconified; ewin->state.docked = f.b.docked; - EwinFlagsDecode(ewin, c[1]); + flags[0] = c[1]; + flags[1] = c[2]; + EwinFlagsDecode(ewin, flags); if (num == ENL_DATA_ITEMS) { =================================================================== RCS file: /cvs/e/e16/e/src/snaps.c,v retrieving revision 1.133 retrieving revision 1.134 diff -u -3 -r1.133 -r1.134 --- snaps.c 25 Jul 2007 20:02:57 -0000 1.133 +++ snaps.c 3 Feb 2008 17:03:23 -0000 1.134 @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -57,7 +57,7 @@ int layer; char sticky; char shaded; - unsigned int flags; + unsigned int flags[2]; char *cmd; int *groups; int num_groups; @@ -379,7 +379,7 @@ static void SnapEwinFlags(Snapshot * sn, const EWin * ewin) { - sn->flags = EwinFlagsEncode(ewin); + EwinFlagsEncode(ewin, sn->flags); } static void @@ -1156,7 +1156,7 @@ fprintf(f, "SKIPFOCUS: %i\n", sn->skipfocus); } if (sn->use_flags & SNAP_USE_FLAGS) - fprintf(f, "FLAGS: %#x\n", sn->flags); + fprintf(f, "FLAGS: %#x %#x\n", sn->flags[0], sn->flags[1]); #if USE_COMPOSITE if (sn->use_flags & SNAP_USE_OPACITY) fprintf(f, "OPACITY: %i %i\n", sn->opacity, sn->focused_opacity); @@ -1371,7 +1371,8 @@ else if (!strcmp(buf, "FLAGS")) { sn->use_flags |= SNAP_USE_FLAGS; - sn->flags = strtoul(s, NULL, 0); + sn->flags[0] = sn->flags[1] = 0; + sscanf(s, "%i %i", sn->flags, sn->flags + 1); } else if (!strcmp(buf, "GROUP")) { @@ -1684,7 +1685,7 @@ (" skiptask: %d skipfocus: %d skipwinlist: %d\n", sn->skiptask, sn->skipfocus, sn->skipwinlist); if (sn->use_flags & SNAP_USE_FLAGS) - IpcPrintf(" flags: %#x\n", sn->flags); + IpcPrintf(" flags: %#x %#x\n", sn->flags[0], sn->flags[1]); IpcPrintf("\n"); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs