Article View: gnu.epoch.misc
Article #1927Re: Epoch Lies About Size
From: Toshiki Kikuchi
Date: Fri, 12 Jul 1991 05:22
Date: Fri, 12 Jul 1991 05:22
101 lines
4012 bytes
4012 bytes
carroll@cs.uiuc.edu (Alan M. Carroll) writes:
> Alledgedly under R4 you can specify an additional value (the base
> size) to get around this, but it doesn't seem to work. Debugging runs
> claim that the hints are getting set correctly (i.e., base_width,
> base_height are 0, and PBaseSize is set), but there's no effect
I found out the reason why the base size hints doesn't work.
Epoch 3.2 uses `XSetNormalHints()' to set size hints.
`XSetNormalHints()' is an obsolete function and doesn't know the new
size hints introduced in ICCCM. It can't set the base size hints.
`XSetWMNormalHints()' should be used instead.
`XGetNormalHints()' is also superceded by `XGetWMNormalHints()'.
The diff includes Jim Russel's bugfix.
Toshiki Kikuchi Super Micro Systems Group, Sony Corporation
*** /tmp/,RCSt1029159 Fri Jul 12 13:45:08 1991
--- screen.c Fri Jul 12 13:37:00 1991
***************
*** 249,256 ****
/* set sizing hints */
#ifdef PBaseSize
! size_hints.base_width = 0;
! size_hints.base_height = 0;
#endif
size_hints.width = xs->pixwidth;
size_hints.height = xs->pixheight;
--- 249,256 ----
/* set sizing hints */
#ifdef PBaseSize
! size_hints.base_width = 2*xs->in_border; /* bugfix by Jim Russel */
! size_hints.base_height = 2*xs->in_border;
#endif
size_hints.width = xs->pixwidth;
size_hints.height = xs->pixheight;
***************
*** 267,273 ****
--- 267,278 ----
#endif
size_hints.flags |= (gmask & (XValue|YValue)) ? USPosition : PPosition;
size_hints.flags |= (gmask & (WidthValue|HeightValue)) ? USSize : PSize;
+ /* changed by toshiki@sm.sony.co.jp */
+ #ifdef PBaseSize
+ HOLD_INPUT(XSetWMNormalHints(xs->display,xs->xid,&size_hints));
+ #else
HOLD_INPUT(XSetNormalHints(xs->display,xs->xid,&size_hints));
+ #endif
/* resource and class names */
class_hint.res_name = xd->resource;
*** /tmp/,RCSt1029164 Fri Jul 12 13:45:18 1991
--- xutil.c Fri Jul 12 13:36:24 1991
***************
*** 496,501 ****
--- 496,504 ----
struct X_Screen *xs;
struct W_Screen *ws;
XSizeHints size_hints;
+ #ifdef PBaseSize
+ long size_hints_flags; /* changed by toshiki@sm.sony.co.jp */
+ #endif
int minx,miny,z,i;
BLOCK_INPUT_DECLARE();
***************
*** 508,514 ****
--- 511,522 ----
{
/* stash the current hints for later re-use */
BLOCK_INPUT();
+ /* changed by toshiki@sm.sony.co.jp */
+ #ifdef PBaseSize
+ z = XGetWMNormalHints(xs->display,xs->xid,&size_hints,&size_hints_flags);
+ #else
z = XGetNormalHints(xs->display,xs->xid,&size_hints);
+ #endif
UNBLOCK_INPUT();
if (!z) error("No normal size hints! Can't change font.");
***************
*** 529,535 ****
--- 537,548 ----
size_hints.min_width = minx*xs->font_width + 2*xs->in_border;
size_hints.min_height = miny*xs->font_height + 2*xs->in_border;
BLOCK_INPUT();
+ /* changed by toshiki@sm.sony.co.jp */
+ #ifdef PBaseSize
+ XSetWMNormalHints(xs->display,xs->xid,&size_hints);
+ #else
XSetNormalHints(xs->display,xs->xid,&size_hints);
+ #endif
/* Update all of the GC's hanging about on the screen */
XSetFont(xs->display,xs->gc_norm,xs->font_id);
Technical Details
Message-ID:
<792@sys3.sm.sony.co.jp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!scslwide!wsgw!sys3!toshikiReferences:
<1991Jun18.140926.8608@m.cs.uiuc.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,2506d25095f1502e X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1991-07-11 23:17:01 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!scslwide!wsgw!sys3!toshiki From: toshiki@sm.sony.co.jp (Toshiki Kikuchi) Newsgroups: gnu.epoch.misc Subject: Re: Epoch Lies About Size Message-ID: <792@sys3.sm.sony.co.jp> Date: 12 Jul 91 05:22:29 GMT References: <1991Jun18.140926.8608@m.cs.uiuc.edu> Sender: news@sm.sony.co.jp Distribution: gnu Organization: Super Micro Systems Group, Sony Corporation Lines: 101 Nntp-Posting-Host: kemur