Release 0.4.7
[wine/multimedia.git] / windows / focus.c
blobce1a91a25ff49dd8c5328a53451202b471f95bf1
1 /*
2 * Focus functions
4 * Copyright 1993 David Metcalfe
5 */
7 static char Copyright[] = "Copyright David Metcalfe, 1993";
9 #include <X11/Intrinsic.h>
10 #include <X11/StringDefs.h>
11 #include "win.h"
12 #include "gdi.h"
14 HWND hWndFocus = 0;
17 /*****************************************************************
18 * SetFocus (USER.22)
21 HWND SetFocus(HWND hwnd)
23 HWND hWndPrevFocus;
24 WND *wndPtr;
26 hWndPrevFocus = hWndFocus;
28 if (hwnd == 0)
30 XSetInputFocus(XT_display, None, RevertToPointerRoot, CurrentTime);
32 else
34 wndPtr = WIN_FindWndPtr(hwnd);
35 XSetInputFocus(XT_display, XtWindow(wndPtr->winWidget),
36 RevertToParent, CurrentTime);
39 return hWndPrevFocus;
43 /*****************************************************************
44 * GetFocus (USER.23)
47 HWND GetFocus(void)
49 return hWndFocus;