aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2009-04-15 02:08:07 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2009-04-15 02:08:07 +0000
commit4fe27de5ea313604690eb106435678ca67e857ac (patch)
tree434dab06a0775a56b7edb5d695b5678df851351f /legacy/elementary/src/lib/elm_win.c
parentUpdated debian stuff(grew Standards-Version, updated python-ecore rules file) (diff)
downloadefl-4fe27de5ea313604690eb106435678ca67e857ac.tar.gz
actually enable netwm window type set, simplify code.
SVN revision: 40071
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c72
1 files changed, 31 insertions, 41 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index a710d91ded..876a394be0 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -169,49 +169,39 @@ _elm_win_xwin_update(Elm_Win *win)
ecore_x_icccm_transient_for_set(win->xwin, win2->xwin);
}
}
-
- if (win->type == ELM_WIN_BASIC)
+
+ if (!win->xwin) return; /* nothing more to do */
+
+ switch (win->type)
{
- switch (win->type)
- {
- case ELM_WIN_BASIC:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_NORMAL);
- break;
- case ELM_WIN_DIALOG_BASIC:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DIALOG);
- break;
- case ELM_WIN_DESKTOP:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DESKTOP);
- break;
- case ELM_WIN_DOCK:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DOCK);
- break;
- case ELM_WIN_TOOLBAR:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_TOOLBAR);
- break;
- case ELM_WIN_MENU:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_MENU);
- break;
- case ELM_WIN_UTILITY:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_UTILITY);
- break;
- case ELM_WIN_SPLASH:
- if (win->xwin)
- ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_SPLASH);
- break;
- default:
- break;
- }
+ case ELM_WIN_BASIC:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_NORMAL);
+ break;
+ case ELM_WIN_DIALOG_BASIC:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DIALOG);
+ break;
+ case ELM_WIN_DESKTOP:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DESKTOP);
+ break;
+ case ELM_WIN_DOCK:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_DOCK);
+ break;
+ case ELM_WIN_TOOLBAR:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_TOOLBAR);
+ break;
+ case ELM_WIN_MENU:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_MENU);
+ break;
+ case ELM_WIN_UTILITY:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_UTILITY);
+ break;
+ case ELM_WIN_SPLASH:
+ ecore_x_netwm_window_type_set(win->xwin, ECORE_X_WINDOW_TYPE_SPLASH);
+ break;
+ default:
+ break;
}
- if (win->xwin)
- ecore_x_e_virtual_keyboard_state_set
+ ecore_x_e_virtual_keyboard_state_set
(win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
#endif
}