Sun Sep 17 13:05:13 PDT 2000 Michael Jennings <mej@eterm.org>
When shaded, rely on Enlightenment rather than X for accurate x/y position information. This fixes a bug pointed out by Gnea <gnea@rochester.rr.com>. SVN revision: 3509
This commit is contained in:
parent
44d33b6fec
commit
7666c71c9b
|
@ -3897,3 +3897,10 @@ Sun Sep 17 11:51:16 PDT 2000 Michael Jennings <mej@eterm.org>
|
|||
Added ability to track Imlib2-created pixmaps via libmej.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Sun Sep 17 13:05:13 PDT 2000 Michael Jennings <mej@eterm.org>
|
||||
|
||||
When shaded, rely on Enlightenment rather than X for accurate x/y
|
||||
position information. This fixes a bug pointed out by Gnea
|
||||
<gnea@rochester.rr.com>.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
13
src/pixmap.c
13
src/pixmap.c
|
@ -38,15 +38,16 @@ static const char cvs_ident[] = "$Id$";
|
|||
# include <X11/extensions/shape.h>
|
||||
#endif
|
||||
|
||||
#include "command.h"
|
||||
#include "draw.h"
|
||||
#include "e.h"
|
||||
#include "icon.h"
|
||||
#include "startup.h"
|
||||
#include "menus.h"
|
||||
#include "options.h"
|
||||
#include "pixmap.h"
|
||||
#include "screen.h"
|
||||
#include "scrollbar.h"
|
||||
#include "startup.h"
|
||||
#include "term.h"
|
||||
#include "windows.h"
|
||||
|
||||
|
@ -511,7 +512,15 @@ create_trans_pixmap(simage_t *simg, unsigned char which, Drawable d, int x, int
|
|||
D_PIXMAP(("update_desktop_info() failed.\n"));
|
||||
return None;
|
||||
}
|
||||
XTranslateCoordinates(Xdisplay, d, desktop_window, x, y, &x, &y, &dummy);
|
||||
if (refresh_type == NO_REFRESH) {
|
||||
/* If we're hidden/shaded, translated coordinates to be parent relative, then use the
|
||||
internal cache data to tell where we are on the desktop. Otherwise, just ask X. */
|
||||
XTranslateCoordinates(Xdisplay, d, TermWin.parent, x, y, &x, &y, &dummy);
|
||||
x += TermWin.x;
|
||||
y += TermWin.y;
|
||||
} else {
|
||||
XTranslateCoordinates(Xdisplay, d, desktop_window, x, y, &x, &y, &dummy);
|
||||
}
|
||||
p = LIBMEJ_X_CREATE_PIXMAP(width, height);
|
||||
gc = LIBMEJ_X_CREATE_GC(0, NULL);
|
||||
D_PIXMAP(("Created p [0x%08x] as a %hux%hu pixmap at %d, %d relative to window 0x%08x\n", p, width, height, x, y, desktop_window));
|
||||
|
|
|
@ -605,11 +605,11 @@ void
|
|||
handle_move(int x, int y)
|
||||
{
|
||||
if ((TermWin.x != x) || (TermWin.y != y)) {
|
||||
TermWin.x = x;
|
||||
TermWin.y = y;
|
||||
if (image_mode_any(MODE_TRANS | MODE_VIEWPORT)) {
|
||||
redraw_images_by_mode(MODE_TRANS | MODE_VIEWPORT);
|
||||
}
|
||||
TermWin.x = x;
|
||||
TermWin.y = y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue