summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2012-08-08 10:09:49 +0000
committerChristopher Michael <cpmichael1@comcast.net>2012-08-08 10:09:49 +0000
commitcfe74312560ebf03d7cb7fe56faa52e81fd1dac0 (patch)
tree88c6771192a54803b5acf8bbeecd4ef57d466292 /legacy
parent33d4af1e188005ece3afd372d268512a93cdf11c (diff)
Ecore_Evas (wayland): When we maximize windows, account for framespace
width and height so the window does not draw outside the output dimensions. Fixes ticket #1281 SVN revision: 75005
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c23
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c24
2 files changed, 35 insertions, 12 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c
index b296bd26c6..0ab2703814 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c
@@ -957,6 +957,7 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
957{ 957{
958 Ecore_Evas *ee; 958 Ecore_Evas *ee;
959 Ecore_Wl_Event_Window_Configure *ev; 959 Ecore_Wl_Event_Window_Configure *ev;
960 int nw = 0, nh = 0;
960 961
961 LOGFN(__FILE__, __LINE__, __FUNCTION__); 962 LOGFN(__FILE__, __LINE__, __FUNCTION__);
962 963
@@ -964,18 +965,30 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
964 ee = ecore_event_window_match(ev->win); 965 ee = ecore_event_window_match(ev->win);
965 if (!ee) return ECORE_CALLBACK_PASS_ON; 966 if (!ee) return ECORE_CALLBACK_PASS_ON;
966 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 967 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
968
967 if ((ee->x != ev->x) || (ee->y != ev->y)) 969 if ((ee->x != ev->x) || (ee->y != ev->y))
968 { 970 {
969 /* ee->x = ev->x; */
970 /* ee->y = ev->y; */
971 ee->req.x = ee->x; 971 ee->req.x = ee->x;
972 ee->req.y = ee->y; 972 ee->req.y = ee->y;
973 if (ee->func.fn_move) ee->func.fn_move(ee); 973 if (ee->func.fn_move) ee->func.fn_move(ee);
974 } 974 }
975 if ((ee->req.w != ev->w) || (ee->req.h != ev->h)) 975
976 nw = ev->w;
977 nh = ev->h;
978
979 if (ee->prop.maximized)
980 {
981 int fw = 0, fh = 0;
982
983 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
984 nw = ev->w - fw;
985 nh = ev->h - fh;
986 }
987
988 if ((ee->w != nw) || (ee->h != nh))
976 { 989 {
977 ee->req.w = ev->w; 990 ee->req.w = nw;
978 ee->req.h = ev->h; 991 ee->req.h = nh;
979 if (ee->func.fn_resize) ee->func.fn_resize(ee); 992 if (ee->func.fn_resize) ee->func.fn_resize(ee);
980 } 993 }
981 994
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
index 9d547d16b0..0deb37186e 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
@@ -1100,6 +1100,7 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
1100{ 1100{
1101 Ecore_Evas *ee; 1101 Ecore_Evas *ee;
1102 Ecore_Wl_Event_Window_Configure *ev; 1102 Ecore_Wl_Event_Window_Configure *ev;
1103 int nw = 0, nh = 0;
1103 1104
1104 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1105 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1105 1106
@@ -1110,18 +1111,27 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
1110 1111
1111 if ((ee->x != ev->x) || (ee->y != ev->y)) 1112 if ((ee->x != ev->x) || (ee->y != ev->y))
1112 { 1113 {
1113 /* ee->x = ev->x; */
1114 /* ee->y = ev->y; */
1115 ee->req.x = ee->x; 1114 ee->req.x = ee->x;
1116 ee->req.y = ee->y; 1115 ee->req.y = ee->y;
1117 if (ee->func.fn_move) ee->func.fn_move(ee); 1116 if (ee->func.fn_move) ee->func.fn_move(ee);
1118 } 1117 }
1119 if ((ee->req.w != ev->w) || (ee->req.h != ev->h)) 1118
1119 nw = ev->w;
1120 nh = ev->h;
1121
1122 if (ee->prop.maximized)
1123 {
1124 int fw = 0, fh = 0;
1125
1126 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
1127 nw = ev->w - fw;
1128 nh = ev->h - fh;
1129 }
1130
1131 if ((ee->w != nw) || (ee->h != nh))
1120 { 1132 {
1121 /* ee->w = ev->w; */ 1133 ee->req.w = nw;
1122 /* ee->h = ev->h; */ 1134 ee->req.h = nh;
1123 ee->req.w = ev->w;
1124 ee->req.h = ev->h;
1125 if (ee->func.fn_resize) ee->func.fn_resize(ee); 1135 if (ee->func.fn_resize) ee->func.fn_resize(ee);
1126 } 1136 }
1127 1137