diff --git a/main.c b/main.c index 12602a1..fd5daee 100644 --- a/main.c +++ b/main.c @@ -53,6 +53,8 @@ static GtkWidget *window; int windowWidth; int windowHeight; static double aspectRatio; +static int windowHeightOffset = 0; +static int windowWidthOffset = 0; guint global_timeout_ref; @@ -76,7 +78,7 @@ static gboolean on_timer_event(GtkWidget *widget) static gboolean clicked(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - if (tube_clicked(event->button, event->x, event->y)) + if (tube_clicked(event->button, event->x - windowWidthOffset, event->y - windowHeightOffset)) gtk_widget_queue_draw(widget); return TRUE; } @@ -91,8 +93,6 @@ static void on_quit_event() static void do_drawing(cairo_t *cr, GtkWidget *widget) { static cairo_surface_t *permanent_surface, *temporary_surface; - static int windowHeightOffset = 0; - static int windowWidthOffset = 0; g_source_remove(global_timeout_ref); // stop timer, in case do_drawing takes too long @@ -117,11 +117,11 @@ static void do_drawing(cairo_t *cr, GtkWidget *widget) temporary_surface = cairo_surface_create_similar(cairo_get_target(cr), CAIRO_CONTENT_COLOR_ALPHA, windowWidth, windowHeight); - if (argFull) { // hide cursor in full mode - GdkCursor* Cursor = gdk_cursor_new(GDK_BLANK_CURSOR); - GdkWindow* win = gtk_widget_get_window(window); - gdk_window_set_cursor((win), Cursor); - } + //if (argFull) { // hide cursor in full mode + // GdkCursor* Cursor = gdk_cursor_new(GDK_BLANK_CURSOR); + // GdkWindow* win = gtk_widget_get_window(window); + // gdk_window_set_cursor((win), Cursor); + //} } cairo_t *permanent_cr = cairo_create(permanent_surface); diff --git a/tek4010 b/tek4010 index 5392cd7..b66ab83 100755 Binary files a/tek4010 and b/tek4010 differ diff --git a/tek4010.c b/tek4010.c index 1425604..39a6e42 100755 --- a/tek4010.c +++ b/tek4010.c @@ -117,10 +117,13 @@ void tek4010_bell() void sendCoordinates() { // send 4 coordinate bytes - putc((tube_x0 >> 5) + 0xa0,putKeys); - putc((tube_x0 & 31) + 0xa0,putKeys); - putc((tube_y0 >> 5) + 0xa0,putKeys); - putc((tube_y0 & 31) + 0xa0,putKeys); + int x,y; + x = (int)((double)tube_x0 / efactor); + y = (int)((double)tube_y0 / efactor); + putc((x >> 5) + 0xa0,putKeys); + putc((x & 31) + 0xa0,putKeys); + putc((y >> 5) + 0xa0,putKeys); + putc((y & 31) + 0xa0,putKeys); } void enqMode() diff --git a/tube.c b/tube.c index d807197..af0cfe9 100755 --- a/tube.c +++ b/tube.c @@ -180,7 +180,7 @@ void tube_init(int argc, char* argv[]) char *argv2[20]; size_t bufsize = 127; int firstArg = 1; - printf("tek4010 version 1.3\n"); + printf("tek4010 version 1.3.1\n"); windowName = "Tektronix 4010/4014 emulator"; if ((argc<2) || (argc>19)) { printf("Error:number of arguments\n"); diff --git a/versions.txt b/versions.txt index 8844145..96a4ab4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,5 +1,11 @@ +Version 1.3.1 May 4, 2019 +========================= +Bug fixes +- GIN mode returns properly scaled coordinates in full mode +- Cursor not disabled in full mode, needed for GIN mode + Version 1.3 April 29, 2019 -============================ +========================== Bug fixes - Vertical positioning in ARDS mode - Character size change did not leave escape mode