Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ewins.c ewmh.c Log Message: Move some window property derivation to allow tweaking stuff in snapshots. =================================================================== RCS file: /cvs/e/e16/e/src/ewins.c,v retrieving revision 1.203 retrieving revision 1.204 diff -u -3 -r1.203 -r1.204 --- ewins.c 11 Jul 2007 09:05:43 -0000 1.203 +++ ewins.c 11 Jul 2007 09:14:12 -0000 1.204 @@ -190,6 +190,41 @@ } static void +EwinHintsInferProps(EWin * ewin) +{ + if (ewin->ewmh.type.b.desktop) + { + EoSetLayer(ewin, 0); + if (!ewin->state.identified) + EoSetSticky(ewin, 1); + ewin->props.focusclick = 1; + ewin->props.skip_focuslist = 1; + EwinInhSetUser(ewin, move, 1); + EwinInhSetUser(ewin, size, 1); + ewin->props.donthide = 1; + ewin->props.no_border = 1; + } + if (ewin->ewmh.type.b.dock) + { + ewin->props.skip_ext_task = 1; + ewin->props.skip_winlist = 1; + ewin->props.skip_focuslist = 1; + if (!ewin->state.identified) + EoSetSticky(ewin, 1); + ewin->props.donthide = 1; + } + if (ewin->ewmh.type.b.utility) + { + /* Epplets hit this */ + ewin->props.skip_ext_task = 1; + ewin->props.skip_winlist = 1; + ewin->props.skip_focuslist = 1; + ewin->props.never_use_area = 1; + ewin->props.donthide = 1; + } +} + +static void EwinManage(EWin * ewin) { XSetWindowAttributes att; @@ -293,6 +328,7 @@ WindowMatchEwinOps(ewin); /* Window matches */ if (!EwinIsInternal(ewin) && Mode.wm.startup) EHintsGetInfo(ewin); /* E restart hints */ + EwinHintsInferProps(ewin); SnapshotsEwinMatch(ewin); /* Find a saved settings match */ SnapshotEwinApply(ewin); /* Apply saved settings */ =================================================================== RCS file: /cvs/e/e16/e/src/ewmh.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -3 -r1.118 -r1.119 --- ewmh.c 17 Apr 2007 21:31:30 -0000 1.118 +++ ewmh.c 11 Jul 2007 09:14:12 -0000 1.119 @@ -566,7 +566,7 @@ EWMH_GetWindowType(EWin * ewin) { Ecore_X_Atom *p_atoms, atom; - int n_atoms; + int n_atoms, i; ewin->ewmh.type.all = 0; @@ -582,58 +582,27 @@ return; } - atom = p_atoms[0]; - if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP) + for (i = 0; i < n_atoms; i++) { - EoSetLayer(ewin, 0); - EoSetSticky(ewin, 1); - ewin->props.focusclick = 1; - ewin->props.skip_focuslist = 1; - EwinInhSetUser(ewin, move, 1); - EwinInhSetUser(ewin, size, 1); - ewin->props.donthide = 1; - ewin->props.no_border = 1; - ewin->ewmh.type.b.desktop = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK) - { - ewin->props.skip_ext_task = 1; - ewin->props.skip_winlist = 1; - ewin->props.skip_focuslist = 1; - EoSetSticky(ewin, 1); - ewin->props.donthide = 1; - ewin->ewmh.type.b.dock = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY) - { - /* Epplets hit this */ - ewin->props.skip_ext_task = 1; - ewin->props.skip_winlist = 1; - ewin->props.skip_focuslist = 1; - ewin->props.never_use_area = 1; - ewin->props.donthide = 1; - ewin->ewmh.type.b.utility = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR) - { - ewin->ewmh.type.b.toolbar = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU) - { - ewin->ewmh.type.b.menu = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH) - { - ewin->ewmh.type.b.splash = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG) - { - ewin->ewmh.type.b.dialog = 1; - } - else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL) - { - ewin->ewmh.type.b.normal = 1; + atom = p_atoms[i]; + if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP) + ewin->ewmh.type.b.desktop = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK) + ewin->ewmh.type.b.dock = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY) + ewin->ewmh.type.b.utility = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR) + ewin->ewmh.type.b.toolbar = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU) + ewin->ewmh.type.b.menu = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH) + ewin->ewmh.type.b.splash = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG) + ewin->ewmh.type.b.dialog = 1; + else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL) + ewin->ewmh.type.b.normal = 1; } + Efree(p_atoms); } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs