Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h borders.c evhandlers.c
Log Message:
Redraw borders after move when theme transparency is on. Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -3 -r1.216 -r1.217
--- E.h 1 Mar 2004 21:03:53 -0000 1.216
+++ E.h 2 Mar 2004 19:17:13 -0000 1.217
@@ -1697,13 +1697,9 @@
int type, void *ptr);
void HonorIclass(char *s, int id);
void SyncBorderToEwin(EWin * ewin);
-void UpdateBorderInfo(EWin * ewin);
-void RealiseEwinWinpart(EWin * ewin, int i);
-int DrawEwinWinpart(EWin * ewin, int i);
int ChangeEwinWinpart(EWin * ewin, int i);
void DrawEwin(EWin * ewin);
int ChangeEwinWinpartContents(EWin * ewin, int i);
-void CalcEwinSizes(EWin * ewin);
EWin *Adopt(Window win);
EWin *AdoptInternal(Window win, Border * border, int type,
void *ptr);
@@ -1722,6 +1718,7 @@
void EwinChangesStart(EWin * ewin);
void EwinChangesProcess(EWin * ewin);
+int BordersEventExpose(XEvent * ev);
int BordersEventMouseDown(XEvent * ev);
int BordersEventMouseUp(XEvent * ev);
int BordersEventMouseIn(XEvent * ev);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -3 -r1.142 -r1.143
--- borders.c 1 Mar 2004 21:03:53 -0000 1.142
+++ borders.c 2 Mar 2004 19:17:16 -0000 1.143
@@ -730,51 +730,6 @@
}
void
-HonorIclass(char *s, int id)
-{
- AwaitIclass *a;
- EWin *ewin;
-
- EDBUG(4, "HonorIclass");
-
- a = RemoveItem(s, 0, LIST_FINDBY_NAME, LIST_TYPE_AWAIT_ICLASS);
- if (!a)
- EDBUG_RETURN_;
-
- ewin = FindItem(NULL, a->client_win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- {
- if (a->ewin_bit < ewin->border->num_winparts)
- {
- if ((ewin->border->part[a->ewin_bit].iclass->external)
- && (!ewin->bits[a->ewin_bit].win) && (id))
- {
- ewin->bits[a->ewin_bit].win = id;
- RealiseEwinWinpart(ewin, a->ewin_bit);
- EMapWindow(disp, id);
- ewin->shapedone = 0;
- if (!ewin->shapedone)
- {
- PropagateShapes(ewin->win);
- }
- else
- {
- if (ewin->border->changes_shape)
- PropagateShapes(ewin->win);
- }
- ewin->shapedone = 1;
- }
- }
- }
- if (a->iclass)
- a->iclass->ref_count--;
-
- Efree(a);
-
- EDBUG_RETURN_;
-}
-
-void
SyncBorderToEwin(EWin * ewin)
{
Border *b;
@@ -1165,6 +1120,51 @@
EDBUG_RETURN_;
}
+void
+HonorIclass(char *s, int id)
+{
+ AwaitIclass *a;
+ EWin *ewin;
+
+ EDBUG(4, "HonorIclass");
+
+ a = RemoveItem(s, 0, LIST_FINDBY_NAME, LIST_TYPE_AWAIT_ICLASS);
+ if (!a)
+ EDBUG_RETURN_;
+
+ ewin = FindItem(NULL, a->client_win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ if (ewin)
+ {
+ if (a->ewin_bit < ewin->border->num_winparts)
+ {
+ if ((ewin->border->part[a->ewin_bit].iclass->external)
+ && (!ewin->bits[a->ewin_bit].win) && (id))
+ {
+ ewin->bits[a->ewin_bit].win = id;
+ RealiseEwinWinpart(ewin, a->ewin_bit);
+ EMapWindow(disp, id);
+ ewin->shapedone = 0;
+ if (!ewin->shapedone)
+ {
+ PropagateShapes(ewin->win);
+ }
+ else
+ {
+ if (ewin->border->changes_shape)
+ PropagateShapes(ewin->win);
+ }
+ ewin->shapedone = 1;
+ }
+ }
+ }
+ if (a->iclass)
+ a->iclass->ref_count--;
+
+ Efree(a);
+
+ EDBUG_RETURN_;
+}
+
EWin *
Adopt(Window win)
{
@@ -1650,6 +1650,9 @@
if (!ewin)
return;
+ if (conf.theme.transparency)
+ DrawEwin(ewin); /* Update the border */
+
if (ewin->Refresh)
ewin->Refresh(ewin);
}
@@ -1662,6 +1665,9 @@
DetermineEwinArea(ewin);
+ if (conf.theme.transparency)
+ DrawEwin(ewin); /* Update the border */
+
if (ewin->MoveResize)
ewin->MoveResize(ewin, resize);
@@ -3129,6 +3135,15 @@
typedef void (border_event_func_t) (XEvent * ev, EWin * ewin, int part);
static void
+BorderWinpartEventExpose(XEvent * ev, EWin * ewin, int j)
+{
+ ewin->bits[j].no_expose = 0;
+ ewin->bits[j].expose = 1;
+ if (DrawEwinWinpart(ewin, j) && IsPropagateEwinOnQueue(ewin))
+ PropagateShapes(ewin->win);
+}
+
+static void
BorderWinpartEventMouseDown(XEvent * ev, EWin * ewin, int j)
{
GrabThePointer(ewin->bits[j].win);
@@ -3223,6 +3238,12 @@
}
int
+BordersEventExpose(XEvent * ev)
+{
+ return BordersEvent(ev, BorderWinpartEventExpose);
+}
+
+int
BordersEventMouseDown(XEvent * ev)
{
return BordersEvent(ev, BorderWinpartEventMouseDown);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- evhandlers.c 1 Mar 2004 21:03:53 -0000 1.153
+++ evhandlers.c 2 Mar 2004 19:17:17 -0000 1.154
@@ -672,39 +672,18 @@
void
HandleExpose(XEvent * ev)
{
- Window win = ev->xexpose.window;
- EWin **ewin;
- int i, j, num;
-
EDBUG(5, "HandleExpose");
- ewin = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
- for (i = 0; i < num; i++)
- {
- for (j = 0; j < ewin[i]->border->num_winparts; j++)
- {
- if (win == ewin[i]->bits[j].win)
- {
- ewin[i]->bits[j].no_expose = 0;
- ewin[i]->bits[j].expose = 1;
- if ((DrawEwinWinpart(ewin[i], j))
- && (IsPropagateEwinOnQueue(ewin[i])))
- PropagateShapes(ewin[i]->win);
- Efree(ewin);
- EDBUG_RETURN_;
- }
- }
- }
-
- if (ewin)
- Efree(ewin);
+ if (BordersEventExpose(ev))
+ goto exit;
if (ButtonsEventExpose(ev))
- EDBUG_RETURN_;
+ goto exit;
if (DialogEventExpose(ev))
- EDBUG_RETURN_;
+ goto exit;
+ exit:
EDBUG_RETURN_;
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs