0

I have an application that uses a non-decorated window (no title bar and so on, it's eventually intended to be a full-screen application). It also has one-pixel-wide line images around the outside to form a natural border with the outside world.

When I run this application and the Window gets its default position (i.e., not at the (0,0) origin), the borders are clearly visible.

However, when I perform a this.Move(0, 0) in the constructor of the main window to make sure the window is positioned correctly, the upper-right pixels seem to disappear thus:

enter image description here

Ignore the Act text in that capture, it's actually the Activities menu under Gnome desktop. The actual upper-left pixel of the window is where those two red lines would meet.

Does anyone know what could be causing this issue? Is it possibly something to do with the Gnome Shell extensions taking control of that area?

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953

2 Answers2

1

The missing pixels are an artifact of the way gnome-shell does rounded rectangles for its windows.

If you really want to change it, you can edit the file /usr/share/gnome-shell/theme/gnome-shell.css. Look for the CSS selector .panel-corner and set -panel-corner-radius to 0px. This will cause the windows to have square corners rather than rounded ones. You will probably need to restart gnome-shell after making the change by pressing Alt-F2 and enter the r command.

Whether that edit will survive a gnome-shell (or even a theme) update is unsure, you may have to put into place something that keeps it at the value you want (or install an extension to do that for you).

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
0

That is how gnome-shell renders the top corners of the main monitor, it's a rounded corner, just not very visible with black on black. Changing this rendering is not something an application should do.

If your application is supposed to be full screen instead of just positioned at the corner, you could request gnome-shell to do that with Window.fullscreen(). Do not rely on always being full screen though: the window manager can decide otherwise.

Jussi Kukkonen
  • 13,857
  • 1
  • 37
  • 54
  • @paxdiablo please don't modify answer content significantly without discussion. If you disagree with a part of the answer, write your own answer or add a comment. I'm going to revert the part about changing how the shell looks: it's just not something a normal application developer should (or could) do. – Jussi Kukkonen Feb 23 '16 at 12:44
  • No problems, jku, it's just that your original statement was that it couldn't be done, which was wrong. So I added the way it could be done. Since your answer no longer contains that, I can't really accept it since it doesn't solve my problem. As you suggest, I'll post my own answer with the extra information. As to whether normal developers do it, I *do* have a very specific use case for it, so hopefully you won't consider me *too* abnormal :-) – paxdiablo Feb 23 '16 at 14:11
  • Cheers, that sounds fine. Good that you found a solution. – Jussi Kukkonen Feb 23 '16 at 19:05