diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 25c78f6e972..0e7d0e4c998 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -65,7 +65,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
else
to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.")
if(!anchored && !fulltile)
- to_chat(user, "Alt-click to rotate it clockwise.")
+ to_chat(user, "Alt-click to rotate it.")
/obj/structure/window/New(Loc, direct)
..()
@@ -397,12 +397,25 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return TRUE
/obj/structure/window/AltClick(mob/user)
- if(user.incapacitated())
- to_chat(user, "You can't do that right now!")
+ if(usr.stat || !usr.canmove || usr.restrained())
return
- if(!Adjacent(user))
- return
- revrotate()
+
+ if(anchored)
+ to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!")
+ return FALSE
+
+ var/target_dir = turn(dir, 270)
+
+ if(!valid_window_location(loc, target_dir))
+ target_dir = turn(dir, 90)
+ if(!valid_window_location(loc, target_dir))
+ to_chat(usr, "There is no room to rotate the [src]")
+ return FALSE
+
+ setDir(target_dir)
+ ini_dir = dir
+ add_fingerprint(usr)
+ return TRUE
/obj/structure/window/Destroy()
density = FALSE