mhsabbagh / green-recorder

A simple screen recorder for Linux desktop. Supports Wayland & Xorg
GNU General Public License v3.0
616 stars 118 forks source link

[Wayland] "Select an Area" doesn't work with Spanish locale #127

Closed simonbcn closed 5 years ago

simonbcn commented 5 years ago
Arch Linux
GNOME Shell 3.32.0
green-recorder-git version 3.2.2.r7.g795bf40-1 (installed from AUR package)

$ locale
LANG=es_ES.UTF-8
LC_CTYPE=es_ES.UTF-8
LC_NUMERIC=es_ES.UTF-8
LC_TIME=es_ES.UTF-8
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY=es_ES.UTF-8
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER=es_ES.UTF-8
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT=es_ES.UTF-8
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=
$ GDK_BACKEND=x11 green-recorder  
You are recording on: wayland
xwininfo: error: No window with name "Area Chooser" exists!
Traceback (most recent call last):
  File "/usr/bin/green-recorder", line 489, in areasettings
    output = subprocess.check_output(["xwininfo -name \"Area Chooser\" | grep -e Width -e Height -e Absolute"], shell=True)[:-1]
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['xwininfo -name "Area Chooser" | grep -e Width -e Height -e Absolute']' returned non-zero exit status 1

The info of that window in Spanish is:

$ xwininfo         

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x1600e68 "Selector de área"

  Absolute upper-left X:  769
  Absolute upper-left Y:  404
  Relative upper-left X:  769
  Relative upper-left Y:  404
  Width: 381
  Height: 299
  Depth: 32
  Visual: 0x37f
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x1600006 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +769+404  -770+404  -770-377  +769-377
  -geometry 381x299+769+404

I don't think selecting the window by name is a good idea.

mhsabbagh commented 5 years ago

Yea the window title shouldn't have been translatable. I'll fix this.

mgedmin commented 5 years ago

I think the problem is rather that xwininfo is an X11 tool and cannot see any native Wayland windows.

mgedmin commented 5 years ago

I think the problem is rather that xwininfo is an X11 tool and cannot see any native Wayland windows.

Ah, never mind, I was missing the GDK_BACKEND=x11 override, and didn't notice the warning notification. (I have a better fix for that anyway: #137.)

raphaelh commented 5 years ago

I've got the same problem in french: '''$ green-recorder
You are recording on: x11 xwininfo: error: No window with name "Area Chooser" exists! Traceback (most recent call last): File "/usr/bin/green-recorder", line 486, in areasettings output = subprocess.check_output(["xwininfo -name \"Area Chooser\" | grep -e Width -e Height -e Absolute"], shell=True)[:-1] File "/usr/lib/python2.7/subprocess.py", line 223, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['xwininfo -name "Area Chooser" | grep -e Width -e Height -e Absolute']' returned non-zero exit status 1 ''' The title of the window is "Sélecteur de zone"