Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
129dd7db
Commit
129dd7db
authored
1 year ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Only count it as the "first resize" if it's not from SendEvent()
parent
f616a09a
No related branches found
No related tags found
No related merge requests found
Pipeline
#5907
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/x_events.c
+8
-6
8 additions, 6 deletions
src/conio/x_events.c
with
8 additions
and
6 deletions
src/conio/x_events.c
+
8
−
6
View file @
129dd7db
...
...
@@ -1469,8 +1469,10 @@ static void handle_resize_event(int width, int height, bool map)
bitmap_drv_request_pixels
();
if
(
!
got_first_resize
)
{
if
(
!
fullscreen
)
{
pthread_mutex_lock
(
&
vstatlock
);
vstat
.
scaling
=
bitmap_double_mult_inside
(
width
,
height
);
pthread_mutex_unlock
(
&
vstatlock
);
resize_window
();
got_first_resize
=
true
;
}
}
}
...
...
@@ -1603,7 +1605,7 @@ is_fullscreen(void)
}
static
void
handle_configuration
(
int
w
,
int
h
,
bool
map
)
handle_configuration
(
int
w
,
int
h
,
bool
map
,
bool
se
)
{
bool
resize
=
false
;
...
...
@@ -1613,7 +1615,7 @@ handle_configuration(int w, int h, bool map)
pthread_mutex_unlock
(
&
vstatlock
);
if
(
resize
)
handle_resize_event
(
w
,
h
,
map
);
if
(
w
&&
h
)
if
(
w
&&
h
&&
!
se
)
got_first_resize
=
true
;
}
...
...
@@ -1691,7 +1693,7 @@ x11_event(XEvent *ev)
/* Graphics related events */
case
ConfigureNotify
:
{
/*
* NOTE: The x/y values in the event are relative to root
o
f send_event is true, and
* NOTE: The x/y values in the event are relative to root
i
f send_event is true, and
* relative to the parent (which is the above member) if send_event is false. Trying
* to translate from parent to root in here is a bad idea as there's a race condition.
* Basically, if we care about the x/y pos, we should not use it when send_event is
...
...
@@ -1705,7 +1707,7 @@ x11_event(XEvent *ev)
pending_height
=
ev
->
xconfigure
.
height
;
}
else
{
handle_configuration
(
ev
->
xconfigure
.
width
,
ev
->
xconfigure
.
height
,
false
);
handle_configuration
(
ev
->
xconfigure
.
width
,
ev
->
xconfigure
.
height
,
false
,
ev
->
xconfigure
.
send_event
);
}
}
break
;
...
...
@@ -1713,7 +1715,7 @@ x11_event(XEvent *ev)
case
MapNotify
:
if
(
map_pending
)
{
map_pending
=
false
;
handle_configuration
(
pending_width
,
pending_height
,
true
);
handle_configuration
(
pending_width
,
pending_height
,
true
,
true
);
}
break
;
case
NoExpose
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment