Move Windows 10 partition to another location on the same drive and avoid boot problems
You can move C:
upward over the unallocated space, then move X:
over the
newly displaced unallocated space, ending up with the unallocated space below X:
,
ready to be merged via the resize of X:
.
This will not change the numbering of the partitions, since the unallocated space is not a partition and does not have a partition number.
Do not use GParted for resizing Windows partitions, and do not use Windows 7 for resizing a Windows 10 partition (the other direction is fine).
On some old-format disks GParted might warn that moving the starts of file systems is dangerous. In this case, moving any allocated partition is impossible on this disk, because the partitions are identified by their byte-offsets on the disk.
I would advice, before doing any partition work, to take a full backup of the disk and a have a boot media that can be used to restore the backup. This is because even a slight error might make the disk unbootable.