Revision 24461 trunk/extensions/dockingSkin/src/main/java/org/gvsig/mdiManager/DockingManager.java

View differences:

DockingManager.java
235 235
						IWindow v = wis.getWindowById(Integer.parseInt(e
236 236
								.getActionCommand()));
237 237
						DockWindow f = dockWindowSupport.getDockWindow(v);
238
						f.getTopLevelAncestor().requestFocus();
238 239
						f.restoreFocus();
239 240
						// activateJInternalFrame(f);
240 241
					}
......
246 247
				DockWindow frame = (DockWindow) singletonSupport
247 248
						.getFrame((SingletonWindow) iWindow);
248 249
				// activateJInternalFrame(frame);
250
				frame.getTopLevelAncestor().requestFocus();
249 251
				frame.restoreFocus();
250 252
				wss.setActive(iWindow);
251 253
				return dockWindowSupport.getWindow((DockWindow) frame);
......
261 263
						IWindow v = wis.getWindowById(Integer.parseInt(e
262 264
								.getActionCommand()));
263 265
						DockWindow f = dockWindowSupport.getDockWindow(v);
266
						f.getTopLevelAncestor().requestFocus();
264 267
						f.restoreFocus();
265 268
						// activateJInternalFrame(f);
266 269
					}
......
325 328
				&& wi.getAdditionalInfo().equals("ProjectWindow")) {
326 329
			rootWindow.getWindowBar(Direction.LEFT).addTab(wnd);
327 330
		} else {
328
			if (wi.isPalette()) {
331
			if (wi.isModeless()) {
329 332
				final FloatingWindow floatingWindow = rootWindow
330 333
						.createFloatingWindow(new Point(wi.getX(), wi.getY()),
331 334
								new Dimension(wi.getWidth(), wi.getHeight()),
......
340 343
		}
341 344
		// DockingUtil.addWindow(wnd, rootWindow);
342 345
		updateDockWindowProperties(wnd, wi);
346
		wnd.getTopLevelAncestor().requestFocus();
343 347
		wnd.restoreFocus();
344 348
		lastFocusedWindow = wnd;
345 349
	}

Also available in: Unified diff