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

FreeBSD Manual Pages

  
 
  

home | help
XmtFocusShell(3)	   Library Functions Manual	      XmtFocusShell(3)

NAME
       XmtFocusShell(),	 XmtMoveShellToPointer(),  XmtWarpToShell(), XmtSetFo-
       cusToShell() - change keyboard focus to a shell widget.

SYNOPSIS
       #include	<Xmt/Xmt.h>

       void XmtFocusShell(Widget w)

       void XmtSetFocusToShell(Widget w)

       void XmtWarpToShell(Widget w)

       void XmtMoveShellToPointer(Widget w)

ARGUMENTS
       INPUTS

	    w	   The shell widget that is to have keyboard focus assigned to
		   it,	or any descendant of that widget.  The specified shell
		   should be a TopLevelShell, not an XmDialogShell.

DESCRIPTION
       XmtSetFocusToShell(),  XmtWarpToShell(),	 and   XmtMoveShellToPointer()
       provide	three  different  techniques for assigning keyboard focus to a
       given shell widget. Unfortunately, none of these	techniques  will  work
       appropriately in	all circumstances.  XmtFocusShell() is a wrapper func-
       tion that lets the user choose, through an application resource,	 which
       technique should	be used.

       XmtSetFocusToShell()  assigns  keyboard	focus  to the shell by calling
       XSetInputFocus(). This works well with ``click-to  type''  window  man-
       agers, such as mwm, but doesn't work well with ``pointer	focus''	window
       managers	like twm, because it leaves the	 desktop  in  an  inconsistent
       state with the pointer in one window and	keyboard focus in another.

       XmtWarpToShell()	also calls XSetInputFocus(), but first moves the mouse
       pointer to the  center  of  the	specified  shell  widget  with	XWarp-
       Pointer().  This	 works	well with window managers like twm, but	moving
       the pointer like	this can be a very confusing thing to do.

       XmtMoveShellToPointer() takes another approach-it moves	the  shell  to
       the  pointer,  rather  than  the	 pointer  to the shell.	 Like XmtWarp-
       ToShell(), it also calls	XSetInputFocus().  Moving a shell like this is
       probably	 more  confusing than moving the pointer is, but can work well
       if the shell widget was previously iconified.

       All of these functions deiconify	the specified shell, if	necessary, and
       raise it	to the top of the window stack.

       Since  none  of	the  above three functions will	be appropriate for all
       users or	all sites, XmtFocusShell() lets	the user or the	system	admin-
       istrator	 choose	how focus should be assigned by	setting	the focusStyle
       application resource. The table lists the legal	values	of  focusStyle
       and  their  meanings.  If mwm is	running	(i.e., if XmIsMotifWMRunning()
       returns True) then the default value for	focusShell is focus. Otherwise
       the  default  value  is none, since none	of the focus methods is	always
       appropriate in this case.

       focusStyle | XmtFocusShell() Action
       -----------+----------------------------
       none	  | Deiconify and raise	 only;
		  | don't   attempt   to   set
		  | focus.
       focus	  | Call XmtSetFocusToShell().
       warp	  | Call XmtWarpToShell().
       move	  | Call       XmtMoveShellTo-
		  | Pointer().

USAGE
       You  should  almost  always  use	 XmtFocusShell()  in your applications
       instead of the more specialized functions that it calls.	This will make
       your applications more customizable and portable.

       Remember	 that  the  user  can also move	keyboard focus between windows
       with the	window manager.	You should only	call these functions in	direct
       response	 to  a	user  request  to move the focus-if you	reassign focus
       unexpectedly you	will make the user feel	that they have lost control of
       their desktop. A	good time to call XmtFocusShell() is when the user has
       selected	a window from a	Windows	menu in	your application.

SEE ALSO
       Chapter 15, Working with	the Window Manager, XmtDeiconifyShell(),
       XmtRaiseShell().

Xmt				  Motif	Tools		      XmtFocusShell(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | USAGE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmtFocusShell&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help