Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
0e83d1d4
Commit
0e83d1d4
authored
Apr 05, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed setting programmatically setting the size of a window on X11 for non-resizable windows.
Patch by Matthew Smaling
parent
65b0f309
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
SDL_x11window.c
src/video/x11/SDL_x11window.c
+16
-1
No files found.
src/video/x11/SDL_x11window.c
View file @
0e83d1d4
...
@@ -772,6 +772,21 @@ X11_SetWindowSize(_THIS, SDL_Window * window)
...
@@ -772,6 +772,21 @@ X11_SetWindowSize(_THIS, SDL_Window * window)
if
(
SDL_IsShapedWindow
(
window
))
if
(
SDL_IsShapedWindow
(
window
))
X11_ResizeWindowShape
(
window
);
X11_ResizeWindowShape
(
window
);
if
(
!
(
window
->
flags
&
SDL_WINDOW_RESIZABLE
))
{
/* Apparently, if the X11 Window is set to a 'non-resizable' window, you cannot resize it using the XResizeWindow, thus
we must set the size hints to adjust the window size.*/
XSizeHints
*
sizehints
=
XAllocSizeHints
();
long
userhints
;
XGetWMNormalHints
(
display
,
data
->
xwindow
,
sizehints
,
&
userhints
);
sizehints
->
min_width
=
sizehints
->
max_height
=
window
->
w
;
sizehints
->
min_height
=
sizehints
->
max_height
=
window
->
h
;
XSetWMNormalHints
(
display
,
data
->
xwindow
,
sizehints
);
XFree
(
sizehints
);
}
else
XResizeWindow
(
display
,
data
->
xwindow
,
window
->
w
,
window
->
h
);
XResizeWindow
(
display
,
data
->
xwindow
,
window
->
w
,
window
->
h
);
XFlush
(
display
);
XFlush
(
display
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment