Hey @Dan,
Ah – I do remember this, and apologies this fell through the cracks. I’ve just taken a look…
Thanks to your instructions, I installed SDL2 and compiled the example program:
// Modification History
// Created on 04/09/20 by Dan Espen:
// - Demo fullscreen with SDL2
// - Full screen 640x480 window,
// terminate with escape,
// times out after a few secs.
#include <SDL2/SDL.h>
int main(int argc, char *argv[]) {
SDL_Window* window = NULL;
SDL_Renderer* renderer;
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_EVENTS) != 0) {
SDL_Log("Failed to initialize SDL: %s", SDL_GetError());
return 1;
}
// fixme, the WM is adding titlebar and borders,
// To remove decoration, Run:
// FvwmCommand 'Style "mywind" NoTitle, BorderWidth 0, HandleWidth 0'
window = SDL_CreateWindow("mywind",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
640, 480,
SDL_WINDOW_FULLSCREEN_DESKTOP
|SDL_WINDOW_BORDERLESS);
renderer = SDL_CreateRenderer(window, -1, 0);
SDL_SetRenderDrawColor(renderer,
0x80, 0x80, 0xFF, 0xFF); // RGBA
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
bool quitting = false;
int how_long = 0;
while(!quitting) {
SDL_Event event;
while( SDL_PollEvent(&event) ) {
switch (event.type) {
case SDL_QUIT:
quitting = true;
break;
case SDL_KEYDOWN:
switch (event.key.keysym.scancode) {
case SDL_SCANCODE_Q:
case SDL_SCANCODE_ESCAPE:
quitting = true;
printf("quit on key\n");
break;
}
}
}
SDL_Delay(300);
if (how_long++ > 500) {
quitting = true;
printf("quit on count\n");
}
}
SDL_DestroyWindow(window);
SDL_Quit();
exit(0);
}
But, when I run it, I get a fullscreened window (a nice blue colour, I must say!) without a border.
When I look at xprop(1) on this window, I see this:
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
I assume therefore this is what will fix things for you:
Style mywind MwmDecor
I have MwmDecor
set globally, which is why things worked fine for me to begin with.
Kindly,
Thomas