Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h ewins.c mod-misc.c
Log Message:
Quick hack to set ARGB clients to borderless by default.
Mixing 32 and 24 bit visuals seems to crash some(?) X servers.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -3 -r1.415 -r1.416
--- E.h 29 Apr 2005 17:37:29 -0000 1.415
+++ E.h 29 Apr 2005 18:24:50 -0000 1.416
@@ -978,6 +978,7 @@
char memory_paranoia;
char save_under;
int edge_flip_resistance;
+ char argb_clients_borderless;
/* Not used */
#ifdef HAS_XINERAMA
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- ewins.c 29 Apr 2005 17:37:29 -0000 1.50
+++ ewins.c 29 Apr 2005 18:24:52 -0000 1.51
@@ -70,6 +70,14 @@
XWindowAttributes win_attr;
require_argb = 0;
+ if (type == EWIN_TYPE_NORMAL)
+ {
+ if (!XGetWindowAttributes(disp, win, &win_attr))
+ return NULL;
+ if (win_attr.depth == 32)
+ require_argb = 1;
+ }
+
ewin = Ecalloc(1, sizeof(EWin));
ewin->type = type;
@@ -110,17 +118,10 @@
ewin->ewmh.opacity = 0; /* If 0, ignore */
- {
- Status s = XGetWindowAttributes(disp, win, &win_attr);
-
- if (s != BadDrawable && s != BadWindow && win_attr.depth == 32)
- {
- frame = ECreateVisualWindow(VRoot.win, -10, -10, 1, 1, 1, &win_attr);
- require_argb = 1;
- }
- else
- frame = ECreateWindow(VRoot.win, -10, -10, 1, 1, 1);
- }
+ if (require_argb)
+ frame = ECreateVisualWindow(VRoot.win, -10, -10, 1, 1, 1, &win_attr);
+ else
+ frame = ECreateWindow(VRoot.win, -10, -10, 1, 1, 1);
ewin->o.stacked = -1; /* Not placed on desk yet */
EobjInit(&ewin->o, EOBJ_TYPE_EWIN, frame, -10, -10, -1, -1, NULL);
@@ -168,6 +169,10 @@
ewin->client.bw = 0;
}
+ if (require_argb && Conf.argb_clients_borderless)
+ ewin->border =
+ FindItem("BORDERLESS", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
+
ModulesSignal(ESIGNAL_EWIN_CREATE, ewin);
return ewin;
@@ -530,6 +535,8 @@
EwinCleanup(ewin);
else
ewin = EwinCreate(win, EWIN_TYPE_NORMAL);
+ if (!ewin)
+ return NULL;
ICCCM_AdoptStart(ewin);
ICCCM_GetTitle(ewin, 0);
@@ -590,6 +597,8 @@
EWin *ewin;
ewin = EwinCreate(win, type);
+ if (!ewin)
+ return NULL;
ewin->border = border;
@@ -642,16 +651,14 @@
ecore_x_grab();
- if (!WinExists(win))
+ /* adopt the new baby */
+ ewin = Adopt(ewin, win);
+ if (!ewin)
{
Eprintf("Window is gone %#lx\n", win);
- ecore_x_ungrab();
- return;
+ goto done;
}
- /* adopt the new baby */
- ewin = Adopt(ewin, win);
-
/* if it hasn't been planted on a desktop - assign it the current desktop */
desk = EoGetDesk(ewin);
@@ -753,8 +760,7 @@
EwinSetFullscreen(ewin, 1);
ewin->client.already_placed = 1;
ShowEwin(ewin);
- ecore_x_ungrab();
- return;
+ goto done;
}
ResizeEwin(ewin, ewin->client.w, ewin->client.h);
@@ -823,11 +829,10 @@
if (ewin->client.start_iconified)
{
MoveEwinToDesktopAt(ewin, desk, x, y);
- ecore_x_ungrab();
ewin->state = EWIN_STATE_MAPPED;
EwinIconify(ewin);
ewin->state = EWIN_STATE_ICONIC;
- return;
+ goto done;
}
/* if we should slide it in and are not currently in the middle of a slide
*/
@@ -857,10 +862,9 @@
GrabPointerSet(VRoot.win, ECSR_GRAB, 0);
Mode.have_place_grab = 1;
Mode.place = 1;
- ecore_x_ungrab();
EoSetFloating(ewin, 1); /* Causes reparenting to root */
ActionMoveStart(ewin, 1, 0, 0);
- return;
+ goto done;
}
else if ((doslide) && (!Mode.doingslide))
{
@@ -896,6 +900,7 @@
ShowEwin(ewin);
}
+ done:
ecore_x_ungrab();
}
@@ -913,6 +918,8 @@
b = FindItem(bname, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
ewin = AdoptInternal(win, b, type, init, ptr);
+ if (!ewin)
+ goto done;
#if 0
Eprintf("Desk=%d, layer=%d, sticky=%d, floating=%d\n",
@@ -922,6 +929,7 @@
EwinConformToDesktop(ewin);
+ done:
ecore_x_ungrab();
return ewin;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/mod-misc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- mod-misc.c 25 Apr 2005 22:07:37 -0000 1.15
+++ mod-misc.c 29 Apr 2005 18:24:52 -0000 1.16
@@ -146,6 +146,7 @@
CFG_ITEM_BOOL(Conf, memory_paranoia, 1),
CFG_ITEM_BOOL(Conf, save_under, 0),
CFG_ITEM_INT(Conf, edge_flip_resistance, 25),
+ CFG_ITEM_BOOL(Conf, argb_clients_borderless, 1),
};
#define N_CFG_ITEMS ((int)(sizeof(MiscCfgItems)/sizeof(CfgItem)))
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs