Thu Oct 28 16:09:26 PDT 1999 Michael Jennings <mej@eterm.org>

Nothing really important here.  I may have fixed the refresh problem
	that a lot of people see when switching desktops and IRC-ing in an
	Eterm, but I'm not sure.  And I have once again discovered (well,
	re-discovered actually) that the remaining bits of rxvt code in the
	scrollbar are smelly piles of poop that I really need to get around
	to fixing one of these days.


SVN revision: 1032
This commit is contained in:
Michael Jennings 1999-10-28 15:22:58 +00:00
parent c554f5917e
commit 91187b41b2
6 changed files with 49 additions and 26 deletions

View File

@ -2663,3 +2663,13 @@ Thu Oct 28 13:12:17 PDT 1999 Michael Jennings <mej@eterm.org>
Eterms.
-------------------------------------------------------------------------------
Thu Oct 28 16:09:26 PDT 1999 Michael Jennings <mej@eterm.org>
Nothing really important here. I may have fixed the refresh problem
that a lot of people see when switching desktops and IRC-ing in an
Eterm, but I'm not sure. And I have once again discovered (well,
re-discovered actually) that the remaining bits of rxvt code in the
scrollbar are smelly piles of poop that I really need to get around
to fixing one of these days.
-------------------------------------------------------------------------------

View File

