Commit 82408de786df12efa1f5f0ec9d0f5754f9c61bf7

  • avatar
  • Peter Hutterer <peter.hutterer @wh…t.net> (Committer)
  • Thu Dec 24 00:01:05 CET 2009
  • avatar
  • Ping Cheng <pingc @wa…m.com> (Author)
  • Wed Dec 23 02:59:41 CET 2009
Validate the active tablet area before initializing the area

Signed-off-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  
150150
151151 DBG(10, priv, "\n");
152152
153 /* Verify Box */
153 /* the following 4 blocks verify the box and
154 * initialize the area */
154155 if (priv->topX > bottomx)
155156 {
156 area->topX = priv->topX = 0;
157 priv->topX = 0;
157158 }
159 area->topX = priv->topX;
158160
159161 if (priv->topY > bottomy)
160162 {
161 area->topY = priv->topY = 0;
163 priv->topY = 0;
162164 }
165 area->topY = priv->topY;
163166
164 /* set unconfigured bottom to max */
165 priv->bottomX = xf86SetIntOption(local->options, "BottomX", 0);
166167 if (priv->bottomX < priv->topX || !priv->bottomX)
167168 {
168 area->bottomX = priv->bottomX = bottomx;
169 priv->bottomX = bottomx;
169170 }
171 area->bottomX = priv->bottomX;
170172
171 /* set unconfigured bottom to max */
172 priv->bottomY = xf86SetIntOption(local->options, "BottomY", 0);
173173 if (priv->bottomY < priv->topY || !priv->bottomY)
174174 {
175 area->bottomY = priv->bottomY = bottomy;
175 priv->bottomY = bottomy;
176176 }
177 area->bottomY = priv->bottomY;
177178
178179 if (priv->twinview != TV_NONE)
179180 priv->numScreen = 2;