forked from enlightenment/enlightenment
parent
57cc6bd68a
commit
24ef0b62db
29
src/main.c
29
src/main.c
|
@ -1,4 +1,5 @@
|
|||
#include "e.h"
|
||||
#include <X11/Xproto.h>
|
||||
|
||||
#ifdef E_PROF
|
||||
Evas_List __e_profiles = NULL;
|
||||
|
@ -24,12 +25,23 @@ static void ch_col(int val, void *data)
|
|||
UN(data);
|
||||
}
|
||||
|
||||
static void wm_running_error(Display * d, XErrorEvent * ev);
|
||||
static void
|
||||
wm_running_error(Display * d, XErrorEvent * ev)
|
||||
{
|
||||
if ((ev->request_code == X_ChangeWindowAttributes) && (ev->error_code == BadAccess))
|
||||
{
|
||||
fprintf(stderr, "A WM is alreayd running. no point running now is there?\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void setup(void);
|
||||
void
|
||||
setup(void)
|
||||
{
|
||||
e_grab();
|
||||
e_window_set_events(0, XEV_CHILD_REDIRECT | XEV_PROPERTY | XEV_COLORMAP);
|
||||
e_sync();
|
||||
e_border_adopt_children(0);
|
||||
e_ungrab();
|
||||
/* e_add_event_timer("timer", 0.02, ch_col, 0, NULL);*/
|
||||
|
@ -42,10 +54,23 @@ main(int argc, char **argv)
|
|||
e_exec_set_args(argc, argv);
|
||||
|
||||
e_config_init();
|
||||
e_display_init(NULL);
|
||||
if (!e_display_init(NULL))
|
||||
{
|
||||
fprintf(stderr, "cannot connect to display!\n");
|
||||
exit(1);
|
||||
}
|
||||
e_ev_signal_init();
|
||||
e_event_filter_init();
|
||||
e_ev_x_init();
|
||||
|
||||
/* become a wm */
|
||||
e_grab();
|
||||
e_sync();
|
||||
e_set_error_handler(wm_running_error);
|
||||
e_window_set_events(0, XEV_CHILD_REDIRECT | XEV_PROPERTY | XEV_COLORMAP);
|
||||
e_sync();
|
||||
e_reset_error_handler();
|
||||
e_ungrab();
|
||||
|
||||
e_pack_object_init();
|
||||
e_fs_init();
|
||||
|
|
|
@ -788,8 +788,11 @@ e_view_set_dir(E_View *v, char *dir)
|
|||
|
||||
/* v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir); */
|
||||
v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir,
|
||||
efsd_ops(2, efsd_op_get_stat(),
|
||||
efsd_op_get_filetype()));
|
||||
efsd_ops(2,
|
||||
efsd_op_get_stat(),
|
||||
efsd_op_get_filetype()
|
||||
)
|
||||
);
|
||||
v->is_listing = 1;
|
||||
v->changed = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue