#Discord window does not remember position

7 messages · Page 1 of 1 (latest)

sterile hazel
#

Every time i close and open discord, its window will not remember its position.
Only the x value is consistent, while the y value increases (well, technically decreases) each time i close/open discord.
In other words, the window travels to the top edge of my screen until it reaches it.

Note: setting "Location of newly opened windows" to "Center" does not fix the issue

My discord settings have "minimize to tray" enabled. Turning it off will "fix" this issue, however its not really what im looking for

Steps to reproduce:

  1. open discord (if not opened already)
  2. close discord
  3. its window travelled slightly upwards
  4. repeat from 1 if needed

Specs

  • Discord (downloaded from the website, not the flatpak): happened on ver. 0.0.80 and current (0.0.90)
  • Mint: 22.1 Cinnamon
  • Kernel: happened on 6.8.0-56-generic and current (6.8.0-57-generic)
jovial forge
#

This is probably a Discord issue. I can recreate on Vesktop as well, but other hide-to-tray applications like Transmission do not exhibit the same behavior.

sterile hazel
#

i wonder if this is cinnamon specific or not...
other than writing a script that re-centers the window, would there be other, more convenient, ways perhaps?

jovial forge
#

I'm not sure this is the easiest way, but I did a bit of searching and found a CLI tool called xdotool, which can move windows. Here is a simple script that moves the discord window to a set position:

#!/bin/bash

# Get the window ID of the visible Discord window
window_id=$(xdotool search --onlyvisible --name discord)

# Check if window_id is not empty
if [ -n "$window_id" ]; then
    # Run xdotool command with the window ID and specified coordinates
    xdotool windowmove $window_id 480 270
else
    echo "Discord window not found."
fi

This is pretty janky because it just does a generic search for a window that contains "discord" and you'll have to play with the coordinates to get it right.

There might be a better windows management app that can do this out there

sterile hazel
#

it looks pretty similar to wmctrl, which i used in a script to center it already, but its pretty janky

#

There might be a better windows management app that can do this out there
i thought windows were only managed by Muffin (?)

#

ive found out that some people are talking about compiz, which is made for X, so i might take a look at this one