Mercurial > dwindows
comparison gtk3/dw.c @ 1795:9304241b7b33
Added new dw_window_set_focus() function and attempted to fix...
Intial focus after a subsequent dw_window_show() on Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 24 Sep 2012 23:24:25 +0000 |
parents | 2cfbfccbbafe |
children | 7f549994b633 |
comparison
equal
deleted
inserted
replaced
1794:97b1edb41d44 | 1795:9304241b7b33 |
---|---|
10374 DW_MUTEX_UNLOCK; | 10374 DW_MUTEX_UNLOCK; |
10375 return; | 10375 return; |
10376 } | 10376 } |
10377 | 10377 |
10378 /* | 10378 /* |
10379 * Sets the current focus item for a window/dialog. | |
10380 * Parameters: | |
10381 * handle: Handle to the dialog item to be focused. | |
10382 * Remarks: | |
10383 * This is for use after showing the window/dialog. | |
10384 */ | |
10385 void API dw_window_set_focus(HWND handle) | |
10386 { | |
10387 int _locked_by_me = FALSE; | |
10388 | |
10389 if(!handle) | |
10390 return; | |
10391 | |
10392 DW_MUTEX_LOCK; | |
10393 gtk_widget_grab_focus(handle); | |
10394 DW_MUTEX_UNLOCK; | |
10395 } | |
10396 | |
10397 /* | |
10379 * Sets the default focus item for a window/dialog. | 10398 * Sets the default focus item for a window/dialog. |
10380 * Parameters: | 10399 * Parameters: |
10381 * window: Toplevel window or dialog. | 10400 * window: Toplevel window or dialog. |
10382 * defaultitem: Handle to the dialog item to be default. | 10401 * defaultitem: Handle to the dialog item to be default. |
10402 * Remarks: | |
10403 * This is for use before showing the window/dialog. | |
10383 */ | 10404 */ |
10384 void dw_window_default(HWND window, HWND defaultitem) | 10405 void dw_window_default(HWND window, HWND defaultitem) |
10385 { | 10406 { |
10386 int _locked_by_me = FALSE; | 10407 int _locked_by_me = FALSE; |
10387 | 10408 |