parent
4772f4e39d
commit
6448e1f504
2
src/E.h
2
src/E.h
|
@ -423,6 +423,7 @@ typedef struct
|
|||
char argb_clients_inherit_attr;
|
||||
int image_cache_size;
|
||||
int mask_alpha_threshold;
|
||||
char enable_startup_id;
|
||||
} testing;
|
||||
|
||||
char autosave;
|
||||
|
@ -565,6 +566,7 @@ void About(void);
|
|||
|
||||
/* actions.c */
|
||||
#define EXEC_SET_LANG 0x01
|
||||
#define EXEC_SET_STARTUP_ID 0x02
|
||||
int execApplication(const char *params, int flags);
|
||||
void Espawn(int argc, char **argv);
|
||||
void EspawnCmd(const char *cmd);
|
||||
|
|
|
@ -22,9 +22,25 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
#include "desktops.h"
|
||||
#include "file.h"
|
||||
#include "user.h"
|
||||
|
||||
static void
|
||||
StartupIdExport(void)
|
||||
{
|
||||
char buf[128];
|
||||
Desk *dsk;
|
||||
int ax, ay;
|
||||
|
||||
dsk = DesksGetCurrent();
|
||||
DeskGetArea(dsk, &ax, &ay);
|
||||
|
||||
Esnprintf(buf, sizeof(buf), "e16/%d:%d:%d,%d", Mode.apps.startup_id,
|
||||
dsk->num, ax, ay);
|
||||
Esetenv("DESKTOP_STARTUP_ID", buf);
|
||||
}
|
||||
|
||||
static void
|
||||
ExecSetupEnv(int flags)
|
||||
{
|
||||
|
@ -39,6 +55,9 @@ ExecSetupEnv(int flags)
|
|||
/* Set up env stuff */
|
||||
if (flags & EXEC_SET_LANG)
|
||||
LangExport();
|
||||
if (flags & EXEC_SET_STARTUP_ID)
|
||||
StartupIdExport();
|
||||
|
||||
#if USE_ROOTHACKLIB
|
||||
if (Mode.wm.window)
|
||||
Esetenv("LD_PRELOAD", ENLIGHTENMENT_LIB "/e16/libhack.so");
|
||||
|
@ -60,6 +79,7 @@ execApplication(const char *params, int flags)
|
|||
if (exe[0] == '\0')
|
||||
return -1;
|
||||
|
||||
Mode.apps.startup_id++;
|
||||
if (fork())
|
||||
return 0;
|
||||
|
||||
|
|
10
src/ewmh.c
10
src/ewmh.c
|
@ -658,17 +658,17 @@ EWMH_GetWindowUserTime(EWin * ewin)
|
|||
static void
|
||||
EWMH_GetWindowStartupId(EWin * ewin)
|
||||
{
|
||||
#if 0 /* TBD */
|
||||
#define TryGroup(e) (((e)->icccm.group != None) && ((e)->icccm.group != EwinGetClientXwin(e)))
|
||||
char *str;
|
||||
|
||||
if (!Conf.testing.enable_startup_id)
|
||||
return;
|
||||
|
||||
ecore_x_netwm_startup_id_get(EwinGetClientXwin(ewin), &str);
|
||||
if (!str && TryGroup(ewin))
|
||||
ecore_x_netwm_startup_id_get(ewin->icccm.group, &str);
|
||||
Eprintf("Startup id: %s: %s\n", EwinGetTitle(ewin), str);
|
||||
#else
|
||||
ewin = NULL;
|
||||
#endif
|
||||
if (str && EDebug(1))
|
||||
Eprintf("Startup id: %s: %s\n", EwinGetTitle(ewin), str);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -194,6 +194,7 @@ static const CfgItem MiscCfgItems[] = {
|
|||
CFG_ITEM_BOOL(Conf, testing.argb_internal_clients, 0),
|
||||
CFG_ITEM_BOOL(Conf, testing.argb_clients, 0),
|
||||
CFG_ITEM_BOOL(Conf, testing.argb_clients_inherit_attr, 0),
|
||||
CFG_ITEM_BOOL(Conf, testing.enable_startup_id, 1),
|
||||
CFG_FUNC_INT(Conf, testing.image_cache_size, -1, _CfgImageCacheSize),
|
||||
CFG_ITEM_INT(Conf, testing.mask_alpha_threshold, 8),
|
||||
|
||||
|
@ -207,7 +208,7 @@ static void
|
|||
MiscIpcExec(const char *params)
|
||||
{
|
||||
if (params)
|
||||
execApplication(params, EXEC_SET_LANG);
|
||||
execApplication(params, EXEC_SET_LANG | EXEC_SET_STARTUP_ID);
|
||||
else
|
||||
IpcPrintf("exec what?\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue