When I move KDevelop window to secondary screen, the context menu with list of the open documents is displayed on the primary screen. The menu is located close to that side of the screen, which is closer to the second screen.
Apparently this was a KWin bug.