Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtPatchV...nheritance(3)  Library Functions Manual  XmtPatchV...nheritance(3)

NAME
       XmtPatchVisualInheritance() - apply a runtime patch to the Shell	widget
       class so	that it	handles	non-default visuals better.

SYNOPSIS
       #include	<Xmt/Xmt.h>

       void XmtPatchVisualInheritance(void)

ARGUMENTS
       None.

DESCRIPTION
       The  Xt Shell widget class inherits the value of	its XtNvisual resource
       from the	shell's	parent window-the root window.	This means by  default
       shell  widgets will always use the default visual of the	screen.	If you
       are writing an application that uses a  non-default  visual,  then  you
       will  probably  want  all of your application's windows to use the same
       visual, to minimize color-flashing as the pointer moves from window  to
       window.

       Because	the Shell widget inherits its XtNvisual	resource from its par-
       ent window rather than its parent widget, you must explicitly set  this
       resource	on all shells that you create.	This includes dialog box shell
       widgets,	 which	are often automatically	created	for you	by convenience
       routines, and which can be difficult to set resources on.

       A simpler solution is to	call  XmtPatchVisualInheritance()  before  you
       call  XtAppInitialize()	or  XmtInitialize().  This  function applies a
       patch to	the Shell widget class initialize method so that if its	XtNvi-
       sual resource is	unset, it will inherit	its  value  from  its  nearest
       shell  widget  ancestor	(if  it	has one) rather	than from the screen's
       root window.

       Once you	have called this function, you need  only  set	the  XtNvisual
       resource	 for  your  initial  root  shell widget; all other shells will
       inherit this non-default	visual.

SEE ALSO
       Chapter 4, Using	Color,
       Shell.

Xmt				  Motif	Tools	     XmtPatchV...nheritance(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtPatchVisualInheritance&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help