@ -2472,17 +2472,19 @@ cmd_getc(void)
RETURN_CHAR();
}
}
/* select statement timed out - better update the screen */
if (retval == 0) {
refresh_count = 0;
refresh_limit = 1;
if (!refreshed) {
refreshed = 1;
D_CMD(("cmd_getc(): scr_refresh() #2\n"));
D_CMD(("cmd_getc(): select() timed out, time to update the screen.\n"));
scr_refresh(refresh_type);
if (scrollbar_visible())
/* FIXME: This call is only here to update the anchor size/position.
It should be replaced with a call to a function that does just that
rather than calling a function that updates the background also. */
if (scrollbar_visible()) {
scrollbar_show(1);
}
#ifdef USE_XIM
xim_send_spot();
#endif

View File

@ -6,6 +6,7 @@
# define _DEBUG_H
#include <stdlib.h>
#include <time.h>
extern unsigned int debug_level;
@ -14,9 +15,9 @@ extern unsigned int debug_level;
#if defined(__FILE__) && defined(__LINE__)
# ifdef __FUNCTION__
# define __DEBUG() fprintf(stderr, "[debug] %12s | %4d | %30s: ", __FILE__, __LINE__, __FUNCTION__)
# define __DEBUG() fprintf(stderr, "[%lu] %12s | %4d | %30s: ", (unsigned long) time(NULL), __FILE__, __LINE__, __FUNCTION__)
# else
# define __DEBUG() fprintf(stderr, "[debug] %12s | %4d: ", __FILE__, __LINE__)
# define __DEBUG() fprintf(stderr, "[%lu] %12s | %4d: ", (unsigned long) time(NULL), __FILE__, __LINE__)
# endif
#endif

View File

@ -1019,7 +1019,7 @@ menu_action(menuitem_t * item)
}
void
menu_invoke(int x, int y, Window win, menu_t * menu, Time time)
menu_invoke(int x, int y, Window win, menu_t * menu, Time timestamp)
{
int root_x, root_y;
@ -1027,8 +1027,8 @@ menu_invoke(int x, int y, Window win, menu_t * menu, Time time)
REQUIRE(menu != NULL);
if (time != CurrentTime) {
button_press_time = time;
if (timestamp != CurrentTime) {
button_press_time = timestamp;
}
if (win != Xroot) {
XTranslateCoordinates(Xdisplay, win, Xroot, x, y, &root_x, &root_y, &unused);
@ -1038,7 +1038,7 @@ menu_invoke(int x, int y, Window win, menu_t * menu, Time time)
}
void
menu_invoke_by_title(int x, int y, Window win, char *title, Time time)
menu_invoke_by_title(int x, int y, Window win, char *title, Time timestamp)
{
menu_t *menu;
@ -1051,5 +1051,5 @@ menu_invoke_by_title(int x, int y, Window win, char *title, Time time)
D_MENU(("Menu \"%s\" not found!\n", title));
return;
}
menu_invoke(x, y, win, menu, time);
menu_invoke(x, y, win, menu, timestamp);
}

View File

@ -1138,11 +1138,12 @@ get_desktop_window(void)
unsigned int nchildren;
Window w, root, *children, parent;
D_PIXMAP(("get_desktop_window() called. Current desktop window is 0x%08x\n", (unsigned int) desktop_window));
if ((prop = XInternAtom(Xdisplay, "_XROOTPMAP_ID", True)) == None) {
D_PIXMAP(("No _XROOTPMAP_ID found.\n"));
D_PIXMAP(("get_desktop_window(): No _XROOTPMAP_ID found.\n"));
}
if ((prop2 = XInternAtom(Xdisplay, "_XROOTCOLOR_PIXEL", True)) == None) {
D_PIXMAP(("No _XROOTCOLOR_PIXEL found.\n"));
D_PIXMAP(("get_desktop_window(): No _XROOTCOLOR_PIXEL found.\n"));
}
if (prop == None && prop2 == None) {
return None;
@ -1153,13 +1154,13 @@ get_desktop_window(void)
for (w = TermWin.parent; w; w = parent) {
D_PIXMAP(("Current window ID is: 0x%08x\n", w));
D_PIXMAP((" Current window ID is: 0x%08x\n", w));
if ((XQueryTree(Xdisplay, w, &root, &parent, &children, &nchildren)) == False) {
D_PIXMAP((" Egad! XQueryTree() returned false!\n"));
D_PIXMAP((" Egad! XQueryTree() returned false!\n"));
return None;
}
D_PIXMAP((" Window is 0x%08x with %d children, root is 0x%08x, parent is 0x%08x\n",
D_PIXMAP((" Window is 0x%08x with %d children, root is 0x%08x, parent is 0x%08x\n",
w, nchildren, root, parent));
if (nchildren) {
XFree(children);
@ -1173,19 +1174,21 @@ get_desktop_window(void)
continue;
}
if (type != None) {
D_PIXMAP((" Found desktop as window 0x%08x\n", w));
D_PIXMAP(("get_desktop_window(): Found desktop as window 0x%08x\n", w));
if (w != Xroot) {
XSelectInput(Xdisplay, w, PropertyChangeMask);
}
if (desktop_window == w) {
D_PIXMAP((" Desktop window has not changed.\n"));
return ((Window) 1);
} else {
D_PIXMAP((" Desktop window has changed Updating desktop_window.\n"));
return (desktop_window = w);
}
}
}
D_PIXMAP(("No suitable parent found.\n"));
D_PIXMAP(("get_desktop_window(): No suitable parent found.\n"));
return (desktop_window = None);
}
@ -1201,7 +1204,9 @@ get_desktop_pixmap(void)
unsigned long length, after;
unsigned char *data;
D_PIXMAP(("get_desktop_pixmap() called. Current desktop pixmap is 0x%08x\n", (unsigned int) desktop_pixmap));
if (desktop_window == None) {
D_PIXMAP(("get_desktop_pixmap(): No desktop window. Aborting.\n"));
free_desktop_pixmap();
return (desktop_pixmap = None);
}
@ -1213,6 +1218,11 @@ get_desktop_pixmap(void)
free_desktop_pixmap();
return (desktop_pixmap = None);
}
if (color_pixmap != None) {
D_PIXMAP(("get_desktop_pixmap(): Removing old solid color pixmap 0x%08x.\n", color_pixmap));
XFreePixmap(Xdisplay, color_pixmap);
color_pixmap = None;
}
if (prop != None) {
XGetWindowProperty(Xdisplay, desktop_window, prop, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data);
if (type == XA_PIXMAP) {
@ -1220,8 +1230,10 @@ get_desktop_pixmap(void)
if (p != None) {
D_PIXMAP((" Found pixmap 0x%08x\n", p));
if (desktop_pixmap == p) {
D_PIXMAP(("get_desktop_pixmap(): Desktop pixmap is unchanged.\n"));
return ((Pixmap) 1);
} else {
D_PIXMAP(("get_desktop_pixmap(): Desktop pixmap has changed. Updating desktop_pixmap\n"));
free_desktop_pixmap();
return (desktop_pixmap = p);
}
@ -1243,15 +1255,13 @@ get_desktop_pixmap(void)
gcvalue.background = pix;
gc = XCreateGC(Xdisplay, TermWin.vt, GCForeground | GCBackground, &gcvalue);
if (color_pixmap != None) {
XFreePixmap(Xdisplay, color_pixmap);
}
color_pixmap = XCreatePixmap(Xdisplay, TermWin.vt, 16, 16, Xdepth);
XFillRectangle(Xdisplay, color_pixmap, gc, 0, 0, 16, 16);
D_PIXMAP(("get_desktop_pixmap(): Created solid color pixmap 0x%08x for desktop_pixmap.\n", color_pixmap));
return (desktop_pixmap = color_pixmap);
}
}
D_PIXMAP(("No suitable attribute found.\n"));
D_PIXMAP(("get_desktop_pixmap(): No suitable attribute found.\n"));
free_desktop_pixmap();
return (desktop_pixmap = None);

View File

@ -1594,7 +1594,7 @@ scr_expose(int x, int y, int width, int height)
drawn_rend[i][part_end.col] = RS_Dirty;
#ifdef USE_XIM
scr_refresh(SLOW_REFRESH);
scr_refresh(FAST_REFRESH);
#endif
}
@ -1768,9 +1768,6 @@ scr_refresh(int type)
case FAST_REFRESH:
D_SCREEN(("scr_refresh(FAST_REFRESH) called.\n"));
break;
case SMOOTH_REFRESH:
D_SCREEN(("scr_refresh(SMOOTH_REFRESH) called.\n"));
break;
}
if (type == NO_REFRESH)
return;
@ -2125,6 +2122,9 @@ scr_refresh(int type)
#if defined(PIXMAP_SUPPORT) && defined(PIXMAP_BUFFERING)
XClearWindow(Xdisplay, TermWin.vt);
#endif
if (type == SLOW_REFRESH) {
XSync(Xdisplay, False);
}
D_SCREEN(("scr_refresh() exiting.\n"));
#ifdef PROFILE_SCREEN