Mon Nov 15 13:20:05 PST 1999 Michael Jennings <mej@eterm.org>
Two more bugs fixed. One, Trevor Powell <vulpine@zikzak.net> spotted an issue with left-side scrollbars which is now fixed. Two...um... ahem. Fixed the auto mode titlebar thing. *cough* Turns out I was doing something stupid with my IPC window (i.e., not having one) that caused E to ignore lots of events on my window. Oops, sorry folks. raster has given me the cl00bat beating, so it's fixed now. :-] SVN revision: 1314
This commit is contained in:
parent
25345b9511
commit
5b5d19e63b
10
ChangeLog
10
ChangeLog
|
@ -2782,3 +2782,13 @@ Fri Nov 12 19:37:35 PST 1999 Michael Jennings <mej@eterm.org>
|
|||
operations are a lot smoother and cleaner now.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Mon Nov 15 13:20:05 PST 1999 Michael Jennings <mej@eterm.org>
|
||||
|
||||
Two more bugs fixed. One, Trevor Powell <vulpine@zikzak.net> spotted
|
||||
an issue with left-side scrollbars which is now fixed. Two...um...
|
||||
ahem. Fixed the auto mode titlebar thing. *cough* Turns out I was
|
||||
doing something stupid with my IPC window (i.e., not having one) that
|
||||
caused E to ignore lots of events on my window. Oops, sorry folks.
|
||||
raster has given me the cl00bat beating, so it's fixed now. :-]
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
10
src/e.c
10
src/e.c
|
@ -46,7 +46,7 @@ static const char cvs_ident[] = "$Id$";
|
|||
#include "pixmap.h"
|
||||
#include "system.h"
|
||||
|
||||
Window ipc_win = None;
|
||||
Window ipc_win = None, my_ipc_win = None;
|
||||
Atom ipc_atom = None;
|
||||
static unsigned char timeout = 0;
|
||||
|
||||
|
@ -117,6 +117,9 @@ enl_ipc_get_win(void)
|
|||
enl_ipc_send("set web http://www.eterm.org/");
|
||||
enl_ipc_send("set info Eterm Enlightened Terminal Emulator");
|
||||
}
|
||||
if (my_ipc_win == None) {
|
||||
my_ipc_win = XCreateSimpleWindow(Xdisplay, Xroot, -2, -2, 1, 1, 0, 0, 0);
|
||||
}
|
||||
return (ipc_win);
|
||||
}
|
||||
|
||||
|
@ -155,6 +158,7 @@ enl_ipc_send(char *str)
|
|||
D_ENL(("enl_ipc_send(): IPC error: Unable to find/create ENL_MSG atom.\n"));
|
||||
return;
|
||||
}
|
||||
for (; XCheckTypedWindowEvent(Xdisplay, my_ipc_win, ClientMessage, &ev);); /* Discard any out-of-sync messages */
|
||||
ev.xclient.type = ClientMessage;
|
||||
ev.xclient.serial = 0;
|
||||
ev.xclient.send_event = True;
|
||||
|
@ -163,7 +167,7 @@ enl_ipc_send(char *str)
|
|||
ev.xclient.format = 8;
|
||||
|
||||
for (i = 0; i < len + 1; i += 12) {
|
||||
sprintf(buff, "%8x", (int) TermWin.parent);
|
||||
sprintf(buff, "%8x", (int) my_ipc_win);
|
||||
for (j = 0; j < 12; j++) {
|
||||
buff[8 + j] = str[i + j];
|
||||
if (!str[i + j]) {
|
||||
|
@ -196,7 +200,7 @@ enl_wait_for_reply(void)
|
|||
register unsigned char i;
|
||||
|
||||
alarm(3);
|
||||
for (; !XCheckTypedWindowEvent(Xdisplay, TermWin.parent, ClientMessage, &ev) && !timeout;);
|
||||
for (; !XCheckTypedWindowEvent(Xdisplay, my_ipc_win, ClientMessage, &ev) && !timeout;);
|
||||
alarm(0);
|
||||
if (ev.xany.type != ClientMessage) {
|
||||
return (IPC_TIMEOUT);
|
||||
|
|
|
@ -416,22 +416,19 @@ Create_Windows(int argc, char *argv[])
|
|||
/* the vt window */
|
||||
if ((!(Options & Opt_borderless)) && (Options & Opt_backing_store)) {
|
||||
D_X11(("Creating term window with save_under = TRUE\n"));
|
||||
TermWin.vt = XCreateWindow(Xdisplay, TermWin.parent, 0, 0, szHint.width, szHint.height, 0, Xdepth, InputOutput, CopyFromParent,
|
||||
TermWin.vt = XCreateWindow(Xdisplay, TermWin.parent, (((Options & Opt_scrollBar) && !(Options & Opt_scrollBar_right)) ? scrollbar_trough_width() : 0), 0,
|
||||
szHint.width, szHint.height, 0, Xdepth, InputOutput, CopyFromParent,
|
||||
CWBackPixel | CWBorderPixel | CWOverrideRedirect | CWBackingStore | CWColormap, &Attributes);
|
||||
if (!(background_is_pixmap()) && !(Options & Opt_borderless)) {
|
||||
XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[bgColor]);
|
||||
XClearWindow(Xdisplay, TermWin.vt);
|
||||
}
|
||||
} else {
|
||||
D_X11(("Creating term window with no backing store\n"));
|
||||
TermWin.vt = XCreateWindow(Xdisplay, TermWin.parent, 0, 0, szHint.width, szHint.height, 0, Xdepth, InputOutput, CopyFromParent,
|
||||
TermWin.vt = XCreateWindow(Xdisplay, TermWin.parent, (((Options & Opt_scrollBar) && !(Options & Opt_scrollBar_right)) ? scrollbar_trough_width() : 0), 0,
|
||||
szHint.width, szHint.height, 0, Xdepth, InputOutput, CopyFromParent,
|
||||
CWBackPixel | CWBorderPixel | CWOverrideRedirect | CWColormap, &Attributes);
|
||||
if (!(background_is_pixmap()) && !(Options & Opt_borderless)) {
|
||||
XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[bgColor]);
|
||||
XClearWindow(Xdisplay, TermWin.vt);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(background_is_pixmap()) && !(Options & Opt_borderless)) {
|
||||
XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[bgColor]);
|
||||
XClearWindow(Xdisplay, TermWin.vt);
|
||||
}
|
||||
XDefineCursor(Xdisplay, TermWin.vt, TermWin_cursor);
|
||||
XSelectInput(Xdisplay, TermWin.vt, (ExposureMask | ButtonPressMask | ButtonReleaseMask | Button1MotionMask | Button3MotionMask));
|
||||
|
||||
|
|
Loading…
Reference in New Issue