~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some backends, a network interface and some library routines to the
[sgt/putty]
/
mac
/
macterm.c
diff --git
a/mac/macterm.c
b/mac/macterm.c
index
3de1d58
..
fe692fd
100644
(file)
--- a/
mac/macterm.c
+++ b/
mac/macterm.c
@@
-1,4
+1,4
@@
-/* $Id: macterm.c,v 1.3
1 2003/01/02 00:33:40
ben Exp $ */
+/* $Id: macterm.c,v 1.3
3 2003/01/04 00:48:13
ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
@@
-336,7
+336,7
@@
static void mac_adjustwinbg(Session *s) {
if (!HAVE_COLOR_QD())
return;
if (!HAVE_COLOR_QD())
return;
-#if
TARGET_RT_CFM /* XXX doesn't link (at least for 68k) */
+#if
!TARGET_CPU_68K
if (mac_gestalts.windattr & gestaltWindowMgrPresent)
SetWindowContentColor(s->window,
&(*s->palette)->pmInfo[DEFAULT_BG].ciRGB);
if (mac_gestalts.windattr & gestaltWindowMgrPresent)
SetWindowContentColor(s->window,
&(*s->palette)->pmInfo[DEFAULT_BG].ciRGB);
@@
-792,7
+792,7
@@
void request_paste(void *frontend)
static struct {
Rect msgrect;
Point msgorigin;
static struct {
Rect msgrect;
Point msgorigin;
- Point
start
mouse;
+ Point
zero
mouse;
Session *s;
char oldmsg[20];
} growterm_state;
Session *s;
char oldmsg[20];
} growterm_state;
@@
-810,7
+810,9
@@
void mac_growterm(WindowPtr window, EventRecord *event) {
draghooksave = LMGetDragHook();
growterm_state.oldmsg[0] = '\0';
draghooksave = LMGetDragHook();
growterm_state.oldmsg[0] = '\0';
- growterm_state.startmouse = event->where;
+ growterm_state.zeromouse = event->where;
+ growterm_state.zeromouse.h -= s->term->cols * s->font_width;
+ growterm_state.zeromouse.v -= s->term->rows * s->font_height;
growterm_state.s = s;
GetPort(&portsave);
SetPort(s->window);
growterm_state.s = s;
GetPort(&portsave);
SetPort(s->window);
@@
-851,11
+853,9
@@
static pascal void mac_growtermdraghook(void)
int newrows, newcols;
GetMouse(&mouse);
int newrows, newcols;
GetMouse(&mouse);
- newrows = (mouse.v - growterm_state.startmouse.v) / s->font_height +
- s->term->rows;
+ newrows = (mouse.v - growterm_state.zeromouse.v) / s->font_height;
if (newrows < 1) newrows = 1;
if (newrows < 1) newrows = 1;
- newcols = (mouse.h - growterm_state.startmouse.h) / s->font_width +
- s->term->cols;
+ newcols = (mouse.h - growterm_state.zeromouse.h) / s->font_width;
if (newcols < 1) newcols = 1;
sprintf(buf, "%dx%d", newcols, newrows);
if (strcmp(buf, growterm_state.oldmsg) == 0)
if (newcols < 1) newcols = 1;
sprintf(buf, "%dx%d", newcols, newrows);
if (strcmp(buf, growterm_state.oldmsg) == 0)
@@
-1180,8
+1180,7
@@
void set_sbar(void *frontend, int total, int start, int page) {
(*s->scrollbar)->contrlMin = 0;
(*s->scrollbar)->contrlMax = total - page;
SetControlValue(s->scrollbar, start);
(*s->scrollbar)->contrlMin = 0;
(*s->scrollbar)->contrlMax = total - page;
SetControlValue(s->scrollbar, start);
-#if TARGET_RT_CFM
- /* XXX: This doesn't link for me. */
+#if !TARGET_CPU_68K
if (mac_gestalts.cntlattr & gestaltControlMgrPresent)
SetControlViewSize(s->scrollbar, page);
#endif
if (mac_gestalts.cntlattr & gestaltControlMgrPresent)
SetControlViewSize(s->scrollbar, page);
#endif