mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +01:00
wmaker: remove unnecessary null pointer checks in handle_event of wsmap
The function is called only if wsmap is not null, and the function is not modifying its value so it won't become null. Removed the checks to keep the code as simple as possible for maintainability. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
ad84a2dc8f
commit
4bed8d14d7
@@ -487,8 +487,6 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
|
||||
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask
|
||||
| PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev);
|
||||
|
||||
if (!wsmap)
|
||||
break;
|
||||
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
|
||||
|
||||
switch (ev.type) {
|
||||
@@ -539,7 +537,6 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
|
||||
if (wsmap)
|
||||
workspace_map_destroy(wsmap);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user