Revision d4d4df69
Von admin vor mehr als 4 Jahren hinzugefügt
src/gwenhywfar.c | ||
---|---|---|
#include "parser/configmgr_l.h"
|
||
#include "crypt3/cryptkey_l.h"
|
||
#include "crypttoken/ctplugin_l.h"
|
||
#include "gui/gui_l.h"
|
||
|
||
#include "binreloc.h"
|
||
|
||
... | ... | |
return err;
|
||
DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing CryptToken2 module");
|
||
err=GWEN_Crypt_Token_ModuleInit();
|
||
if (err)
|
||
return err;
|
||
DBG_DEBUG(GWEN_LOGDOMAIN, "Initializing GUI module");
|
||
err=GWEN_Gui_ModuleInit();
|
||
if (err)
|
||
return err;
|
||
/* add more modules here */
|
||
... | ... | |
int lerr;
|
||
|
||
/* add more modules here */
|
||
GWEN_Gui_ModuleFini();
|
||
|
||
lerr=GWEN_Crypt_Token_ModuleFini();
|
||
if (lerr) {
|
||
err=lerr;
|
Auch abrufbar als: Unified diff
No longer directly use global variable gwenhywfar_gui.
We now use a thread-local variable, so a thread can set its own GUI
implementation.
The reason is that most X11 GUIs down allow any thread of a process other
than the main thread to access the graphical interface. If a thread function
uses other GWEN functions which might call GUI functions this would be a
problem.
With thread-local variables each thread can have its own GUI, side-threads
might want to use e.g. the GUI implementation from GWEN_NoGui_new().