diff --git a/legacy/ecore/src/lib/ecore/Makefile.am b/legacy/ecore/src/lib/ecore/Makefile.am index 6a7a6ead94..63ac52e128 100644 --- a/legacy/ecore/src/lib/ecore/Makefile.am +++ b/legacy/ecore/src/lib/ecore/Makefile.am @@ -31,4 +31,4 @@ ecore_value.c \ ecore_private.h libecore_la_LIBADD = -lm @dlopen_libs@ @winsock_libs@ -libecore_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 +libecore_la_LDFLAGS = -version-info 1:0:0 diff --git a/legacy/ecore/src/lib/ecore_con/Makefile.am b/legacy/ecore/src/lib/ecore_con/Makefile.am index 0b84b71a00..80f91deb8f 100644 --- a/legacy/ecore/src/lib/ecore_con/Makefile.am +++ b/legacy/ecore/src/lib/ecore_con/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ -I$(top_srcdir)/src/lib/ecore_con \ @SSL_CFLAGS@ -libecore_con_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_con_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs if BUILD_ECORE_CON diff --git a/legacy/ecore/src/lib/ecore_config/Makefile.am b/legacy/ecore/src/lib/ecore_config/Makefile.am index e7ffd3f7e2..0a52f40284 100644 --- a/legacy/ecore/src/lib/ecore_config/Makefile.am +++ b/legacy/ecore/src/lib/ecore_config/Makefile.am @@ -11,10 +11,10 @@ INCLUDES = \ CLEANFILES = $(DB) -libecore_config_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_config_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs -ecore_config_ipc_ecore_la_LDFLAGS = $(LDFLAGS) -no-undefined -module \ +ecore_config_ipc_ecore_la_LDFLAGS = -no-undefined -module \ -avoid-version -rdynamic -shared if BUILD_ECORE_CONFIG diff --git a/legacy/ecore/src/lib/ecore_evas/Makefile.am b/legacy/ecore/src/lib/ecore_evas/Makefile.am index 4ceabde2e0..e29f0a3eb4 100644 --- a/legacy/ecore/src/lib/ecore_evas/Makefile.am +++ b/legacy/ecore/src/lib/ecore_evas/Makefile.am @@ -29,7 +29,7 @@ $(ECORE_X_INC) \ $(ECORE_FB_INC) \ @evas_cflags@ -libecore_evas_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_evas_la_LDFLAGS = -version-info 1:0:0 \ $(ECORE_X_LDF) \ $(ECORE_FB_LDF) \ -L$(top_builddir)/src/lib/ecore/.libs diff --git a/legacy/ecore/src/lib/ecore_fb/Makefile.am b/legacy/ecore/src/lib/ecore_fb/Makefile.am index 456d00762d..f4f3d45103 100644 --- a/legacy/ecore/src/lib/ecore_fb/Makefile.am +++ b/legacy/ecore/src/lib/ecore_fb/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_builddir)/src/lib/ecore -libecore_fb_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_fb_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs if BUILD_ECORE_FB diff --git a/legacy/ecore/src/lib/ecore_ipc/Makefile.am b/legacy/ecore/src/lib/ecore_ipc/Makefile.am index d3236115f6..81c877d3c0 100644 --- a/legacy/ecore/src/lib/ecore_ipc/Makefile.am +++ b/legacy/ecore/src/lib/ecore_ipc/Makefile.am @@ -9,7 +9,7 @@ INCLUDES = \ -I$(top_srcdir)/src/lib/ecore_ipc \ @SSL_CFLAGS@ -libecore_ipc_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_ipc_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs \ -L$(top_builddir)/src/lib/ecore_con/.libs diff --git a/legacy/ecore/src/lib/ecore_job/Makefile.am b/legacy/ecore/src/lib/ecore_job/Makefile.am index d48982f027..233608a462 100644 --- a/legacy/ecore/src/lib/ecore_job/Makefile.am +++ b/legacy/ecore/src/lib/ecore_job/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_builddir)/src/lib/ecore -libecore_job_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_job_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs if BUILD_ECORE_JOB diff --git a/legacy/ecore/src/lib/ecore_txt/Makefile.am b/legacy/ecore/src/lib/ecore_txt/Makefile.am index 469c257a8c..278e053be2 100644 --- a/legacy/ecore/src/lib/ecore_txt/Makefile.am +++ b/legacy/ecore/src/lib/ecore_txt/Makefile.am @@ -5,7 +5,7 @@ INCLUDES = \ -I$(top_builddir)/src/lib/ecore \ @iconv_cflags@ -libecore_txt_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_txt_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs if BUILD_ECORE_TXT diff --git a/legacy/ecore/src/lib/ecore_x/Ecore_X.h b/legacy/ecore/src/lib/ecore_x/Ecore_X.h index 009e3a204b..64b1d0ccc3 100644 --- a/legacy/ecore/src/lib/ecore_x/Ecore_X.h +++ b/legacy/ecore/src/lib/ecore_x/Ecore_X.h @@ -869,6 +869,47 @@ void ecore_x_gc_del(Ecore_X_GC gc); int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, long d0, long d1, long d2, long d3, long d4); int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len); +#if 0 /* ??? */ + void ecore_x_netwm_init(void); +#endif + void ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks); + void ecore_x_netwm_desk_roots_set(Ecore_X_Window root, int n_desks, Ecore_X_Window * vroots); + void ecore_x_netwm_desk_names_set(Ecore_X_Window root, int n_desks, const char **names); + void ecore_x_netwm_desk_size_set(Ecore_X_Window root, int width, int height); + void ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, int n_desks, int *areas); + void ecore_x_netwm_desk_current_set(Ecore_X_Window root, int desk); + void ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, int n_desks, int *origins); + void ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on); + void ecore_x_netwm_client_list_set(Ecore_X_Window root, int n_clients, Ecore_X_Window * p_clients); + void ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, int n_clients, Ecore_X_Window * p_clients); + void ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win); + + /* FIXME: these funcs need categorising */ + void ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h); + int ecore_x_drawable_border_width_get(Ecore_X_Drawable d); + int ecore_x_drawable_depth_get(Ecore_X_Drawable d); + Ecore_X_Window *ecore_x_window_root_list(int *num_ret); + int ecore_x_window_manage(Ecore_X_Window win); + void ecore_x_window_container_manage(Ecore_X_Window win); + void ecore_x_window_client_manage(Ecore_X_Window win); + void ecore_x_window_sniff(Ecore_X_Window win); + void ecore_x_window_client_sniff(Ecore_X_Window win); + Ecore_X_Atom ecore_x_atom_get(char *name); + + typedef enum _Ecore_X_Gravity { + ECORE_X_GRAVITY_FORGET = 0, + ECORE_X_GRAVITY_UNMAP = 0, + ECORE_X_GRAVITY_NW = 1, + ECORE_X_GRAVITY_N = 2, + ECORE_X_GRAVITY_NE = 3, + ECORE_X_GRAVITY_W = 4, + ECORE_X_GRAVITY_CENTER = 5, + ECORE_X_GRAVITY_E = 6, + ECORE_X_GRAVITY_SW = 7, + ECORE_X_GRAVITY_S = 8, + ECORE_X_GRAVITY_SE = 9, + ECORE_X_GRAVITY_STATIC = 10 + } Ecore_X_Gravity; void ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state); void @@ -898,7 +939,28 @@ int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom t Ecore_X_Window *icon_window, Ecore_X_Window *window_group, int *is_urgent); - + void + ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, + int request_pos, + Ecore_X_Gravity gravity, + int min_w, int min_h, + int max_w, int max_h, + int base_w, int base_h, + int step_x, int step_y, + double min_aspect, + double max_aspect); + + int + ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, + int *request_pos, + Ecore_X_Gravity *gravity, + int *min_w, int *min_h, + int *max_w, int *max_h, + int *base_w, int *base_h, + int *step_x, int *step_y, + double *min_aspect, + double *max_aspect); + void ecore_x_netwm_init(void); void ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name); void ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks); diff --git a/legacy/ecore/src/lib/ecore_x/Makefile.am b/legacy/ecore/src/lib/ecore_x/Makefile.am index 6539493374..c5134da1a5 100644 --- a/legacy/ecore/src/lib/ecore_x/Makefile.am +++ b/legacy/ecore/src/lib/ecore_x/Makefile.am @@ -9,7 +9,7 @@ INCLUDES = \ -I$(top_builddir)/src/lib/ecore_job \ @x_cflags@ -libecore_x_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \ +libecore_x_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs \ -L$(top_builddir)/src/lib/ecore_txt/.libs \ -L$(top_builddir)/src/lib/ecore_job/.libs diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x_icccm.c b/legacy/ecore/src/lib/ecore_x/ecore_x_icccm.c index 5d74862b12..9554948763 100644 --- a/legacy/ecore/src/lib/ecore_x/ecore_x_icccm.c +++ b/legacy/ecore/src/lib/ecore_x/ecore_x_icccm.c @@ -182,79 +182,145 @@ ecore_x_icccm_hints_get(Ecore_X_Window win, return 0; } -/* FIXME: working here */ +void +ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, + int request_pos, + Ecore_X_Gravity gravity, + int min_w, int min_h, + int max_w, int max_h, + int base_w, int base_h, + int step_x, int step_y, + double min_aspect, + double max_aspect) +{ + /* FIXME: working here */ + XSizeHints hint; + + hint.flags = 0; + if (request_pos) + { + hint.flags |= USPosition; + } + if (gravity != ECORE_X_GRAVITY_NW) + { + hint.flags |= PWinGravity; + hint.win_gravity = gravity; + } + if ((min_w > 0) || (min_h > 0)) + { + hint.flags |= PMinSize; + hint.min_width = min_w; + hint.min_height = min_h; + } + if ((max_w > 0) || (max_h > 0)) + { + hint.flags |= PMaxSize; + hint.max_width = max_w; + hint.max_height = max_h; + } + if ((base_w > 0) || (base_h > 0)) + { + hint.flags |= PBaseSize; + hint.base_width = base_w; + hint.base_height = base_h; + } + if ((step_x > 1) || (step_y > 1)) + { + hint.flags |= PResizeInc; + hint.width_inc = step_x; + hint.height_inc = step_y; + } + if ((min_aspect > 0.0) || (max_aspect > 0.0)) + { + hint.flags |= PAspect; + hint.min_aspect.x = min_aspect * 10000; + hint.min_aspect.x = 10000; + hint.max_aspect.x = max_aspect * 10000; + hint.max_aspect.x = 10000; + } + XSetWMNormalHints(_ecore_x_disp, win, &hint); +} + int -ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win) +ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, + int *request_pos, + Ecore_X_Gravity *gravity, + int *min_w, int *min_h, + int *max_w, int *max_h, + int *base_w, int *base_h, + int *step_x, int *step_y, + double *min_aspect, + double *max_aspect) { XSizeHints hint; long mask; + int minw = 0, minh = 0; + int maxw = 32767, maxh = 32767; + int basew = 0, baseh = 0; + int stepx = 1, stepy = 1; + double mina = 0.0, maxa = 0.0; + if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask)) return 0; if ((hint.flags & USPosition) || ((hint.flags & PPosition))) { - int x, y, w, h; - -// D("%li %li\n", hint.flags & USPosition, hint.flags & PPosition); -// b->client.pos.requested = 1; -// b->client.pos.gravity = NorthWestGravity; -// if (hint.flags & PWinGravity) -// b->client.pos.gravity = hint.win_gravity; -// x = y = w = h = 0; -// ecore_window_get_geometry(win, &x, &y, &w, &h); -// b->client.pos.x = x; -// b->client.pos.y = y; + if (*request_pos) *request_pos = 1; } else { -// b->client.pos.requested = 0; + if (*request_pos) *request_pos = 0; + } + if (hint.flags & PWinGravity) + { + if (*gravity) *gravity = hint.win_gravity; + } + else + { + if (*gravity) *gravity = ECORE_X_GRAVITY_NW; } if (hint.flags & PMinSize) { -// min_w = hint.min_width; -// min_h = hint.min_height; + minw = hint.min_width; + minh = hint.min_height; } if (hint.flags & PMaxSize) { -// max_w = hint.max_width; -// max_h = hint.max_height; -// if (max_w < min_w) -// max_w = min_w; -// if (max_h < min_h) -// max_h = min_h; - } - if (hint.flags & PResizeInc) - { -// step_w = hint.width_inc; -// step_h = hint.height_inc; -// if (step_w < 1) -// step_w = 1; -// if (step_h < 1) -// step_h = 1; + maxw = hint.max_width; + maxh = hint.max_height; + if (maxw < minw) maxw = minw; + if (maxh < minh) maxh = minh; } if (hint.flags & PBaseSize) { -// base_w = hint.base_width; -// base_h = hint.base_height; -// if (base_w > max_w) -// max_w = base_w; -// if (base_h > max_h) -// max_h = base_h; + basew = hint.base_width; + baseh = hint.base_height; + if (basew > minw) minw = basew; + if (baseh > minh) minh = baseh; } - else + if (hint.flags & PResizeInc) { -// base_w = min_w; -// base_h = min_h; + stepx = hint.width_inc; + stepy = hint.height_inc; + if (stepx < 1) stepx = 1; + if (stepy < 1) stepy = 1; } if (hint.flags & PAspect) { -// if (hint.min_aspect.y > 0) -// aspect_min = -// ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y); -// if (hint.max_aspect.y > 0) -// aspect_max = -// ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y); + if (hint.min_aspect.y > 0) + mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y); + if (hint.max_aspect.y > 0) + maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y); } - + if (min_w) *min_w = minw; + if (min_h) *min_h = minh; + if (max_w) *max_w = maxw; + if (max_h) *max_h = maxh; + if (base_w) *base_w = basew; + if (base_h) *base_h = baseh; + if (step_x) *step_x = stepx; + if (step_y) *step_y = stepy; + if (min_aspect) *min_aspect = mina; + if (max_aspect) *max_aspect = maxa; return 1; } @@ -272,7 +338,7 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win) /* get/set transient for */ /* send iconify request */ -/* FIXME: there are older E hints, gnome hitns and mwm hints and new netwm */ +/* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */ /* hints. each should go in their own file/section so we know which */ -/* is which. also older kde hints too. we shoudl try support as much */ +/* is which. also older kde hints too. we should try support as much */ /* as makese sense to support */