Implements if conditions for pane and window
#942
+272
−7
if conditions for pane and window
#942