[teklib-general] changeset in /hg/teklib/current: Cleanup in tags; XGrabPointer r...

Timm S. Mueller tmueller at neoscientists.org
Mon Nov 26 16:23:34 CET 2007


changeset 8e55f94dbc8d in /hg/teklib/current
details: http://teklib.org:8001/hg/teklib/current?cmd=changeset;node=8e55f94dbc8d
description:
	Cleanup in tags; XGrabPointer removed

diffs (95 lines):

diff -r c273befab5a9 -r 8e55f94dbc8d src/visual/posix/visual_host.c
--- a/src/visual/posix/visual_host.c	Mon Sep 17 19:15:22 2007 +0200
+++ b/src/visual/posix/visual_host.c	Mon Sep 17 20:08:55 2007 +0200
@@ -483,18 +483,6 @@ getattrfunc(struct THook *hook, TAPTR ob
 			break;
 		case TVisual_WinTop:
 			*((TINT *) item->tti_Value) = v->wintop;
-			break;
-		case TVisual_TextWidth:
-			*((TINT *) item->tti_Value) = v->textwidth;
-			break;
-		case TVisual_TextHeight:
-			*((TINT *) item->tti_Value) = v->textheight;
-			break;
-		case TVisual_FontWidth:
-			*((TINT *) item->tti_Value) = v->fontwidth;
-			break;
-		case TVisual_FontHeight:
-			*((TINT *) item->tti_Value) = v->fontheight;
 			break;
 		case TVisual_MinWidth:
 			*((TINT *) item->tti_Value) = v->sizehints->min_width;
@@ -1204,10 +1192,6 @@ vis_open(TMOD_VIS *mod)
 
 		if (getprops(mod, v) == TFALSE) break;
 
-		//v->fontwidth = XTextWidth(fn->font, " ", 1);
-		//v->fontheight = fn->font->ascent + fn->font->descent;
-		//if (v->fontwidth <= 0 || v->fontheight <= 0) break;
-
 		v->colormap = XCreateColormap(v->display,
 			RootWindow(v->display, v->screen), v->visual, AllocNone);
 		if (v->colormap == TNULL) break;
@@ -1279,15 +1263,6 @@ vis_open(TMOD_VIS *mod)
 
 		XMapWindow(v->display, v->window);
 
-		if (popup)
-		{
-			XGrabPointer(v->display, v->window,
-				True, 0xffffffff, GrabModeSync,
-				GrabModeSync, None, None, CurrentTime);
-// 				owner_events, event_mask, pointer_mode,
-// 				keyboard_mode, confine_to, cursor, time)
-		}
-
 		if (g->use_xft == TTRUE)
 		{
 			/* FIXME: quick hack! */
@@ -1307,8 +1282,6 @@ vis_open(TMOD_VIS *mod)
 #endif
 
 		v->base_mask = swa.event_mask;
-		//v->textwidth = v->winwidth / v->fontwidth;
-		//v->textheight = v->winheight / v->fontheight;
 		v->bgpen = (TVPEN) 0xffffffff;
 		v->fgpen = (TVPEN) 0xffffffff;
 
diff -r c273befab5a9 -r 8e55f94dbc8d tek/mod/visual.h
--- a/tek/mod/visual.h	Mon Sep 17 19:15:22 2007 +0200
+++ b/tek/mod/visual.h	Mon Sep 17 20:08:55 2007 +0200
@@ -26,8 +26,8 @@ typedef TTAG TVPEN;
 #define TVISTAGS_					(TTAG_USER + 0x600)
 #define TVisual_PixWidth			(TVISTAGS_ + 0)
 #define TVisual_PixHeight			(TVISTAGS_ + 1)
-#define TVisual_TextWidth			(TVISTAGS_ + 2)
-#define TVisual_TextHeight			(TVISTAGS_ + 3)
+#define TVisual_WinLeft				(TVISTAGS_ + 2)
+#define TVisual_WinTop				(TVISTAGS_ + 3)
 #define TVisual_FontWidth			(TVISTAGS_ + 4)
 #define TVisual_FontHeight			(TVISTAGS_ + 5)
 #define TVisual_Title				(TVISTAGS_ + 6)
@@ -37,8 +37,6 @@ typedef TTAG TVPEN;
 #define TVisual_MaxWidth			(TVISTAGS_ + 10)
 #define TVisual_MaxHeight			(TVISTAGS_ + 11)
 #define TVisual_Open				(TVISTAGS_ + 12)
-#define TVisual_WinLeft				(TVISTAGS_ + 24)
-#define TVisual_WinTop				(TVISTAGS_ + 25)
 
 /*
 **	Tags for font handling
@@ -55,6 +53,13 @@ typedef TTAG TVPEN;
 #define	TVisual_FontUlPosition		(TVISTAGS_ + 21)
 #define	TVisual_FontUlThickness		(TVISTAGS_ + 22)
 #define TVisual_FontNumResults		(TVISTAGS_ + 23)
+
+/*
+**	Platform-specific / experimental tags
+*/
+
+#define TVisualHost_Grab			(TVISTAGS_ + 0x101)
+
 
 /*****************************************************************************/
 /*


More information about the teklib-general mailing list