diff options
author | Michael Jennings <mej@kainx.org> | 1999-09-20 23:57:57 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 1999-09-20 23:57:57 +0000 |
commit | e4070d20750f99ce8b68120c5d0c54d59758e890 (patch) | |
tree | 06eb2ee2481100f07cf44b458332fe680f709c25 /src/windows.c | |
parent | 933cb583be08cdeff4b3da15d5a61542dd9eea6e (diff) | |
download | eterm-e4070d20750f99ce8b68120c5d0c54d59758e890.tar.gz |
Reverting last change for now. Something's very wrong here.
SVN revision: 347
Diffstat (limited to 'src/windows.c')
-rw-r--r-- | src/windows.c | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/src/windows.c b/src/windows.c index 4cd394d..3e3a5d8 100644 --- a/src/windows.c +++ b/src/windows.c @@ -151,8 +151,8 @@ Create_Windows(int argc, char *argv[]) XWMHints wmHint; Atom prop = None; CARD32 val; - int i, x = 0, y = 0, flags; - unsigned int width = 0, height = 0; + int i, x, y, flags; + unsigned int width, height; unsigned int r, g, b; MWMHints mwmhints; @@ -348,9 +348,7 @@ Create_Windows(int argc, char *argv[]) szHint.y = y; szHint.flags |= USPosition; } - if (flags) { - D_X11(("Geometry values after parsing: %dx%d%+d%+d\n", width, height, x, y)); - } + D_X11(("Geometry values after parsing: %dx%d%+d%+d\n", width, height, x, y)); /* parent window - reverse video so we can see placement errors * sub-window placement & size in resize_subwindows() @@ -500,9 +498,11 @@ resize_subwindows(int width, int height) } #endif width -= scrollbar_trough_width(); - XMoveResizeWindow(Xdisplay, scrollBar.win, ((Options & Opt_scrollBar_right) ? (width) : (x)), 0, scrollbar_trough_width(), height); + XMoveResizeWindow(Xdisplay, scrollBar.win, + ((Options & Opt_scrollBar_right) ? (width) : (x)), + 0, scrollbar_trough_width(), height); if (scrollbar_is_pixmapped()) { - scrollbar_show(0); + render_simage(images[image_sb].current, scrollBar.win, scrollbar_trough_width(), scrollbar_trough_height(), image_sb, 0); } if (!(Options & Opt_scrollBar_right)) { x = scrollbar_trough_width(); @@ -514,39 +514,40 @@ resize_subwindows(int width, int height) if (old_width) Gr_Resize(old_width, old_height); #endif - if (!(background_is_pixmap())) { + XClearWindow(Xdisplay, TermWin.vt); + if (!(background_is_pixmap())) XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[bgColor]); - XClearWindow(Xdisplay, TermWin.vt); - scr_touch(); - } else { #ifdef PIXMAP_SUPPORT # ifdef USE_POSIX_THREADS - D_PIXMAP(("resize_subwindows(): start_bg_thread()\n")); - pthread_attr_init(&resize_sub_thr_attr); + D_PIXMAP(("resize_subwindows(): start_bg_thread()\n")); + pthread_attr_init(&resize_sub_thr_attr); # ifdef MUTEX_SYNCH - if (pthread_mutex_trylock(&mutex) == EBUSY) { - D_THREADS(("resize_subwindows(): mutex locked, bbl\n")); - } else { - D_THREADS(("pthread_mutex_trylock(&mutex): ")); - pthread_mutex_unlock(&mutex); - D_THREADS(("pthread_mutex_unlock(&mutex)\n")); - } + if (pthread_mutex_trylock(&mutex) == EBUSY) { + D_THREADS(("resize_subwindows(): mutex locked, bbl\n")); + } else { + D_THREADS(("pthread_mutex_trylock(&mutex): ")); + pthread_mutex_unlock(&mutex); + D_THREADS(("pthread_mutex_unlock(&mutex)\n")); + } # endif - if (!(pthread_create(&resize_sub_thr, &resize_sub_thr_attr, (void *) &render_bg_thread, NULL))) { - /* bg_set = 0; */ - D_THREADS(("thread created\n")); - } else { - D_THREADS(("pthread_create() failed!\n")); - } + if (!(pthread_create(&resize_sub_thr, &resize_sub_thr_attr, + (void *) &render_bg_thread, NULL))) { + /* bg_set = 0; */ + D_THREADS(("thread created\n")); + } else { + D_THREADS(("pthread_create() failed!\n")); + } + # else - redraw_image(image_bg); + D_PIXMAP(("resize_subwindows(): render_pixmap(TermWin.vt)\n")); + render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1); + XSync(Xdisplay, 0); # endif #endif - } } void @@ -600,8 +601,11 @@ resize_window1(unsigned int width, unsigned int height) if (curr_screen >= 0) /* this is not the first time thru */ scr_change_screen(curr_screen); first_time = 0; - } else if (image_mode_is(image_bg, MODE_TRANS) || image_mode_is(image_bg, MODE_VIEWPORT)) { + } else if (((Options & Opt_pixmapTrans) || (images[image_bg].mode & MODE_TRANS)) + || ((Options & Opt_viewport_mode) || (images[image_bg].mode & MODE_VIEWPORT))) { resize_subwindows(width, height); + scrollbar_show(0); + scr_touch(); } } |