GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XMTFOCUSSHELL (3)

NAME

XmtFocusShell(), XmtMoveShellToPointer(), XmtWarpToShell(), XmtSetFocusToShell() - change keyboard focus to a shell widget.

CONTENTS

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 function 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 managers, 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 XWarpPointer(). 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 XmtWarpToShell(), 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 administrator 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.

focusStyleXmtFocusShell() Action
noneDeiconify and raise only; don’t attempt to set focus.
focusCall XmtSetFocusToShell().
warpCall XmtWarpToShell().
moveCall XmtMoveShellToPointer().

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().
Search for    or go to Top of page |  Section 3 |  Main Index


Xmt XMTFOCUSSHELL (3) Motif Tools

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.